Convert VMware VM to KVM


Recommended Posts

  • 5 months later...

Not sure if you ever got this done, but if anyone else finds this topic, here's how i did it:

 

1)  Stop the VM in ESXI

2)  Export the VM as an OVF template

3)  Make a folder on your unraid box called /mnt/user/domains/<NameOfVM>

4)  Copy the VMDK file from the export folder to the folder you created in step 3

5)  Run the following command:  "qemu-img convert -p -f vmdk -O raw <vmdkfile> <vmdkfilename>.img".  This will convert the file to the KVM/OVirt format. 

6)  Create a new VM, change the bios to "SeaBIOS", and choose the .img file created in step #5 for the first hard drive.

 

At this point, if it's a linux machine, you can boot it and it pretty much Just Works (tm).  If it's a windows box, you've got a couple more steps.

 

7)  Boot the windows box, let it freak out that there is a bunch of new hardware and attempt to install drivers for it.  Let it do it's thing - it'll probably reboot a couple times.

8 ) go to add/remove programs and uninstall vmware tools

9)  As part of the creation process, you'll end up with a D (or first available) letter drive with the OVirt client VM files (basically vmware client for OVirt).  Open that up, go to the client install folder and install it.  Reboot.

10) after the reboot, go to device manager and install drivers for anything that wasn't detected properly.  All the drivers you need should also be on that D drive disk.  

11)  Reboot one last time and you should be good to go!

 

That's pretty much it.  The only other snag i noticed is that a couple VMs that i converted that had static IPs flipped back over to DHCP (my assumption is because of the change in virtual network hardware), so make sure to check that.  Let me know if you (or anyone else) runs into any issues!

  • Like 3
  • Thanks 2
Link to comment
  • 1 year later...
  • 3 years later...
7 hours ago, Mattyice said:

everything works except for the network settings

Is the issue that you don't have internet inside the vm or the message guest agent not installed?

If it's the latter, just install qemu guest agent into your linux vm.

Package name could differ for different linux distribution, for example it can be qemu-guest-agent.

After installation enable it, for example:

systemctl enable qemu-guest-agent
systemctl start qemu-guest-agent

Then check if it's running correctly, for example:
 

systemctl status qemu-guest-agent

 

If you don't have internet change network type from e1000 to virtio or virtio-net or e1000-82545em

Edited by ghost82
Link to comment
4 hours ago, ghost82 said:

Is the issue that you don't have internet inside the vm or the message guest agent not installed?

If it's the latter, just install qemu guest agent into your linux vm.

Package name could differ for different linux distribution, for example it can be qemu-guest-agent.

After installation enable it, for example:

systemctl enable qemu-guest-agent
systemctl start qemu-guest-agent

Then check if it's running correctly, for example:
 

systemctl status qemu-guest-agent

 

If you don't have internet change network type from e1000 to virtio or virtio-net or e1000-82545em

Correct I don't have internet in the VM at all so I can't install anything.

Link to comment

If it's not changed from the xml in your diagnostics, I cannot explain, the address is there, and also it was e1000 and now it's virtio.

Anyway, 04:00.0 or 02:01.0, e1000 or virtio, doesn't make any difference, you have the virtio network inside the vm, the issue is inside the vm, not related to qemu or libvirt, maybe you just need to configure the connection inside the vm (networkmanager?)

Edited by ghost82
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.