首页 技术 正文
技术 2022年11月18日
0 收藏 434 点赞 2,157 浏览 11028 个字

1,migrate –domain –destURL –dname  –live(热迁移)

migrate lf 192.168.16.3 dname

2,managedsave domain-id  保存当前运行的虚拟机的状态,当虚拟机再次启动的时候会恢复到之前保存的状态

Domain Management (help keyword ‘domain’):           详细解释:                                   用法:

attach-device                  从一个XML文件附加装置; 使用 XML文件中的设备定义在客户端中添加设备。attach-device lf lf.xml

attach-disk                    附加磁盘设备

attach-interface               获得网络界面

autostart                      自动开始一个域;定义为该状态的domain会在libvirt服务启动时自动启动。

blkdeviotune                   Set or query a block device I/O tuning parameters.;使用blkdeviotune可以设置虚拟机的读写速度和iops

blkiotune                      Get or set blkio parameters; 设置磁盘的权重 设置虚拟机的权重为700,并立即生效。

blockpull                      Populate a disk from its backing image.;将backing file数据合并至overlay中,截止目前只能将backing file合并至当前使用的active中,也就是说还不支                            持指定top的合并.(blockcommit: 从 top 合并数据到 base )

blockjob                       Manage active block operations.;xxxxxxxxxxxx

blockresize                    Resize block device of domain. ;调整块设备大小。调整容量大小

console                        连接到客户会话

cpu-baseline                   compute baseline CPU ;xxxxxxxxxxxx

cpu-compare                    compare host CPU with a CPU described by an XML file;xxxxxxxxxxxx

create                         从一个 XML 文件创建一个域;创建一个虚拟机并启动

define                         从一个 XML 文件定义(但不开始)一个域;定义一个虚拟机

destroy                        destroy (stop) a domain;强制关机

detach-device                  从一个 XML 文件分离设备;xxxxxxxxxxxx

detach-disk                    分离磁盘设备;xxxxxxxxxxxx

detach-interface               分离网络界面;xxxxxxxxxxxx

domid                          把一个域名或 UUID 转换为域 id;根据虚拟机名称获取域名或ID

domif-setlink                  set link state of a virtual interface ;需要参数interface。

domjobabort                    abort active domain job;xxxxxxxxxxxx

domjobinfo                     domain job information;xxxxxxxxxxxx

domname                        将域 id 或 UUID 转换为域名

domuuid                        把一个域名或 id 转换为域 UUID

domxml-from-native             Convert native config to domain XML;配置文件到xml的转换

domxml-to-native               Convert domain XML to native config;xml到配置文件的转换

dump                           把一个域的内核 dump 到一个文件中以方便分析

dumpxml                        XML 中的域信息

edit                           编辑某个域的 XML 配置

inject-nmi                     Inject NMI to the guest ;把NMI注入到客户机

send-key                       Send keycodes to the guest;将键码发送到客户机

managedsave                    managed save of a domain state;相当于系统还原点

managedsave-remove             Remove managed save of a domain;删除系统还原点

maxvcpus                       connection vcpu maximum ;连接虚拟处理器最大值

memtune                        Get or set memory parameters;设置内存参数

OPTIONS

[–domain] <string> domain name, id or uuid

–hard-limit <number> 强制最大内存 (default KiB)

–soft-limit <number> 可用最大内存 (default KiB)

–swap-hard-limit <number> 强制最大swap使用大小(default KiB)

–min-guarantee <number> 最小保证的内存 (default KiB)

–config 下次重启生效

–live 在线生效

–current 只在当前生效

例子:

memtune 6 –hard-limit 4194304 –soft-limit 8388608 –swap-hard-limit 4194304 –config

migrate                        将域迁移到另一个主机中。;完成VM状态转储.保存运行状态虚拟机的内存设备状态信息至文件,可以通过此文件恢复到保存时的状态,有点类似系统

的休眠.(注意创建VM状态保存的时候VM磁盘必须是未发生写入改动的)

migrate-setmaxdowntime         set maximum tolerable downtime;设定可以容忍的最长停机时间

migrate-setspeed               Set the maximum migration bandwidth;设定最大迁移带宽

migrate-getspeed               Get the maximum migration bandwidth;获取最大迁移带宽

