[root@opennebula qemu]# pwd
/etc/libvirt/qemu
[root@opennebula qemu]# ls
networks one-12.xml one-12.xml_bak one-13.xml one-14.xml one-2.xml one-5.xml one-6.xml one-7.xml one-8.xml one-9.xml
[root@opennebula qemu]# virsh dumpxml one-14
<domain type='kvm' id='20'> /*定义类型为kvm和虚拟机ID*/
<name>one-14</name> /*虚拟机名称*/
<uuid>9bde61c4-7d43-dcca-5da6-0be1bf9285d9</uuid> /*uuid由系统自动生成,uuid唯一*/
<memory unit='KiB'>1048576</memory> /*为虚拟机分配的最大内存量*/
<currentMemory unit='KiB'>1048576</currentMemory> /*虚拟机可使用的内存配额,不得大于虚拟机的最大内存量*/
<vcpu placement='static'>4</vcpu> /*为虚拟机分配的VCPU数量*/
<cputune>
<shares>205</shares> /*为虚拟机分配的CPU配额,该值为VCPU占用时间片的量,最小为12(1%)最大为1024(100%)*/
</cputune>
<os>
<type arch='x86_64' machine='rhel6.4.0'>hvm</type> /*虚拟机架构(x86_64orX86_i686),宿主机操作系统*/
<boot dev='hd'/> /*启动设备,可以为多个*/
</os>
<features>
<acpi/> /*处理器特性*/
</features>
<clock offset='utc'/> /*时钟,虚拟机使用UTC时钟*/
<on_poweroff>destroy</on_poweroff> /*关闭虚拟机*/
<on_reboot>restart</on_reboot> /*重启虚拟机*/
<on_crash>destroy</on_crash>
<devices> /*开始定义设备*/
<emulator>/usr/bin/kvm</emulator> /*虚拟机调用的kvm程序*/
<disk type='file' device='disk'> /*加载磁盘*/
<driver name='qemu' type='qcow2'/> /**/
<source file='/srv/cloud/one/var//datastores/0/14/disk.0'/> /*加载第一个磁盘*/
<target dev='hda' bus='virtio'/> /*硬盘驱动器使用virtio驱动*/
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> /*硬盘使用virtio驱动后识别为pci总线*/
</disk>
<disk type='file' device='cdrom'> /*加载光驱*/
<driver name='qemu' type='raw'/>
<source file='/srv/cloud/one/var//datastores/win2k3.iso'/>
<target dev='hdb' bus='ide'/>
<readonly/> /*光驱为只读*/
<address type='drive' controller='0' bus='0' unit='1'/>
</disk>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'> /*网络接口类型为桥接*/
<mac address='02:00:c0:a8:64:a0'/> /*MAC地址*/
<source bridge='vSwitch'/> /*桥接的网卡*/
<model type='virtio'/> /*使用virtio模式,网卡工作速率为1000M*/
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface> /*鼠标类型*/
<input type='mouse' bus='usb'>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5914' autoport='no' listen='0.0.0.0' passwd='123456'> /*VNC连接配置*/
<listen type='address' address='0.0.0.0'/>
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</memballoon>
</devices>
<seclabel type='none'/>
</domain>
[root@opennebula qemu]#
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2020-11-12 关于MongoDB副本集和分片集群有关用户和权限的说明分析
2020-11-12 MongoDB 副本集的用户和权限一般操作步骤
2020-11-12 MongoDB 分片集群的用户和权限一般操作步骤
2020-11-12 MongoDB分片集群-Sharded Cluster
2020-11-12 Compass- 图形化界面客户端
2020-11-12 MongoDB分片集群中配置参数说明
2020-11-12 MongoDB一主一副本一仲裁搭建步骤