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).
Create a directory somewhere on the filesystem where you want to store the export domain.
Modify your /etc/exports file to add in the new location.
Restart the NFS service so we can present the NFS target to the server.
Log into the oVirt web administration panel.
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.
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.
Another error will pop up that will keep things from working. We install libosinfo to fix this.
6. Run the following command to convert and migrate to the ovirt server. This will take some time.
|virt-v2v -ic esx://172.16.xxx.xxx/?no_verify=1 -o rhev -os ovirt.server.ip.here:/var/lib/exports/export_domain --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.