reboot                         重新启动一个域

reset                          reset a domain;重置域

restore                        从一个存在一个文件中的状态恢复一个域;

resume                         重新恢复一个域;重新运行。

save                           把一个域的状态保存到一个文件

save-image-define              redefine the XML for a domain’s saved state file;为域的保存状态文件重新定义XML

save-image-dumpxml             saved state domain information in XML; XML中的保存状态域信息

save-image-edit                edit XML for a domain’s saved state file;为域的保存状态文件编辑XML

schedinfo                      显示/设置日程安排变量;显示/设定调度器参数

screenshot                     take a screenshot of a current domain console and store it into a file;获取当前域控制台的屏幕截图,并保存到文件中

setmaxmem                      改变最大内存限制值;

setmem                         改变内存的分配

setvcpus                       改变虚拟 CPU 的数量;

shutdown                       关闭一个域;关机

start                          开始一个(以前定义的)非活跃的域

suspend                        挂起一个域,暂停;

ttyconsole                     tty 控制台

undefine                       undefine a domain 取消已经定义的域

update-device                  update device from an XML file;从XML文件更新设备

vcpucount                      domain vcpu counts; 域虚拟处理器数量

vcpuinfo                       detailed domain vcpu information;详细的域虚拟处理器信息

vcpupin                        control or query domain vcpu affinity; 控制或查询域虚拟处理器亲近性

version                        显示版本

vncdisplay                     vnc 显示

———————————————————————–

Domain Monitoring (help keyword ‘monitor’):

domblkinfo                     domain block device size information

domblklist                     list all domain blocks ;查看虚拟机磁盘列表

domblkstat                     获得域设备块状态

domcontrol                     domain control interface state;域控制台界面状态

domif-getlink                  get link state of a virtual interface;获取虚拟接口的链路状态

domifstat                      获得域网络接口状态;获取域的网络接口统计信息

dominfo                        域信息

dommemstat                     get memory statistics for a domain ;获取mem实际大小

domstate                       域状态

list                           列出域

Host and Hypervisor (help keyword ‘host’):

capabilities                   性能

connect                        连接(重新连接)到 hypervisor

freecell                       NUMA可用内存

hostname                       打印管理程序主机名

nodecpustats                   Prints cpu stats of the node.;CPU状态

nodeinfo                       节点信息;CPU信息

nodememstats                   Prints memory stats of the node.

nodesuspend                    suspend the host node for a given time duration;将主机节点暂停一段特定的时间

qemu-attach                    QEMU Attach

qemu-monitor-command           QEMU Monitor Command

sysinfo                        print the hypervisor sysinfo

uri                            打印管理程序典型的URI

Interface (help keyword ‘interface’):

iface-begin                    create a snapshot of current interfaces settings, which can be later commited (iface-commit) or restored (iface-rollback);拍摄当前接口设置的                                 快照,以后可以提交(iface-commit)或恢复(iface-rollback)

iface-bridge                   create a bridge device and attach an existing network device to it;建立网桥设备,并与现有网络设备相连

iface-commit                   commit changes made since iface-begin and free restore point;实行自iface-begin和闲置恢复点以来所作的变化

iface-define                   define (but don’t start) a physical host interface from an XML file;从XML文件定义(但不启动)物理主机接口

iface-destroy                  destroy a physical host interface (disable it / “if-down”);销毁物理主机接口(禁用它/ “if-down”)

iface-dumpxml                  interface information in XML

iface-edit                     edit XML configuration for a physical host interface

iface-list                     list physical host interfaces ;XXXXXXXXXXXXXXXX

iface-mac                      convert an interface name to interface MAC address;XXX

iface-name                     convert an interface MAC address to interface name;XXX

iface-rollback                 rollback to previous saved configuration created via iface-begin;恢复到通过iface-begin创建的之前保存的配置

iface-start                    start a physical host interface (enable it / “if-up”);启动物理主机接口(启用它/ “if-up”)

iface-unbridge                 undefine a bridge device after detaching its slave device;分离从属设备后,取消定义网桥设备

iface-undefine                 undefine a physical host interface (remove it from configuration);取消定义物理主机接口(将它从配置中移除)

