HowTo: Convert a server running on VMware ESXi 5x to oVirt 3.2


 You must have a VMware server running ESXi5x with hosts that you want to move to oVirt. For the purposes of this howto I will be converting a Linux Host (Scientific Linux 6.1).


1. Shut down the server you are intending to move. Confirm that the system is down from the VMware vSphere client.

2. Create an export domain on storage that your oVirt cluster has access to (NFS).

  • SSH into your ovirt server.

Create a directory somewhere on the filesystem where you want to store the export domain.

  • mkdir /var/lib/exports/export_domain
  • chown -R vdsm:kvm /var/lib/exports/export_domain

Modify your /etc/exports file to add in the new location.

Add in:

  • /var/lib/exports/export_domain

Restart the NFS service so we can present the NFS target to the server.

  • service nfs-server restart
  • service nfs-lock restart

Log into the oVirt web administration panel.

  • Select Strage, Create a new storage domain and select "EXPORT" as the type.
  • Once the domain is created, right click on it and select "activate".

Your storage domain is now created and functional at this point.

3. Install virt-v2v on your oVirt server (optional, you could also do this on a 3rd server. I have done this directly on the primary ovirt server for convience).

yum install virt-v2v -y

4. Setup your .netrc file for virt-v2v to properly authenticate to your ESXi server.

Create the file ~/.netrc

This is information for your ESXi server.

Add the following contents. Change the server ip, xxxx.

  • machine login root password xxxxx

5. Do the following to fix a few bugs with Fedora 18 and converting a VM.

Set the LIBGUESTFS_ATTACH_METHOD to appliance. This fixes the bug: libvirt could not start the guestfs appliance.

  • export LIBGUESTFS_ATTACH_METHOD=appliance

Another error will pop up that will keep things from working. We install libosinfo to fix this.

  • yum install libosinfo libosinfo-devel -y 

6. Run the following command to convert and migrate to the ovirt server. This will take some time.

virt-v2v -ic esx:// -o rhev -os --network ovirtmgt VM_NAME_HERE(on esxi)

7. Import your VM once it has successfuly been transferred to the Export storage domain.

From the oVirt administration interface.

Select Storage -> Export Domain.

Your new "exported" server will be listed.

Click on the server, select "import". Use the default settings.

The server will now be imported. Once complete you can start the server.

 **Note: On the first boot of the new server on your oVirt cluster, it will have to preform an SELinux relabel operation. This may take a while to complete.