KVM虚拟化管理工具之virtsh(一)
一、什么是virsh
virsh 是kvm一个管理工具包。virsh提供两种执行模式:”直接模式(Direct Mode)”与”互动模式(Interactive Mode)”。在直接模式里,你必须在Shell中以参数、自变量的方式来执行virsh,如果在互动模式中,则virsh会提供一个提示字符串, 你可以在该提示字符串后,输入要执行的命令。如果执行virsh没有指定任何参数或自变量则默认就是进入互动模式。 与xm一样,COMMAND也是 virsh提供的命令。
二、virsh 语法及参数
virsh命令有2使用方式,一种是在命令行上 virsh + [COMMAND](指令) +[ARGS…](具体参数)工作;另一种是直接在命令行输入virsh进入控制台通过[COMMAND](指令) +[ARGS…](具体参数)工作。需要注意的是virsh命令只能运行在Linux内核下的主机中,不能运行在windows操作系统中。
方法一:
[root@localhost ~]# virsh version
根据库编译:libvirt 4.5.0
使用库:libvirt 4.5.0
使用的 API: QEMU 4.5.0
运行管理程序: QEMU 1.5.3
方法二:
[root@localhost ~]# virsh
欢迎使用 virsh,虚拟化的交互式终端。
输入:'help' 来获得命令的帮助信息'quit' 退出
virsh # verison
根据库编译:libvirt 4.5.0
使用库:libvirt 4.5.0
使用的 API: QEMU 4.5.0
运行管理程序: QEMU 1.5.3
三、virsh 命令介绍
virsh 命令包含了domain(工作域),host(宿主机),interface(接口),network(网络), Node Device(节点设备),Snapshot(快照),Secret (安全性),Storage Pool (存储池),Storage Volume(存储卷)
通过 virsh --help 可以查询到:
virsh [options]... [<command_string>]
virsh [options]... <command> [args...]options:-c | --connect=URI hypervisor connection URI-d | --debug=NUM debug level [0-4]-e | --escape <char> set escape sequence for console-h | --help this help-k | --keepalive-interval=NUMkeepalive interval in seconds, 0 for disable-K | --keepalive-count=NUMnumber of possible missed keepalive messages-l | --log=FILE output logging to file-q | --quiet quiet mode-r | --readonly connect readonly-t | --timing print timing information-v short version-V long version--version[=TYPE] version, TYPE is short or long (default short)commands (non interactive mode):Domain Management (help keyword 'domain')attach-device 从一个XML文件附加装置attach-disk 附加磁盘设备attach-interface 获得网络界面autostart 自动开始一个域blkdeviotune 设定或者查询块设备 I/O 调节参数。blkiotune 获取或者数值 blkio 参数blockcommit 启动块提交操作。blockcopy 启动块复制操作。blockjob 管理活跃块操作blockpull 使用其后端映像填充磁盘。blockresize 创新定义域块设备大小change-media 更改 CD 介质或者软盘驱动器console 连接到客户会话cpu-stats 显示域 cpu 统计数据create 从一个 XML 文件创建一个域define 从一个 XML 文件定义(但不开始)一个域desc 显示或者设定域描述或者标题destroy 销毁(停止)域detach-device 从一个 XML 文件分离设备detach-device-alias detach device from an aliasdetach-disk 分离磁盘设备detach-interface 分离网络界面domdisplay 域显示连接 URIdomfsfreeze Freeze domain's mounted filesystems.domfsthaw Thaw domain's mounted filesystems.domfsinfo Get information of domain's mounted filesystems.domfstrim 在域挂载的文件系统中调用 fstrim。domhostname 输出域主机名domid 把一个域名或 UUID 转换为域 iddomif-setlink 设定虚拟接口的链接状态domiftune 获取/设定虚拟接口参数domjobabort 忽略活跃域任务domjobinfo 域任务信息domname 将域 id 或 UUID 转换为域名domrename rename a domaindompmsuspend 使用电源管理功能挂起域dompmwakeup 从 pmsuspended 状态唤醒域domuuid 把一个域名或 id 转换为域 UUIDdomxml-from-native 将原始配置转换为域 XMLdomxml-to-native 将域 XML 转换为原始配置dump 把一个域的内核 dump 到一个文件中以方便分析dumpxml XML 中的域信息edit 编辑某个域的 XML 配置event Domain Eventsinject-nmi 在虚拟机中输入 NMIiothreadinfo view domain IOThreadsiothreadpin control domain IOThread affinityiothreadadd add an IOThread to the guest domainiothreaddel delete an IOThread from the guest domainsend-key 向虚拟机发送序列号send-process-signal 向进程发送信号lxc-enter-namespace LXC 虚拟机进入名称空间managedsave 管理域状态的保存managedsave-remove 删除域的管理保存managedsave-edit edit XML for a domain's managed save state filemanagedsave-dumpxml Domain information of managed save state file in XMLmanagedsave-define redefine the XML for a domain's managed save state filememtune 获取或者数值内存参数perf Get or set perf eventmetadata show or set domain's custom XML metadatamigrate 将域迁移到另一个主机中migrate-setmaxdowntime 设定最大可耐受故障时间migrate-getmaxdowntime get maximum tolerable downtimemigrate-compcache 获取/设定压缩缓存大小migrate-setspeed 设定迁移带宽的最大值migrate-getspeed 获取最长迁移带宽migrate-postcopy Switch running migration from pre-copy to post-copynumatune 获取或者数值 numa 参数qemu-attach QEMU 附加qemu-monitor-command QEMU 监控程序命令qemu-monitor-event QEMU Monitor Eventsqemu-agent-command QEMU 虚拟机代理命令reboot 重新启动一个域reset 重新设定域restore 从一个存在一个文件中的状态恢复一个域resume 重新恢复一个域save 把一个域的状态保存到一个文件save-image-define 为域的保存状态文件重新定义 XMLsave-image-dumpxml 在 XML 中保存状态域信息save-image-edit 为域保存状态文件编辑 XMLschedinfo 显示/设置日程安排变量screenshot 提取当前域控制台快照并保存到文件中set-lifecycle-action change lifecycle actionsset-user-password set the user password inside the domainsetmaxmem 改变最大内存限制值setmem 改变内存的分配setvcpus 改变虚拟 CPU 的号shutdown 关闭一个域start 开始一个(以前定义的)非活跃的域suspend 挂起一个域ttyconsole tty 控制台undefine 取消定义一个域update-device 从 XML 文件中关系设备vcpucount 域 vcpu 计数vcpuinfo 详细的域 vcpu 信息vcpupin 控制或者查询域 vcpu 亲和性emulatorpin 控制火车查询域模拟器亲和性vncdisplay vnc 显示guestvcpus query or modify state of vcpu in the guest (via agent)setvcpu attach/detach vcpu or groups of threadsdomblkthreshold set the threshold for block-threshold event for a given block device or it's backing chain elementDomain Monitoring (help keyword 'monitor')domblkerror 在块设备中显示错误domblkinfo 域块设备大小信息domblklist 列出所有域块domblkstat 获得域设备块状态domcontrol 域控制接口状态domif-getlink 获取虚拟接口链接状态domifaddr Get network interfaces' addresses for a running domaindomiflist 列出所有域虚拟接口domifstat 获得域网络接口状态dominfo 域信息dommemstat 获取域的内存统计domstate 域状态domstats get statistics about one or multiple domainsdomtime domain timelist 列出域Host and Hypervisor (help keyword 'host')allocpages Manipulate pages pool sizecapabilities 性能cpu-baseline 计算基线 CPUcpu-compare 使用 XML 文件中描述的 CPU 与主机 CPU 进行对比cpu-models CPU modelsdomcapabilities domain capabilitiesfreecell NUMA可用内存freepages NUMA free pageshostname 打印管理程序主机名hypervisor-cpu-baseline compute baseline CPU usable by a specific hypervisorhypervisor-cpu-compare compare a CPU with the CPU created by a hypervisor on the hostmaxvcpus 连接 vcpu 最大值node-memory-tune 获取或者设定节点内存参数nodecpumap 节点 cpu 映射nodecpustats 输出节点的 cpu 状统计数据。nodeinfo 节点信息nodememstats 输出节点的内存状统计数据。nodesuspend 在给定时间段挂起主机节点sysinfo 输出 hypervisor sysinfouri 打印管理程序典型的URIversion 显示版本Interface (help keyword 'interface')iface-begin 生成当前接口设置快照,可在今后用于提交 (iface-commit) 或者恢复 (iface-rollback)iface-bridge 生成桥接设备并为其附加一个现有网络设备iface-commit 提交 iface-begin 后的更改并释放恢复点iface-define define an inactive persistent physical host interface or modify an existing persistent one from an XML fileiface-destroy 删除物理主机接口(启用它请执行 "if-down")iface-dumpxml XML 中的接口信息iface-edit 为物理主机界面编辑 XML 配置iface-list 物理主机接口列表iface-mac 将接口名称转换为接口 MAC 地址iface-name 将接口 MAC 地址转换为接口名称iface-rollback 恢复到之前保存的使用 iface-begin 生成的更改iface-start 启动物理主机接口(启用它请执行 "if-up")iface-unbridge 分离其辅助设备后取消定义桥接设备iface-undefine 取消定义物理主机接口(从配置中删除)Network Filter (help keyword 'filter')nwfilter-define 使用 XML 文件定义或者更新网络过滤器nwfilter-dumpxml XML 中的网络过滤器信息nwfilter-edit 为网络过滤器编辑 XML 配置nwfilter-list 列出网络过滤器nwfilter-undefine 取消定义网络过滤器nwfilter-binding-create create a network filter binding from an XML filenwfilter-binding-delete delete a network filter bindingnwfilter-binding-dumpxml XML 中的网络过滤器信息nwfilter-binding-list list network filter bindingsNetworking (help keyword 'network')net-autostart 自动开始网络net-create 从一个 XML 文件创建一个网络net-define define an inactive persistent virtual network or modify an existing persistent one from an XML filenet-destroy 销毁(停止)网络net-dhcp-leases print lease info for a given networknet-dumpxml XML 中的网络信息net-edit 为网络编辑 XML 配置net-event Network Eventsnet-info 网络信息net-list 列出网络net-name 把一个网络UUID 转换为网络名net-start 开始一个(以前定义的)不活跃的网络net-undefine undefine a persistent networknet-update 更新现有网络配置的部分net-uuid 把一个网络名转换为网络UUIDNode Device (help keyword 'nodedev')nodedev-create 根据节点中的 XML 文件定义生成设备nodedev-destroy 销毁(停止)节点中的设备nodedev-detach 将节点设备与其设备驱动程序分离nodedev-dumpxml XML 中的节点设备详情nodedev-list 这台主机中中的枚举设备nodedev-reattach 重新将节点设备附加到他的设备驱动程序中nodedev-reset 重置节点设备nodedev-event Node Device EventsSecret (help keyword 'secret')secret-define 定义或者修改 XML 中的 secretsecret-dumpxml XML 中的 secret 属性secret-event Secret Eventssecret-get-value secret 值输出secret-list 列出 secretsecret-set-value 设定 secret 值secret-undefine 取消定义 secretSnapshot (help keyword 'snapshot')snapshot-create 使用 XML 生成快照snapshot-create-as 使用一组参数生成快照snapshot-current 获取或者设定当前快照snapshot-delete 删除域快照snapshot-dumpxml 为域快照转储 XMLsnapshot-edit 编辑快照 XMLsnapshot-info 快照信息snapshot-list 为域列出快照snapshot-parent 获取快照的上级快照名称snapshot-revert 将域转换为快照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 define an inactive persistent storage pool or modify an existing persistent one from an XML filepool-delete 删除池pool-destroy 销毁(删除)池pool-dumpxml XML 中的池信息pool-edit 为存储池编辑 XML 配置pool-info 存储池信息pool-list 列出池pool-name 将池 UUID 转换为池名称pool-refresh 刷新池pool-start 启动一个(以前定义的)非活跃的池pool-undefine 取消定义一个不活跃的池pool-uuid 把一个池名称转换为池 UUIDpool-event Storage Pool EventsStorage Volume (help keyword 'volume')vol-clone 克隆卷。vol-create-as 从一组变量中创建卷vol-create 从一个 XML 文件创建一个卷vol-create-from 生成卷,使用另一个卷作为输入。vol-delete 删除卷vol-download 将卷内容下载到文件中vol-dumpxml XML 中的卷信息vol-info 存储卷信息vol-key 为给定密钥或者路径返回卷密钥vol-list 列出卷vol-name 为给定密钥或者路径返回卷名vol-path 为给定密钥或者路径返回卷路径vol-pool 为给定密钥或者路径返回存储池vol-resize 创新定义卷大小vol-upload 将文件内容上传到卷中vol-wipe 擦除卷Virsh itself (help keyword 'virsh')cd 更改当前目录echo echo 参数exit 退出这个非交互式终端help 打印帮助pwd 输出当前目录quit 退出这个非交互式终端connect 连接(重新连接)到 hypervisor
四、virsh常用命令介绍
4.1 host(宿主机相关)
4.1.1 hostname
virsh hostname 显示宿主机的机器名
[root@localhost ~] virsh hostname
localhost.localdomain
4.1.2 maxvcpus
virsh maxvcpus 显示宿主机最大可提供分配的虚拟cpu的总数,也就是一台机器下所有虚拟机的vcpu个数之和不能大于这个参数。
[root@localhost ~] virsh maxvcpus
240
4.1.3 version
virsh version 显示libvirt及qemu对应的版本信息
[root@localhost ~] virsh version
根据库编译:libvirt 4.5.0
使用库:libvirt 4.5.0
使用的 API: QEMU 4.5.0
运行管理程序: QEMU 1.5.3
4.1.4 sysinfo
virsh sysinfo 显示宿主机的硬件信息
[root@localhost ~] virsh sysinfo
<sysinfo type='smbios'><bios><entry name='vendor'>American Megatrends Inc.</entry><entry name='version'>0602</entry><entry name='date'>12/09/2014</entry><entry name='release'>4.6</entry></bios><system><entry name='manufacturer'>ASUS</entry><entry name='product'>All Series</entry><entry name='version'>System Version</entry><entry name='serial'>System Serial Number</entry><entry name='uuid'>2198b9a0-d7da-11dd-8b03-086266276416</entry><entry name='sku'>All</entry><entry name='family'>ASUS MB</entry></system><baseBoard><entry name='manufacturer'>ASUSTeK COMPUTER INC.</entry><entry name='product'>Z97-K R2.0</entry><entry name='version'>Rev X.0x</entry><entry name='serial'>141236867304293</entry><entry name='asset'>To be filled by O.E.M.</entry><entry name='location'>To be filled by O.E.M.</entry></baseBoard><chassis><entry name='manufacturer'>To Be Filled By O.E.M.</entry><entry name='version'>To Be Filled By O.E.M.</entry><entry name='serial'>To Be Filled By O.E.M.</entry><entry name='asset'>To Be Filled By O.E.M.</entry><entry name='sku'>To be filled by O.E.M.</entry></chassis><processor><entry name='socket_destination'>SOCKET 1150</entry><entry name='type'>Central Processor</entry><entry name='family'>Other</entry><entry name='manufacturer'>Intel</entry><entry name='version'>Intel(R) Xeon(R) CPU E3-1230 v3 @ 3.30GHz</entry><entry name='external_clock'>100 MHz</entry><entry name='max_speed'>3900 MHz</entry><entry name='status'>Populated, Enabled</entry><entry name='serial_number'>Not Specified</entry><entry name='part_number'>Fill By OEM</entry></processor><memory_device><entry name='size'>4096 MB</entry><entry name='form_factor'>DIMM</entry><entry name='locator'>DIMM_A1</entry><entry name='bank_locator'>BANK 0</entry><entry name='type'>DDR3</entry><entry name='type_detail'>Synchronous</entry><entry name='speed'>1600 MT/s</entry><entry name='manufacturer'>Kingston</entry><entry name='serial_number'>8A3A040F</entry><entry name='part_number'>99P5474-013.A00LF</entry></memory_device><memory_device><entry name='size'>8192 MB</entry><entry name='form_factor'>DIMM</entry><entry name='locator'>DIMM_A2</entry><entry name='bank_locator'>BANK 1</entry><entry name='type'>DDR3</entry><entry name='type_detail'>Synchronous</entry><entry name='speed'>1600 MT/s</entry><entry name='manufacturer'>0622</entry><entry name='serial_number'>00000000</entry><entry name='part_number'>DDR3-1600 CL11 8GB</entry></memory_device><memory_device><entry name='size'>4096 MB</entry><entry name='form_factor'>DIMM</entry><entry name='locator'>DIMM_B1</entry><entry name='bank_locator'>BANK 2</entry><entry name='type'>DDR3</entry><entry name='type_detail'>Synchronous</entry><entry name='speed'>1600 MT/s</entry><entry name='manufacturer'>Kingston</entry><entry name='serial_number'>853A080F</entry><entry name='part_number'>99P5474-013.A00LF</entry></memory_device>
</sysinfo>
4.1.5 capabilities
virsh capabilities 以XML文件格式显示当前虚拟环境的性能参数
[root@localhost ~] virsh capabilities
<capabilities><host> <uuid>2198b9a0-d7da-11dd-8b03-086266276416</uuid> <cpu> <arch>x86_64</arch><model>Haswell-noTSX-IBRS</model><vendor>Intel</vendor><microcode version='39'/><counter name='tsc' frequency='3298088000' scaling='no'/><topology sockets='1' cores='4' threads='2'/><feature name='vme'/><feature name='ds'/><feature name='acpi'/><feature name='ss'/><feature name='ht'/><feature name='tm'/><feature name='pbe'/><feature name='dtes64'/><feature name='monitor'/><feature name='ds_cpl'/><feature name='vmx'/><feature name='smx'/><feature name='est'/><feature name='tm2'/><feature name='xtpr'/><feature name='pdcm'/><feature name='osxsave'/><feature name='f16c'/><feature name='rdrand'/><feature name='arat'/><feature name='tsc_adjust'/><feature name='md-clear'/><feature name='stibp'/><feature name='ssbd'/><feature name='xsaveopt'/><feature name='pdpe1gb'/><feature name='abm'/><feature name='invtsc'/><pages unit='KiB' size='4'/><pages unit='KiB' size='2048'/><pages unit='KiB' size='1048576'/></cpu><power_management> <suspend_mem/><suspend_disk/><suspend_hybrid/></power_management><iommu support='no'/><migration_features> <live/><uri_transports><uri_transport>tcp</uri_transport><uri_transport>rdma</uri_transport></uri_transports></migration_features><topology> <cells num='1'><cell id='0'><memory unit='KiB'>24464364</memory><pages unit='KiB' size='4'>6116091</pages><pages unit='KiB' size='2048'>0</pages><pages unit='KiB' size='1048576'>0</pages><distances><sibling id='0' value='10'/></distances><cpus num='8'><cpu id='0' socket_id='0' core_id='0' siblings='0,4'/><cpu id='1' socket_id='0' core_id='1' siblings='1,5'/><cpu id='2' socket_id='0' core_id='2' siblings='2,6'/><cpu id='3' socket_id='0' core_id='3' siblings='3,7'/><cpu id='4' socket_id='0' core_id='0' siblings='0,4'/><cpu id='5' socket_id='0' core_id='1' siblings='1,5'/><cpu id='6' socket_id='0' core_id='2' siblings='2,6'/><cpu id='7' socket_id='0' core_id='3' siblings='3,7'/></cpus></cell></cells></topology><cache><bank id='0' level='3' type='both' size='8' unit='MiB' cpus='0-7'/></cache><secmodel> <model>none</model><doi>0</doi></secmodel><secmodel><model>dac</model><doi>0</doi><baselabel type='kvm'>+107:+107</baselabel><baselabel type='qemu'>+107:+107</baselabel></secmodel></host><guest><os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/libexec/qemu-kvm</emulator><machine maxCpus='240'>pc-i440fx-rhel7.0.0</machine><machine canonical='pc-i440fx-rhel7.0.0' maxCpus='240'>pc</machine> <machine maxCpus='240'>rhel6.0.0</machine><machine maxCpus='240'>rhel6.1.0</machine><machine maxCpus='240'>rhel6.2.0</machine><machine maxCpus='240'>rhel6.3.0</machine><machine maxCpus='240'>rhel6.4.0</machine><machine maxCpus='240'>rhel6.5.0</machine><machine maxCpus='240'>rhel6.6.0</machine><domain type='qemu'/> <domain type='kvm'><emulator>/usr/libexec/qemu-kvm</emulator></domain></arch><features><cpuselection/><deviceboot/><disksnapshot default='off' toggle='no'/><acpi default='on' toggle='yes'/><apic default='on' toggle='no'/><pae/><nonpae/></features></guest><guest><os_type>hvm</os_type><arch name='x86_64'><wordsize>64</wordsize><emulator>/usr/libexec/qemu-kvm</emulator><machine maxCpus='240'>pc-i440fx-rhel7.0.0</machine><machine canonical='pc-i440fx-rhel7.0.0' maxCpus='240'>pc</machine><machine maxCpus='240'>rhel6.0.0</machine><machine maxCpus='240'>rhel6.1.0</machine><machine maxCpus='240'>rhel6.2.0</machine><machine maxCpus='240'>rhel6.3.0</machine><machine maxCpus='240'>rhel6.4.0</machine><machine maxCpus='240'>rhel6.5.0</machine><machine maxCpus='240'>rhel6.6.0</machine><domain type='qemu'/><domain type='kvm'><emulator>/usr/libexec/qemu-kvm</emulator></domain></arch><features><cpuselection/><deviceboot/><disksnapshot default='off' toggle='no'/><acpi default='on' toggle='yes'/><apic default='on' toggle='no'/></features></guest>
</capabilities>
4.2 capabilities XML文件解释
4.2.1 host(宿主机相关配置)
标签名 | 作用 | 父级标签 |
---|---|---|
host | 宿主机相关功能元素 | 顶级标签 |
guest | 来宾相关功能元素 | 顶级标签 |
uuid | 表明宿主机的UUID | host |
cpu | 主机CPU的体系结构和功能 | host |
power_management | 主机是否能够进行内存挂起"suspend_mem",磁盘休眠"suspend_disk"或混合挂起"suspend_hybrid" | host |
migration | 公开有关虚拟机管理程序迁移功能的信息 | host |
topology | 该元素体现了主机内部拓扑。例如,由于减少了NUMA之间的节点传输,管理应用程序可能希望在组织新的来宾时学习此信息 | host |
secmodel | 要找出不同安全模型的默认安全标签,您需要解析此元素。与以前的元素相比,对于libvirt守护程序当前支持的每个安全模型,都重复此操作。 | host |
arch | 操作系统架构类型,x86_64、i386、i486、i586、alpha、sparc、arm、m68k、mips、ppc、i686等 | cpu |
model | qemu中cpu虚拟化支持的类型,如果在迁移虚拟机过程中,遇到cpu虚拟化支持的类型不匹配会导致虚拟机无法正常启动 | cpu |
vendor | 生产所属公司 | cpu |
microcode | cpu 微代码版本号cpun必备的 详细请查阅 microcode | cpu |
counter | name=‘tsc’ frequency=‘3298088000’ scaling=‘no’ ,TSC代表是Time Stamp Counter,frequency代表最大计数值,scaling 详见TSC官方文档 | cpu |
topology | CPU拓扑及结构,常常以sockets='1’1、 cores=‘4’ threads=‘2’,sockets代表路,cores代表核,threads代表超线程数(单颗) | cpu |
feature | cpu支持的一些特性,通常有vme,ss,acpi等 | cpu |
cache | cpu缓存相关配置 | cpu |
pages | 内存页所支持的单位大小 | cpu |
iommu | 辅助虚拟化 vt-x PCI透传是否开启 | host |
suspend_mem | 内存挂机 | power_management |
suspend_disk | 硬盘休眠 | power_management |
suspend_hybrid | 混合挂起 | power_management |
live | 支持在线迁移 | migration_features |
uri_transports | 支持的迁移方式tcp,rdma | migration_features |
topology | 宿主机所有CPU及内存相关参数 | host |
cells | 实际CPU的数量 | topology |
memory | 宿主机内存总量 | topology |
pages | 内存页使用数 | topology |
distances | cpu 之间的NUMA之间访问内存的优先级 | cpus |
cpus | cpu 总数量 | cpus |
cpu | cpu核数绑定关系 | cpus |
cache | cpu缓存相关参数 | topology |
model | 支持的安全模式 | secmodel |
doi | 安全表示符 | secmodel |
4.2.2 guest(来宾相关配置)
标签名 | 作用 | 父级标签 |
---|---|---|
os_type | 管理程序能够运行哪种操作系统:xen、linux、xenpvh、hvm、exe | guest |
arch | 架构类型 | guest |
wordsize | CPU字的大小 | arch |
emulator | 仿真模拟器的位置 | arch |
machine | 机器类型,用于 域XML中os / type元素的机器属性。例如,Xen支持xenfvHVM,xenpvPV或xenpvhPVH。 | arch |
domain | 指定运行域所需的系统管理程序的类型 | arch |
features | 可选元素包含可与所描述类型的来宾一起使用的可能功能 | guest |
cpuselection | 如果存在此元素,则管理程序将在域定义中支持该元素,以对提供给来宾的CPU进行细粒度控制。从0.7.5开始 | features |
deviceboot | 如果存在此元素,则可以在设备内部使用该元素,而不是按类别使用较早的引导规范。从0.8.8开始 | features |
disksnapshot | 如果存在此元素,则default属性描述是否支持外部磁盘快照。如果不存在,可能仍支持外部快照,但是它需要尝试API并检查错误以确保确定。从1.2.3开始 | features |
acpi | 如果存在此元素,则default属性描述默认情况下管理程序是否向访客公开ACPI,并且toggle属性描述用户是否可以覆盖此默认值。从0.4.1开始 | features |
apic | 如果存在此元素,则该default属性描述默认情况下管理程序是否向访客公开APIC,并且该toggle属性描述用户是否可以覆盖此默认值。从0.4.1开始 | features |
ia64_be | 如果存在,则从0.4.1开始,IA64 guest虚拟机可以在大端模式下运行。 | features |
pae | 从0.4.1开始,如果存在,则32位guest 虚拟机可以使用PAE地址空间扩展。 | features |
nonpae | 如果存在,则从0.4.1开始,无需PAE即可运行32位guest 虚拟机。 | features |
4.3 sysinfo XML文件解释
标签名 | 作用 | 父级标签 |
---|---|---|
sysinfo | 设备信息,type=smbios 表示允许来宾主机使用和修改的信息 | 顶级 |
bios | bios信息 | sysinfo |
system | 系统信息 | sysinfo |
baseBoard | 主板信息 | sysinfo |
chassis | 机箱信息 | sysinfo |
processor | 处理器相关信息 | sysinfo |
memory_device | 内存相关信息 | sysinfo |
KVM虚拟化管理工具之virtsh(一)相关推荐
- KVM虚拟化管理工具之virtsh(三)
一.virsh常用命令介绍 1.1 domain工作域管理篇 虚拟机磁盘及网卡管理相关操作 virsh attach-disk 挂在磁盘(命令行挂载) 命令参数 说明 必须 –domain 需要操作虚 ...
- kvm虚拟化管理工具
kvm虚拟化管理工具 一.什么是云计算? 二.云计算的基础KVM虚拟化 三.安装kvm虚拟化管理工具 四.virsh虚拟机的日常操作(开关,挂起虚拟机,导配置文件,磁盘增容,转化磁盘格式等) 五.快照 ...
- CentOS7.7搭建KVM虚拟化管理工具WebvirtMgr
CentOS7.7搭建KVM虚拟化管理工具WebvirtMgr 概述 KVM(Kernel-based Virtual Machine),开源的系统虚拟化模块.出于成本,技术人员力量的原因,很多小型企 ...
- [原创]KVM虚拟化管理平台的实现
KVM虚拟化管理平台的实现 源码链接:https://github.com/wsjhk/IaaS_admin.git 视频演示链接:https://v.youku.com/v_show/id_XMjg ...
- 云原生—虚拟化管理工具virsh(三)
目录 virsh简介 工作模式 交互模式 非交互模式 连接方式 本地URI 远程URI 登入测试 常用命令 1.域管理的命令 2.宿主机和Hypervisor的管理命令 3.网络的管理命令 4.存储池 ...
- kvm虚拟化管理平台WebVirtMgr部署-完整记录(2)
继上一篇kvm虚拟化管理平台WebVirtMgr部署-完整记录(1),接下来说说WebVirtMgr的日常配置:添加宿主机,创建虚机,磁盘扩容,快照等 具体操作记录如下: 一.配置宿主机 1.登录We ...
- Linux学习日志_虚拟化管理工具
虚拟化管理工具 虚拟化的原因:机器进行计算的耗电量过大,虚拟化可大大降低企业耗电量 (虚拟化时在内核中并行的操作) 关键性文件: cat /proc/cpuinfo | grep -E " ...
- KVM 虚拟化管理平台 VManagePlatform
VManagePlatform 是什么? 一个KVM虚拟化管理平台 开发语言与框架: 编程语言:Python2.7 + HTML + JScripts 前端Web框架:Bootstrap 后端Web框 ...
- centos7.2 kvm虚拟化管理平台WebVirtMgr部署
WebVirtMgr采用几乎纯Python开发,其前端是基于Python的Django,后端是基于Libvirt的Python接口,将日常kvm的管理操作变的更加的可视化. WebVirtMgr特点: ...
最新文章
- 精通python爬虫框架-精通Python爬虫从Scrapy到移动应用(文末福利)
- 使用 Android NDK 的交叉编译工具链移植 C/C++ 项目到安卓平台
- CXF+Spring+Tomcat简明示例
- IOS-RunTime(刨根问底)
- Redis与MySQL双写一致性如何保证
- mybatis foreach collection
- openwrt 运行程序时提示缺少libstdc++.so.6
- 数字图像处理--图像旋转变换的推导
- EFI模式下安装win8.1系统
- 什么使软件程序员成为专业人士?
- 如何实现伸缩 (折叠) 报表?
- android实现新闻内容显示功能,如何用Android studio开发一个实现基本功能的新闻app?——简闻(源码及教程)...
- Win10上注册OCX文件
- 怎么在WPS计算机,电脑怎么把wps热点删了?电脑永久删除wps热点的方法
- 实际波动率与隐含波动率的计算 python
- word 参考文献插入整理
- 【LeetCode】马三来刷题之Valid Anagram
- Python玫瑰花绘制
- Android接入讯飞sdk使用,遇到的问题和解决
- App开发智能车载之SDK篇
热门文章
- 【Code Pratice】—— 第几天、K倍区间、煤球数量
- 扣丁学堂笔记第22天多媒体播放
- 10个实用的但偏执的Java编程技术-扣丁学堂
- python 调用event handler_扣丁学堂Python开发之调用语音模块时报错及解决方法
- GAME OVER!
- react实现div隐藏_React 点击按钮显示div与隐藏div
- 学习淘淘商城第八十七课(单点登录用户登录流程分析及用户登录Service层)
- 利用 Termux 配合 ksweb 进行内网穿透
- 基于ISO26262的功能安全 学习笔记2
- Archlinux 命令行模式-安装 BIOS 非 UEFI(实装笔记)