kvm-img utility

MimCom

Active Member
Apr 22, 2011
204
3
38
Southwest NM
Need to build a clean XP VM to host a legacy app and came across several pages describing the process of extracting the disk image from the XP Mode installer. I extracted the image (VirtualXPVHD) would like to use it to boot a KVM machine. Following the directions on http://blog.allanglesit.com/2011/03/linux-kvm-migrating-hyper-v-vhd-images-to-kvm/ I copied the file to the host using SCP and then tried to run kvm-img, which is apparently not included with Proxmox. Trying to install it, I get a conflict
Code:
root@pve1:~# apt-get -s install qemu-kvm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qemu-kvm : Depends: libspice-server1 (>= 0.11.0)
E: Unable to correct problems, you have held broken packages.
 
Created a Debian 7 CT, installed the qeum-kvm package, copied the binary to the host and:
Code:
root@pve1:~# ./kvm-img convert -f vpc -O raw VirtualXPVHD VirtualXP.img
W: ./kvm-img: this binary is deprecated, use qemu-img instead
root@pve1:~# ls -lh
total 2.2G
-rwxr-xr-x 1 root root  280 Apr 14 18:24 kvm-img
-rw-r--r-- 1 root root 127G Apr 14 18:26 VirtualXP.img
-rw-r--r-- 1 root root 1.2G Apr 14 17:50 VirtualXPVHD

127 gigabytes? Yikes!

Try again:
Code:
root@pve1:~# qemu-img convert VirtualXPVHD -O qcow2 VirtualXP.qcow2
root@pve1:~# ls -lh
total 2.2G
-rwxr-xr-x 1 root root  280 Apr 14 18:24 kvm-img
-rw-r--r-- 1 root root 1.1G Apr 14 18:35 VirtualXP.qcow2
-rw-r--r-- 1 root root 1.2G Apr 14 17:50 VirtualXPVHD

Much better. See next post.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!