public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Problem booting Microsoft Windows KVM virtual machine
@ 2010-11-04 11:55 RaSca
  2010-11-04 13:04 ` Martin Maurer
  0 siblings, 1 reply; 3+ messages in thread
From: RaSca @ 2010-11-04 11:55 UTC (permalink / raw)
  To: kvm

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@miamammausalinux.org
http://www.miamammausalinux.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Problem booting Microsoft Windows KVM virtual machine
  2010-11-04 11:55 Problem booting Microsoft Windows KVM virtual machine RaSca
@ 2010-11-04 13:04 ` Martin Maurer
  2010-11-11 20:53   ` RaSca
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Maurer @ 2010-11-04 13:04 UTC (permalink / raw)
  To: kvm@vger.kernel.org; +Cc: rasca@miamammausalinux.org

Hi,

Before you begin, prepare the running w2k to use ide disk (and boot on KVM with ide disks)
For w2k I followed this link (solution 2 worked for me): http://www.motherboard.windowsreinstall.com/problems.htm

And I am using clonezilla live cd´s to do cloning jobs, for me this is a fast and convenient way.
Also, take a look on our http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE, including some hints for several sceanrios.

Br, Martin

> -----Original Message-----
> From: kvm-owner@vger.kernel.org [mailto:kvm-owner@vger.kernel.org]
> On Behalf Of RaSca
> Sent: Donnerstag, 04. November 2010 12:56
> To: kvm@vger.kernel.org
> Subject: 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@miamammausalinux.org
> http://www.miamammausalinux.org
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in the body of
> a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem booting Microsoft Windows KVM virtual machine
  2010-11-04 13:04 ` Martin Maurer
@ 2010-11-11 20:53   ` RaSca
  0 siblings, 0 replies; 3+ messages in thread
From: RaSca @ 2010-11-11 20:53 UTC (permalink / raw)
  To: Martin Maurer; +Cc: kvm@vger.kernel.org

Il giorno Gio 04 Nov 2010 14:04:59 CET, Martin Maurer ha scritto:
> Hi,
> Before you begin, prepare the running w2k to use ide disk (and boot on KVM with ide disks)
> For w2k I followed this link (solution 2 worked for me): http://www.motherboard.windowsreinstall.com/problems.htm
> And I am using clonezilla live cd´s to do cloning jobs, for me this is a fast and convenient way.
> Also, take a look on our http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE, including some hints for several sceanrios.
> Br, Martin

Hi Martin,
I can finally confirm that the solution 2 of the link you gave me worked 
for me too!
I followed those indications before creating a vmdk with vmware 
converter, then I converted the vmdk in a raw image with "qemu-img 
convert" and finally doing a dd in the drbd device done the trick!

Still remains the fact that doing P2V with Win2k is some kind of wild 
horse (for example if you use the vmvga video driver it freezes), but 
you give me a big hand. So thank you very much!

-- 
Raoul Scarazzini
Mia Mamma Usa Linux: Niente è impossibile da capire, se lo spieghi bene!
rasca@miamammausalinux.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-11 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04 11:55 Problem booting Microsoft Windows KVM virtual machine RaSca
2010-11-04 13:04 ` Martin Maurer
2010-11-11 20:53   ` RaSca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox