我正在运行 CentOs 6,并且刚刚在 KVM 虚拟机管理器中安装了 Windows7,但是当启动 win7 虚拟机然后进入暂停模式时,我们的 win7 xml 文件的以下内容:
<domain type='kvm'>
<name>cqg.vm.bd</name>
<uuid>4edf3189-bebe-fd07-1374-581221186b99</uuid>
<memory>3072000</memory>
<currentMemory>3072000</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch='x86_64' machine='rhel6.2.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none' io='threads'/>
<source file='/gt/fsrvthis/virtual-servers-active/cqg.vm.bd/cqg.vm.bd-os.disk'/>
<target dev='hda' bus='virtio'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:f5:ff:01'/>
<source bridge='bridge1'/>
<model type='virtio' />
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<video>
<model type='vga' 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='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>
答案1
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none' io='threads'/>
<source file='/gt/fsrvthis/virtual-servers-active/cqg.vm.bd/cqg.vm.bd-os.disk'/>
<target dev='hda' bus='virtio'/>
</disk>
这应该是target dev='vda' bus='virtio'
检查 libvirt 日志,虚拟机设置为在 EIO 或 ENOSPACE 时暂停,因此如果虚拟机在读取或写入本地磁盘时遇到 IO 问题,它将暂停。如果空间不足,它也会暂停。