Jump to content

Convert vdisk to vhdx


danger781

Recommended Posts

Hello,

 

I have a VM running on my server that I was hoping to move to Hyper-V on my desktop (Better performance, server is dual core). To do this I converted the vdisk to vhdx via  the command qemu-img convert vdisk_copy.img -O vhdx -o subformat=dynamic win7.vhdx

 

The conversion process seemed to work fine and I created the VM in Hyper-V Manager without problems. However, when I boot the VM all I'm getting is a black screen with a blinking cursor.

 

So I guess my question is - What did I do wrong? Or is this not possible?

Link to comment

Hello,

 

I have a VM running on my server that I was hoping to move to Hyper-V on my desktop (Better performance, server is dual core). To do this I converted the vdisk to vhdx via  the command qemu-img convert vdisk_copy.img -O vhdx -o subformat=dynamic win7.vhdx

 

The conversion process seemed to work fine and I created the VM in Hyper-V Manager without problems. However, when I boot the VM all I'm getting is a black screen with a blinking cursor.

 

So I guess my question is - What did I do wrong? Or is this not possible?

 

Well, the VM (if a Windows VM) is expecting to boot off a virtual storage controller / disk using VirtIO drivers.  What you need to actually do here will require some XML editing.  First edit your VM's XML and for the <disk> for your OS, find the dev= and bus= part.  Set dev=hda and bus=ide.  Save and boot up Windows.  When done, then shut down Windows and now go to convert your .img file the way you did.  That should do the trick, but I honestly don't know because getting VMs off unRAID on to Hyper-V isn't something we support nor have experience with.  Maybe some others here can give other advice, but what I suggested above should do the trick.

Link to comment

Hello,

 

I have a VM running on my server that I was hoping to move to Hyper-V on my desktop (Better performance, server is dual core). To do this I converted the vdisk to vhdx via  the command qemu-img convert vdisk_copy.img -O vhdx -o subformat=dynamic win7.vhdx

 

The conversion process seemed to work fine and I created the VM in Hyper-V Manager without problems. However, when I boot the VM all I'm getting is a black screen with a blinking cursor.

 

So I guess my question is - What did I do wrong? Or is this not possible?

 

Well, the VM (if a Windows VM) is expecting to boot off a virtual storage controller / disk using VirtIO drivers.  What you need to actually do here will require some XML editing.  First edit your VM's XML and for the <disk> for your OS, find the dev= and bus= part.  Set dev=hda and bus=ide.  Save and boot up Windows.  When done, then shut down Windows and now go to convert your .img file the way you did.  That should do the trick, but I honestly don't know because getting VMs off unRAID on to Hyper-V isn't something we support nor have experience with.  Maybe some others here can give other advice, but what I suggested above should do the trick.

 

Hey John, I didn't actually move the VM over - just the vdisk. I created a new VM within Hyper-v and assigned the disk to it. I mean if it comes to it I can start from scratch but that is just time consuming. I'll keep playing around with it for now.

 

Thanks!

Link to comment

Hello,

 

I have a VM running on my server that I was hoping to move to Hyper-V on my desktop (Better performance, server is dual core). To do this I converted the vdisk to vhdx via  the command qemu-img convert vdisk_copy.img -O vhdx -o subformat=dynamic win7.vhdx

 

The conversion process seemed to work fine and I created the VM in Hyper-V Manager without problems. However, when I boot the VM all I'm getting is a black screen with a blinking cursor.

 

So I guess my question is - What did I do wrong? Or is this not possible?

 

Well, the VM (if a Windows VM) is expecting to boot off a virtual storage controller / disk using VirtIO drivers.  What you need to actually do here will require some XML editing.  First edit your VM's XML and for the <disk> for your OS, find the dev= and bus= part.  Set dev=hda and bus=ide.  Save and boot up Windows.  When done, then shut down Windows and now go to convert your .img file the way you did.  That should do the trick, but I honestly don't know because getting VMs off unRAID on to Hyper-V isn't something we support nor have experience with.  Maybe some others here can give other advice, but what I suggested above should do the trick.

 

Hey John, I didn't actually move the VM over - just the vdisk. I created a new VM within Hyper-v and assigned the disk to it. I mean if it comes to it I can start from scratch but that is just time consuming. I'll keep playing around with it for now.

 

