Ask Your Question
0

Can you convert directly from a VHDX HyperV vm to a qcow2?

asked 2015-07-22 13:25:20 -0500

Reay4Linux gravatar image

updated 2015-07-27 11:32:28 -0500

I have a hyper V environment with VHDX VM's mostly running W2012. The files are VHDX, not VHD like chapter 7 for open stack describes.
Which in short is talking about a conversion from VHD format not VHDX.

I need to convert several machines so I would like to reduce the number of steps I have to go through to convert the VM's.

On a side note, I've converted some W2K3 OS to KVM and used only 3 drivers, but W2012 has 5 drivers, do I need to install them all?

Thanks for your help

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2015-08-02 19:26:37 -0500

alexpilotti gravatar image

updated 2015-08-02 19:29:12 -0500

The VHDX support available in qemu-img versions that you can find in most Linux distributions is often incomplete.

We released recently a version of qemu-img 2.3.0 for Windows aimed specifically at converting VHD and VHDX to / from other common formats, including QCow2:

http://www.cloudbase.it/qemu-img-wind...

Note: if your goal is to run instances based on the converted disk on KVM, you might want to consider that you need to add the proper drivers, especially VirtIO for Windows images.

edit flag offensive delete link more

Comments

Are you getting the qemu-img for windows from this link? http://qemu.weilnetz.de/ Or are you doing your own implementation? I just want to know which source to use :)

Reay4Linux gravatar imageReay4Linux ( 2015-08-04 09:55:43 -0500 )edit
1

answered 2015-07-27 13:36:49 -0500

dbaxps gravatar image

updated 2015-07-27 14:09:26 -0500

Addressing first question. View http://www.paulmellors.net/hyper-v-kvm/
Sounds like on on CentOS 7.1 ( might be on Fedora 22 ) following should work :-

First, check the file, make sure it’s ok.
qemu-img check -r all rmcjmc01.vhdx
If ok, convert the file
qemu-img convert -O qcow2 rmcgmc01.vhdx rmcgmc01.qcow2

Worst case scenario on CentOS 7.X reproduce or just download following build or activate Repos mentioned in FAQ. Procedure above was tested on RHEL, i.e. with qemu-kvm-rhev packages installed. In meantime the official "rhev" build has it's analog on CentOS 7.1 - "qemu-kvm-ev" packages.

Information for build qemu-kvm-ev-2.1.2-23.el7.1

http://cbs.centos.org/koji/buildinfo?...
View FAQ: http://centosfaq.org/centos-virt/qemu...

edit flag offensive delete link more

Comments

Thanks a bunch!

Reay4Linux gravatar imageReay4Linux ( 2015-07-27 16:19:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2015-07-22 13:05:38 -0500

Seen: 12,419 times

Last updated: Aug 02 '15