In this exercise, you will export and import a virtual machine.
Outcome
You should be able to export and import a virtual machine using an Export Domain.
Log in to workstation as the student user with student as the password.
On workstation, run the lab snapimex-virtual start command.
This command runs a start script that determines if the Red Hat Virtualization environment is configured and working.
[student@workstation ~]$lab snapimex-virtual start
Add a new export domain to the development datacenter using the 172.24.0.8:/exports/data2 NFS share as a back-end.
On workstation, open Firefox, and then navigate to https://rhvm.lab.example.com.
Click Administration Portal.
Log into the RHV-M Administration Portal as admin in the internal profile.
Use redhat as the password.
In the menu, click , and then click .
Click to create a new storage domain. In the New Domain window, enter the following configuration settings:
Choose development for Data Center.
Choose Export for Domain Function.
Choose NFS for Storage Type.
Use the default value of Host to Use.
Enter nfs-move in the Name box.
Enter 172.24.0.8:/exports/data2 in the Export Path box.
Click to create the nfs-move storage domain.
Verify that the Cross Data Center Status is Active for the nfs-move storage domain.
It may take up to a minute to become active.
Export the rhel-vm3 virtual machine to the nfs-move export domain.
In the menu, click , and then click .
Verify that the value of the Status field for rhel-vm3 is Down.
Click on the line containing the rhel-vm3 virtual machine.
Click on the three vertical dots next to the button. A menu displays. In that menu click on . The Export Virtual Machine window opens. Ignore the two check boxes and click on .
Click on in the menu bar. Note the latest entry in Events window. The export process may take some time.
Vm rhel-vm3 was exported successfully to nfs-move
Detach the nfs-move export domain from the development data center and attach it to the Default data center.
In the menu click on , then click on .
In the Storage tab for the development data center, select nfs-move and click .
The window titled Storage Domain maintenance displays.
Click to confirm your intention of marking nfs-move for maintenance.
Wait for the status of nfs-move to transition to Maintenance.
It may take a minute for the status to transition from Active to Maintenance.
In the Compute >> Data Centers >> development page, select nfs-move and click to detach it from the development data center.
Click on .
From the menu, navigate to → to access the Compute >> Data Centers page.
In the Compute >> Data Centers page, click on the name of the Default data center.
In the Storage tab for the Default data center, click .
The window titled Attach Export Domain displays.
In the Attach Export Domain window, click the radio button next to nfs-move.
Click to confirm attaching the export domain.
Wait for the activation of nfs-move to be complete.
It may take a minute for the status to transition from Locked to Active.
Import the rhel-vm3 virtual machine to the Default data center as a new virtual machine.
In the menu, click , and then click on Domains.
Click on the nfs-move name.
Then click on VM Import.
Click on the rhel-vm3 virtual machine.
Click on the button.
The Import Virtual Machine(s) window displays.
Click on .
Note that next to the name of the virtual machine there is a Warning.
Using the mouse, hover over the warning.
The following message displays: Invalid name.
Click on the name of the virtual machine.
A new window displays.
Change the name of the virtual machine to rhel-vm4.
Click on .
The Import Virtual Machine(s) pop-up box opens with a message.
Click on .
Click on , and then click on .
The rhel-vm4 virtual machine is imported.
Once the import is complete, the virtual machine is in a status of Down.
The network configuration of an exported virtual machine must be updated.
Add a logical network to rhel-vm4.
In the Compute >> Virtual Machines window click on rhel-vm4.
Click on Network Interfaces.
Click on .
The Edit Network Interface window displays.
In Profile, select ovirtmgmt(ovirtmgmt).
Click on .
Click on to start the virtual machine.
In the Compute >> Virtual Machines window verify that the value of the Status field for the rhel-vm4 virtual machine is Up.
It may take up to a minute for the rhel-vm4 virtual machine to start.
To confirm that rhel-vm4 has an IP address.
Click on .
Log in to the virtual machine using root as the username and redhat as the password.
Run the ip a command to confirm the IP address of eth0.
rhel-test login:rootPassword:redhat[root@rhel-test ~]#ip a...output omitted... inet 172.25.250.21/24 brd 172.25.250.255 scope global noprefixroute dynamic eth0 ...output omitted...
Delete the rhel-vm4 virtual machine to cleanup resources.
Click on , and then click on .
Right-click the row for the rhel-vm4 virtual machine, and then select .
The Power Off Virtual Machine(s) window appears.
Click to power off rhel-vm4.
Verify that the value of the Status field for the rhel-vm4 virtual machine is Down.
It may take some time for RHV-M to mark the rhel-vm4 virtual machine as Down.
Right-click the row for the rhel-vm4 virtual machine, and then select .
The Remove Virtual Machine(s) window displays.
Verify that the Remove Disk(s) checkbox is selected.
Click to delete rhel-vm4.
Verify that RHV-M removes the rhel-vm4 virtual machine from the virtual machine listing.