Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
VBox->kvm migration fails on boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sat Sep 20, 2014 6:26 pm    Post subject: VBox->kvm migration fails on boot Reply with quote

Greetings,

I have windows 7 pro installed ad running on VirtualBox, following a bug in the current version, I've decided to migrate that vm to kvm, first I converted it to a valid format with the following cmd:
Code:
VBoxManage clonehd --format raw ../VirtualBox/Windows/Windows.vmdk Windows7_Pro.img && qemu-img convert -f raw Windows7_Pro.img -O qcow2 Windows7_Pro.qcow2


then I've created this xml file and loaded it into virsh:
Code:
<domain type='kvm'>
  <name>Windows7_Pro</name>
  <uuid>eb21ef97-3c2a-4f15-9395-9e25ba108a87</uuid>
  <memory unit='GiB'>8</memory>
  <currentMemory unit='GiB'>8</currentMemory>
  <vcpu>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/virt_admin/Machines/kvm/Windows7_Pro.qcow2'/>
      <target dev='hdc' bus='ide'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source dev='/mnt/storage/imgs/Win7_HP.iso'/>
      <target dev='hdd' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' autoport='yes'/>
    <sound model='ac97'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>


system starts to boot and then gets bsod, trying to repair it with installation cd shows the hd but it gets stuck when trying to repair it.
moving to virtio doesn't even shows the hd.

how can I solve it?

Thanks.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Sat Sep 20, 2014 6:52 pm    Post subject: Reply with quote

It sounds like you need to find a device driver model that both vbox and kvm support at the same time. I've never done vbox so I don't know what it uses. KVM can look like certain common IDE, SATA and SCSI disk controllers depending on what you pick. To get virtio up and running, you need to trick Windows into installing the driver first by adding a second virtual disk as virtio while keeping the system drive under the working emulation driver. Do the usual tap dance with hardware detection wizard followed by reboot with the new drive D. Then shutdown and move the system drive under virtio and optionally remove the D drive. The next boot should have it detect the controller change and install virtio driver for the system drive (of course followed by yet another reboot).

I doubt you will be able to get anywhere by trying to boot in one of the safe modes. Windows is so brittle about having the hardware changed out from underneath an installed system.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sat Sep 20, 2014 7:03 pm    Post subject: Reply with quote

vaxbrat wrote:
It sounds like you need to find a device driver model that both vbox and kvm support at the same time. I've never done vbox so I don't know what it uses. KVM can look like certain common IDE, SATA and SCSI disk controllers depending on what you pick. To get virtio up and running, you need to trick Windows into installing the driver first by adding a second virtual disk as virtio while keeping the system drive under the working emulation driver. Do the usual tap dance with hardware detection wizard followed by reboot with the new drive D. Then shutdown and move the system drive under virtio and optionally remove the D drive. The next boot should have it detect the controller change and install virtio driver for the system drive (of course followed by yet another reboot).

I doubt you will be able to get anywhere by trying to boot in one of the safe modes. Windows is so brittle about having the hardware changed out from underneath an installed system.

my goal in this boot was to be able to boot windows to install the virtio drivers and then switch to virtio.
I'll look at the driver model and see if it can be the issue, thanks.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sat Sep 20, 2014 7:11 pm    Post subject: Reply with quote

Ok, I've took a look, VBox labels the type as SATA controller, thats it.

I don't think I can change it much from here
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum