我将Ubuntu Server来宾机从Ubuntu服务器主机移动到CentOS 6主机。 我的意图是保持客人作为Ubuntu服务器,只是改变主机的操作系统。
我把逻辑卷和virsh XML定义移到了新的主机上。 当我第一次尝试使用virsh define ldap ,我得到了错误:
error: Failed to define domain from ldap.xml error: Cannot find QEMU binary /usr/bin/kvm: No such file or directory
所以我改变了
<emulator>/usr/bin/kvm</emulator>
至
<emulator>/usr/libexec/qemu-kvm</emulator>
在XML文件中,我可以定义机器。 我猜这就是CentOS的等价path。
当我尝试启动虚拟机虽然,我得到这个错误:
# virsh start ldap error: Failed to start domain ldap error: internal error process exited while connecting to monitor: Supported machines are: pc RHEL 6.2.0 PC (alias of rhel6.2.0) rhel6.2.0 RHEL 6.2.0 PC (default) rhel6.1.0 RHEL 6.1.0 PC rhel6.0.0 RHEL 6.0.0 PC rhel5.5.0 RHEL 5.5.0 PC rhel5.4.4 RHEL 5.4.4 PC rhel5.4.0 RHEL 5.4.0 PC
我不知道发生了什么…它是试图使用半虚拟化,而不是完全虚拟化? 或者我需要改变XML定义中的某些东西?
更新:
以下是来自virsh dumpxml ldap的完整XML定义:
<domain type='kvm'> <name>ldap</name> <uuid>d947ed8d-d8d1-8388-59ad-7f620b391af2</uuid> <memory>262144</memory> <currentMemory>262144</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-0.14'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/dev/mapper/mainvg-vm_ldap'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' unit='0'/> </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:8b:54:62'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'/> <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> </domain>
我想也许:
<type arch='x86_64' machine='pc-0.14'>hvm</type>
这条线是抱怨吗?
应该是:
<type arch='x86_64' machine='pc'>hvm</type>
? 所有的build议/允许的选项是RHEL,但它是一个Ubuntu机器。
机器确实启动了!
发布你现有的完整的XML定义。 错误是关于缺less机器定义,qemu-kvm的-M参数。