RaSca
2010-Nov-04 11:53 UTC
[libvirt-users] Problem booting Microsoft Windows KVM virtual machine
Hi all, I'm having problems with a vm's startup, I cloned the entire disk of a Windows 2000 with dd on a drbd device, that disk was configured with two partitions. I'm able to see all the partitions contents by using kpartx and mount them: # kpartx -l /dev/drbd0 drbd0p1 : 0 202751488 /dev/drbd0 32 drbd0p2 : 0 285567360 /dev/drbd0 202751520 The problem is that when i try to startup the vm with virsh it hangs on boot by saying "error on operating system load". Here are the details and the vm conf: # cat /etc/libvirt/qemu/vm-sophos.xml <domain type='kvm'> <name>vm-sophos</name> <uuid>213a464c-73ad-8122-3647-7ff6b78d9e07</uuid> <memory>262144</memory> <currentMemory>262144</currentMemory> <vcpu>1</vcpu> <os> <type arch='i686' machine='pc-0.12'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/dev/drbd0'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' 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:15:0d:68'/> <source bridge='br0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/> <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> Note that I've tried to change "source file" parameter with /dev/dm-0p1, /dev/drbd0p1, but virsh don't let me boot the machine saying it is unable to find the disk. The kvm command launched by virsh is this one: /usr/bin/kvm -S -M pc-0.12 -cpu qemu32 -enable-kvm -m 256 -smp 1,sockets=1,cores=1,threads=1 -name vm-sophos -uuid 213a464c-73ad-8122-3647-7ff6b78d9e07 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/vm-sophos.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot dc -drive file=/dev/drbd0,if=none,id=drive-ide0-0-0,boot=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device rtl8139,vlan=0,id=net0,mac=52:54:00:15:0d:68,bus=pci.0,addr=0x3 -net tap,fd=44,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 0.0.0.0:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 I'd also followed the steps described here: http://www.brandonturner.net/blog/2010/01/convert-windows-to-xen-guest/ to use fixmbr and the operation succeed, but the error on the vm is still the same. What should else i check? -- Raoul Scarazzini Mia Mamma Usa Linux: Niente ? impossibile da capire, se lo spieghi bene! mobile: +393281776712 rasca at miamammausalinux.org http://www.miamammausalinux.org