public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: RaSca <rasca@miamammausalinux.org>
To: kvm@vger.kernel.org
Subject: Problem booting Microsoft Windows KVM virtual machine
Date: Thu, 04 Nov 2010 12:55:42 +0100	[thread overview]
Message-ID: <4CD29F3E.2000407@miamammausalinux.org> (raw)

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

             reply	other threads:[~2010-11-04 12:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04 11:55 RaSca [this message]
2010-11-04 13:04 ` Problem booting Microsoft Windows KVM virtual machine Martin Maurer
2010-11-11 20:53   ` RaSca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CD29F3E.2000407@miamammausalinux.org \
    --to=rasca@miamammausalinux.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox