Before you perform a backup operation for Xen hypervisors that you plan to convert, you must convert the hypervisors to KVM-compatible VMs.
Procedure
-
Install the following virtio drivers on the source VM: virtio, virtio_blk, virtio_pci, virtio_scsi, virtio_net, virtio_balloon.
-
Back up the VM and then restore it to RHEV domain.
-
If the VM does not boot, export the VM to Export domain using the ovirt GUI.
-
Note the IDs of the exported disks on the ovirt portal.
-
Note the exact location where the disks are present inside the storage domain.
For example:
cd /STORE/Export/1c2f70d6-5d90-4697-b0f6-48369595ab81/images/8576d830-9a94-4a09-a961-c2132722cd03/
--Export Domain- ------------------Disk ID------------------------------
-
Inside this, you will see a disk that can be of format raw or qcow2, and a disk of te same GUID and of format .meta.
For example:
54dd31c1-adb7-495f-911c-33b6f118f587 54dd31c1-adb7-495f-911c-33b6f118f587.meta
-
Run the following command:
yum install virt-v2v
-
Run the following command:
---storage domain path where the disk will be exported--"virt-v2v -i disk 54dd31c1-adb7-495f-911c-33b6f118f587 -o rhv -os /STORE/NFSRED/"
-
While running, the system might ask for the libvirt authentication. For example:
[root@redsea 8576d830-9a94-4a09-a961-c2132722cd03]# virt-v2v -i disk 54dd31c1-adb7-495f-911c-33b6f118f587 -o rhv -os /STORE/NFSRED/ [ 0.0] Opening the source -i disk 54dd31c1-adb7-495f-911c-33b6f118f587 [ 0.0] Creating an overlay to protect the source from being modified [ 0.2] Opening the overlay libvirt needs authentication to connect to libvirt URI qemu:///system (see also: http://libvirt.org/auth.html http://libvirt.org/uri.html) Please enter your authentication name: --> If authentication is not set or do not remember run below command to set a new auth. saslpasswd2 -a libvirt root (replace root with any username) Password:
-
Once again, run the following command:
"virt-v2v -i disk 54dd31c1-adb7-495f-911c-33b6f118f587 -o rhv -os /STORE/NFSRED/"
The output should look like the following:
virt-v2v -i disk 54dd31c1-adb7-495f-911c-33b6f118f587 -o rhv -os /STORE/NFSRED/ [ 0.0] Opening the source -i disk 54dd31c1-adb7-495f-911c-33b6f118f587 [ 0.1] Creating an overlay to protect the source from being modified [ 0.2] Opening the overlay libvirt needs authentication to connect to libvirt URI qemu:///system (see also: http://libvirt.org/auth.html http://libvirt.org/uri.html) Please enter your authentication name: root Please enter your password: [ 17.1] Inspecting the overlay [ 30.4] Checking for sufficient free disk space in the guest [ 30.4] Estimating space required on target for each disk [ 30.4] Converting Red Hat Enterprise Linux Server 7.4 (Maipo) to run on KVM virt-v2v: warning: /files/boot/grub2/device.map/hd0 references unknown device "xvdb". You may have to fix this entry manually after conversion. virt-v2v: This guest has virtio drivers installed. [ 102.1] Mapping filesystem data to avoid copying unused and blank areas [ 103.2] Closing the overlay [ 105.4] Assigning disks to buses [ 105.4] Checking if the guest needs BIOS or UEFI to boot [ 105.4] Initializing the target -o rhv -os /STORE/NFSRED/ [ 105.5] Copying disk 1/1 to /STORE/NFSRED/16313287-7821-44e5-af53-31aa954726d5/images/035669b8-6022-4123-98b2-ac2dd6ed4bd9/4d83f0f2-2799-444d-b9eb-234821b73 (100.00/100%) [ 115.3] Creating output metadata [ 115.4] Finishing off
-
On the ovirt portal, go to the storage domain --> disk import and then import the disks.
-
Create a VM of these disks.