LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 11-01-2010, 11:46 AM   #1
Savaan
LQ Newbie
 
Registered: Oct 2010
Posts: 8

Rep: Reputation: Disabled
Converting Xen RAW image to KVM qcow2 makes Win2k8 guest BSOD


I recently got a Xen server running on CentOS 5.5 with GPLPV drivers but now I would like to migrate to KVM and would rather not have to rebuild the guest OS. My image works great when using the Xen. I used a similar procedure to move a CentOS guest and that guest came up with no problems at all. It's just the Windows guest that is causing me grief.

I removed the GPLPV drivers and disabled Windows Test Mode then shutdown the guest. After I convert the image to qcow2 and create the QEMU guest windows boots to the Boot Menu but I cant get much further. Safe Mode and other selections dont seem to help. No mater what I select it boots Windows Server 2008 to System Recovery Options GUI. It then will give a DRIVER_IRQ_NOT_LESS_OR_EQUAL blue screen at some random point in the recovery gui.

Host info is:
CentOS 5.5 Linux 2.6.18-194.17.4.el5 #1 SMP x86_64
kvm-tools-83-164.el5_5.21
kvm-83-164.el5_5.21
kvm-qemu-img-83-164.el5_5.21
libvirt-0.6.3-33.el5_5.3
libvirt-0.6.3-33.el5_5.3
libvirt-python-0.6.3-33.el5_5.3
virt-manager-0.6.1-12.el5
virt-viewer-0.0.2-3.el5

The guest is Windows Server Enterprise 2008 x64 with all current windows updates applied.


Command used to convert the raw image to qcow2.
# qemu-img convert /var/lib/xen/images/ws4.img -O qcow2 /var/lib/libvirt/images/ws4.img

Command used to create the guest.
# virt-install qemu:///system -n ws4 -r 1024 --vcpus=2 --os-type=windows --os-variant=win2k8 --disk path=/var/lib/libvirt/imag
es/ws4.img --import

My /etc/libvirt/qemu/ws4.xml to after adding a display.
Code:
<domain type='qemu'>
  <name>ws4</name>
  <uuid>b01bde5c-969d-95ad-4383-321c17abcc33</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='rhel5.4.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' cache='none'/>
      <source file='/var/lib/libvirt/images/ws4.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='network'>
      <mac address='54:52:00:67:b2:84'/>
      <source network='default'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/5'/>
      <target port='0'/>
    </serial>
    <console type='pty' tty='/dev/pts/5'>
      <source path='/dev/pts/5'/>
      <target port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='sdl' display=':1.0' xauth='/root/.Xauthority'/>
  </devices>
</domain>


Any suggestions would be greatly appreciated. Thanks
 
Old 12-20-2011, 03:57 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
Did you get this to work?
 
Old 12-21-2011, 09:10 AM   #3
Savaan
LQ Newbie
 
Registered: Oct 2010
Posts: 8

Original Poster
Rep: Reputation: Disabled
I don't believe I did. It was over a year ago and I don't recall exactly. I believe I had to reload the Windows OS from scratch on KVM to resolve this.
 
Old 12-24-2011, 05:20 AM   #4
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 827

Rep: Reputation: 91
Why didn't you use virt-v2v for this?

The BSOD is there because your windows VM is expecting the same disk controller as Xen was presenting, while KVM uses another controller. virt-v2v solves this issue by editing the image and replacing the controller driver before the VM is started under KVM.

You could do that manually, but it will require some registry hacking
 
1 members found this post helpful.
Old 12-24-2011, 07:03 AM   #5
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
Quote:
Originally Posted by dyasny View Post
virt-v2v solves this issue by editing the image and replacing the controller driver before the VM is started under KVM.
Ah! I'm hoping this may solve my problem too.

But oh, good grief. I'm just now installing virt-v2v, and yum is pulling in 26 other packages, including libvirt itself.

I didn't plan to use libvirt. I'm not a fan of automation when the automation makes my decisions for me. I like to start, control and stop my virtual machines and most everything else with custom scripts that I write to do the limited subset of things that I need to do in the way I want to do it.

I hope I can convince virt-v2v to just do the conversion and leave me alone. Do you know if that's an option?
 
Old 12-24-2011, 08:44 AM   #6
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 827

Rep: Reputation: 91
it definitely is, though I do not share your dislike for management frameworks
 
Old 12-28-2011, 04:35 PM   #7
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
Quote:
Originally Posted by KenJackson View Post
I hope I can convince virt-v2v to just do the conversion and leave me alone. Do you know if that's an option?
Quote:
Originally Posted by dyasny View Post
it definitely is, ...
I don't think virt-v2v is goint to work.

I want to specify a disk image and let it modify it. But it wants either a libvirt or libvirtxml input method. I don't have any method. I just have a disk image.

It also allows specifiying -ic URI for an input connection. But my disk image is just a file.

Am I missing something?
How can I just modify my VirtualBox disk image to boot under KVM?
 
Old 12-29-2011, 01:04 PM   #8
Savaan
LQ Newbie
 
Registered: Oct 2010
Posts: 8

Original Poster
Rep: Reputation: Disabled
virt-v2v isnt used with VirtualBox from what I have read. It's the wrong tool for you.

Is your virtualbox disk already converted to a raw image file format? If not here is a example,
$ VBoxManage clonehd --format RAW TestVM.vdi TestVM.raw
Then just create a new VM (since you dont have any previous config for your drive image) using VirtManager or 'virsh create' command and attach your new TestVM.raw as your hard drive.

If you get a BSOD because of the controller at this point then I dont have an answer. I personally would reload the OS on a fresh VM guest with a fresh disk. Then attach the old VirtualBox image as a secondary drive such as D: and copy the necessary data from it. I found that even when images import correctly you have to reactivate Windows Server anyway. I assume this is because the CPU type changes but that's just a guess.

In regards to the -ic URL question. It's the Xen source URL. Since you dont have Xen up and running you cant enter anything in here. Like I said above you probably just need to create a new VM guest.
 
Old 12-31-2011, 09:51 AM   #9
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
Quote:
Originally Posted by Savaan View Post
Like I said above you probably just need to create a new VM guest.
Just

I fear you are right, but the whole point of this exercise is to avoid that.

A new VM means a fresh install of Windows. That's hassle enough, but worse, it means reactivation. That means begging Microsoft for permission to continue using the same instance of Windows I've been using right along without paying for a new license.

I sure hope ReactOS gets good enough to handle the few things I need Windows for. I've actually donated money toward that end.
 
Old 12-31-2011, 11:59 AM   #10
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 827

Rep: Reputation: 91
right. virt-v2v does not support working with an image, it is designed to move VMs from ESXi and Xen, enterprise level virtualization, not a small desktop kind of thing. I did mention it though, because it is the only product that knows how to do this and is open. Since it is open, there's nothing to stop you from reviewing the code and extending the tool to be able to deal with vbox or standalone images, the major part of the work is already done after all
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
KVM and Windows 7 BSOD mickeyboa Linux - Virtualization and Cloud 7 05-10-2010 03:02 PM
KVM: Mouse under Windows Guest performs way better than under Centos Guest martdj Linux - Virtualization and Cloud 3 03-29-2010 04:20 AM
XP Guest on Xen switch to KVM marinl Linux - Software 1 06-15-2009 11:25 AM
LXer: Xen: How to Convert An Image-Based Guest To An LVM-Based Guest LXer Syndicated Linux News 0 04-19-2009 04:00 PM
How to run RHEL 4 as guest in Xen(SLES 10 XEN) darshanbv Linux - Software 1 06-26-2006 11:21 AM


All times are GMT -5. The time now is 05:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration