First I converted the disk, which was a flat file:
qemu-img convert webapp02-flat.vmdk -O qcow2 webapp02.qcow2
Then I grabbed vmware2libvirt. Initially I got an error:
./vmware2libvirt -f webapp02.vmx -b eth0
Traceback (most recent call last):
File “./vmware2libvirt”, line 255, in <module>
</disk>”’ + get_network(vmx, bridge, netmodel) + ”’
File “./vmware2libvirt”, line 70, in get_vmx_value
raise V2LError(“Bad value for ‘” + key + “‘”)
__main__.V2LError: “Bad value for ‘displayName'”
The -b was because I use bridging instead of the kvm ‘default’ NAT networking. Removing all the whitespace from the vmx file fixed that. I ran ‘virsh’ and used define to import the configuration. I had to go back an edit the config in /etc/libvirt/qemu to change the target dev to ‘sda’ and bus to ‘scsi’, as well as modify the source file to match my path. I also had to change the ‘eth0’ to ‘br0’, I wasn’t sure initially how smart the python script was. Then used define again in virsh to load the changes and everything was pretty happy.
Later I started getting
sd 0:0:0:0: ABORT operation started.
sd 0:0:0:0: ABORT operation timed-out.
Eventually the SCSI bus would reset and things would work, but it was annoying as hell. I changed the fstab and grub menu.lst entries from sda to hda, went back into the xml file and switched back to IDE and hda. I saw this thread about issues with the scsi driver and 2.6.21. It may not have been related, IDE worked fine. I was running debian etch with 2.6.18-6-686 but am in the process of migrating to ubuntu hardy.