Network Filter (help keyword ‘filter’):

nwfilter-define                define or update a network filter from an XML file;从XML文件定义或更新网络过滤器

nwfilter-dumpxml               network filter information in XML;XML中的网络过滤器信息

nwfilter-edit                  edit XML configuration for a network filter

nwfilter-list                  list network filters

nwfilter-undefine              undefine a network filter

Networking (help keyword ‘network’):

net-autostart                  自动开始网络

net-create                     从一个 XML 文件创建一个网络

net-define                     从一个 XML 文件定义(但不开始)一个网络

net-destroy                    destroy (stop) a network

net-dumpxml                    XML 中的网络信息

net-edit                       为网络编辑 XML 配置

net-info                       network information

net-list                       列出网络

net-name                       把一个网络UUID 转换为网络名

net-start                      开始一个(以前定义的)不活跃的网络

net-undefine                   取消定义一个非活跃的网络

net-uuid                       把一个网络名转换为网络UUID

Node Device (help keyword ‘nodedev’):

nodedev-create                 create a device defined by an XML file on the node

nodedev-destroy                destroy (stop) a device on the node

nodedev-dettach                dettach node device from its device driver

nodedev-dumpxml                XML 中的节点设备详情

nodedev-list                   这台主机中中的枚举设备

nodedev-reattach               reattach node device to its device driver

nodedev-reset                  重置节点设备

Secret (help keyword ‘secret’):

secret-define                  define or modify a secret from an XML file

secret-dumpxml                 secret attributes in XML

secret-get-value               Output a secret value

secret-list                    list secrets

secret-set-value               set a secret value

secret-undefine                undefine a secret

Snapshot (help keyword ‘snapshot’):

snapshot-create                Create a snapshot from XML;通过xml配置文件创建快照

snapshot-create-as             Create a snapshot from a set of args ;直接用命令创建快照;创建外置disk-only磁盘快照

snapshot-current               Get or set the current snapshot;查看snapshot当前状态信息。

snapshot-delete                Delete a domain snapshot

snapshot-dumpxml               Dump XML for a domain snapshot

snapshot-edit                  edit XML for a snapshot

snapshot-list                  List snapshots for a domain

snapshot-parent                Get the name of the parent of a snapshot

snapshot-revert                Revert a domain to a snapshot  ;回滚快照

Storage Pool (help keyword ‘pool’):

find-storage-pool-sources-as   找到潜在存储池源

find-storage-pool-sources      发现潜在存储池源

pool-autostart                 自动启动某个池

pool-build                     建立池

pool-create-as                 从一组变量中创建一个池

pool-create                    从一个 XML 文件中创建一个池

pool-define-as                 在一组变量中定义池

pool-define                    在一个 XML 文件中定义(但不启动)一个池

pool-delete                    删除池

pool-destroy                   destroy (stop) a pool

pool-dumpxml                   XML 中的池信息

pool-edit                      为存储池编辑 XML 配置

pool-info                      存储池信息

pool-list                      列出池

pool-name                      将池 UUID 转换为池名称

pool-refresh                   刷新池

pool-start                     启动一个(以前定义的)非活跃的池

pool-undefine                  取消定义一个不活跃的池

pool-uuid                      把一个池名称转换为池 UUID

Storage Volume (help keyword ‘volume’):

vol-clone                      clone a volume.

vol-create-as                  从一组变量中创建卷;其实就是创建个文件。

vol-create                     从一个 XML 文件创建一个卷

vol-create-from                create a vol, using another volume as input

vol-delete                     删除卷

vol-download                   Download a volume to a file

vol-dumpxml                    XML 中的卷信息

vol-info                       存储卷信息

vol-key                        returns the volume key for a given volume name or path

vol-list                       列出卷

vol-name                       returns the volume name for a given volume key or path;获取卷的名称根据路径或key

vol-path                       returns the volume path for a given volume name or key;根据卷名得到卷缩在路径。

vol-pool                       returns the storage pool for a given volume key or path;根据key和路径得到存储池的名称。

vol-upload                     upload a file into a volume;把某个文件导入卷内。

vol-wipe                       wipe a vol;擦出卷

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,997
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,511
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,356
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,139
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,770
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,848