Thanks!

Does the vdisk we are talking have Windows installed on it from when it was running on unRAID under KVM?

Link to comment

Hello,

 

I have a VM running on my server that I was hoping to move to Hyper-V on my desktop (Better performance, server is dual core). To do this I converted the vdisk to vhdx via  the command qemu-img convert vdisk_copy.img -O vhdx -o subformat=dynamic win7.vhdx

 

The conversion process seemed to work fine and I created the VM in Hyper-V Manager without problems. However, when I boot the VM all I'm getting is a black screen with a blinking cursor.

 

So I guess my question is - What did I do wrong? Or is this not possible?

 

Well, the VM (if a Windows VM) is expecting to boot off a virtual storage controller / disk using VirtIO drivers.  What you need to actually do here will require some XML editing.  First edit your VM's XML and for the <disk> for your OS, find the dev= and bus= part.  Set dev=hda and bus=ide.  Save and boot up Windows.  When done, then shut down Windows and now go to convert your .img file the way you did.  That should do the trick, but I honestly don't know because getting VMs off unRAID on to Hyper-V isn't something we support nor have experience with.  Maybe some others here can give other advice, but what I suggested above should do the trick.

 

Hey John, I didn't actually move the VM over - just the vdisk. I created a new VM within Hyper-v and assigned the disk to it. I mean if it comes to it I can start from scratch but that is just time consuming. I'll keep playing around with it for now.

 

Thanks!

Does the vdisk we are talking have Windows installed on it from when it was running on unRAID under KVM?

 

Yes

Link to comment

Hello,

 

I have a VM running on my server that I was hoping to move to Hyper-V on my desktop (Better performance, server is dual core). To do this I converted the vdisk to vhdx via  the command qemu-img convert vdisk_copy.img -O vhdx -o subformat=dynamic win7.vhdx

 

The conversion process seemed to work fine and I created the VM in Hyper-V Manager without problems. However, when I boot the VM all I'm getting is a black screen with a blinking cursor.

 

So I guess my question is - What did I do wrong? Or is this not possible?

 

Well, the VM (if a Windows VM) is expecting to boot off a virtual storage controller / disk using VirtIO drivers.  What you need to actually do here will require some XML editing.  First edit your VM's XML and for the <disk> for your OS, find the dev= and bus= part.  Set dev=hda and bus=ide.  Save and boot up Windows.  When done, then shut down Windows and now go to convert your .img file the way you did.  That should do the trick, but I honestly don't know because getting VMs off unRAID on to Hyper-V isn't something we support nor have experience with.  Maybe some others here can give other advice, but what I suggested above should do the trick.

 

Hey John, I didn't actually move the VM over - just the vdisk. I created a new VM within Hyper-v and assigned the disk to it. I mean if it comes to it I can start from scratch but that is just time consuming. I'll keep playing around with it for now.

 

Thanks!

Does the vdisk we are talking have Windows installed on it from when it was running on unRAID under KVM?

 

Yes

K, then my point still stands. Windows is booting up expecting the disk and controller to be using virtio which is not on hyper v. You need to first convert Windows to be ok with a generic storage device / controller on unRAID, then you can convert the image to vhdx format and run on hyper v.

Link to comment

I decided to start from scratch with a fresh windows 7 VM on a blank vhdx. Still no boot after install. The install completes successfully, reaches the 'Preparing your desktop' prompt and then instantly returns to 'Shutting down'. After that it's just a black screen with a blinking cursor. So rather than wasting time trying to get it working I just installed windows 8 instead using the same license key as my desktop. Not sure if this will cause problems or not, but I'm assuming it's okay..

 

Anyways problem solved! :)

Link to comment

I decided to start from scratch with a fresh windows 7 VM on a blank vhdx. Still no boot after install. The install completes successfully, reaches the 'Preparing your desktop' prompt and then instantly returns to 'Shutting down'. After that it's just a black screen with a blinking cursor. So rather than wasting time trying to get it working I just installed windows 8 instead using the same license key as my desktop. Not sure if this will cause problems or not, but I'm assuming it's okay..

 

Anyways problem solved! :)

 

Oh, so you're saying that just trying to set up a brand new Win7 VM on hyper-v wasn't working either?  Yeah, something not right there.  Just glad to hear the problem is solved!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...