The article explains the process of importing and exporting virtual machine images from a redhat server in to VMware Workstation or Workstation Pro.

This is a guest post by Ido Berkovich, who is a Red Hat Certified Engineer and a Red Hat Certified System Administrator. If you are interested in virtualization, and want to start with using Red Hat Virtualization, then this article is for you.

Managing virtual machine images

RHVM stores disk images of virtual machines in data domains. A data domain can only be connected to one data center at a time. However, multiple data domains can be connected to one data center at a time.

From time to time it may be necessary to move disk images. For example:

  1. You may wish to move a disk image of a virtual machine from one data domain to another.
  2. You may want to export virtual machines from one data center and import them into another.
  3. You may want to import an existing QCOW2 image from outside RHV into the data domain so that you can assign it to the virtual machine.

With the latest version of Red Hat Virtualization, you can import images directly into data domains and move data domains from one data center to another. Older versions of Red Hat Virtualization used a special export domain for exporting and importing images between data domains. Although the domain export feature is being phased out in favor of newer methods, it is still available and may be useful if you are working with older versions of the product.

Importing virtual machine images into RHV

With the latest version of Red Hat Virtualization, QCOW2 disk images of virtual machines can be imported directly into the data domain through a management portal or API. Once in the data domain, images can be embedded and used in existing virtual machines.

For this method to work, you must configure RHVM to provide an image I/O proxy during installation. You need to import the RHVM CA certificate into the browser and trust it for web pages. Finally, your browser must support certain HTML5 APIs. Internet Explorer 10, Firefox 35 and Chrome 13 or higher are known to work.

To import an image of a virtual machine from the administration portal :

  1. Select the Drive tab. In this tab, choose Download → Start.
  2. A new window will appear with the title Upload Image. Click Select File in the window and select the image you want to download from the local system. Specify the size of the image, an alias for the name, and the data center and storage domain where it is stored. Press OK to start the import process.
  3. The image appears in the list on the Disk tab. During loading, a progress bar is shown below. When the RHVM has finished downloading the image, its status changes to OK. Note that it is not yet attached to a virtual machine.

To attach a disk image to an existing virtual machine via the management portal :

  1. Select the Virtual Machines tab and click on the name of the virtual machine to which you want to link the image.
  2. Select the Disks tab for this virtual machine at the bottom of the interface. This will list all the disk images associated with the virtual machine.
  3. If the disks you want to get rid of are already connected to the virtual machine, click Remove. A window will open asking you to confirm that you want to do this. To completely remove the drive from the data domain, select the Delete permanently check box.
  4. To attach the imported disk image, click Attach. A window with a list of all disk images opens. Check the box next to the disk image you want to attach. Configure the interface to use the desired connection protocol. If this is the system’s boot drive, check the box under the circled letters of the operating system.

Click OK to connect the disk to the virtual machine.

Importing virtual machine images using export domains

A previous method of importing virtual machine images used export domains to import and export virtual machines in Open Virtualization Format (OVF). Export domains have also been used to transfer images from one data domain to another in different data centers.

OPINION : Export domains have been eliminated in Red Hat Virtualization 4.1, but are still available.

If you have registered a virtual machine as an Open Virtual Appliance (OVA) file, you can import it into Red Hat Virtualization using the Export Domain and Image Upload tool. The disc images recorded in the OVA file must be in RAW or QCOW2 format.

First, you need to create an export domain and connect it to the data center for the new virtual machine. To create an export domain, use the Storage tab as you would for ISO and data domains, and then select Export as domain function.

Then use the ovirt-image-uploader command with the upload directive to upload the OVA file to the export domain. This command requires at least two parameters: OVA file and export domain. You will also be asked to enter a username and password to log into the HRS environment. The -insecure option allows an unsecured connection to the RHV environment.

[root@demo ~]# ovirt-image-uploader –insecure -e exportdomain upload example.ova

Specify the REST API username for the oVirt Engine (CTRL+D to cancel
Specify the REST API password for the oVirt Engine
(CTRL+D to cancel): mypass
Download : [########################################] 100%

To move an image from the export domain to the data domain in the data center, select the Storage tab in the administration portal and click the export domain item. Select the VM import tab that appears at the bottom of the interface. Select the imported image and click the Import button.

The Import one or more virtual machines window opens. Name the new virtual machine and click OK to import it into the data domain and data center.

Exporting images from virtual machines using export domains

When RHVM exports a virtual machine to an export domain, the virtual machine’s OVF package is placed in the directory structure of that export domain. This folder structure contains two subfolders: images and master. The directories that make up the OVF package contain the OVF file, which has the extension .ovf. This is a descriptor file that defines the virtual hardware configuration for the virtual machine. The directories also contain the virtual hard disk image files for this virtual machine. An OVA file or package is simply a TAR archive with the directory structure of an OVF package.

If you have direct access to the exported domain store, this is an unsupported way to check out virtual machines from Red Hat Virtualization.

The official way to extract images from Red Hat Virtualization is to use its API, which is beyond the scope of this course. For more information, see the Red Hat Virtualization REST API Guide.

Moving disks from the virtual machine to a new data domain

If a particular data domain is full or the workload is high, you can move some virtual machine disks to another data domain in the data center. You can also export virtual machines to a new data center by moving them to a new data domain and then moving the data domain to another data center.

Red Hat Virtualization supports the manual migration of virtual machine disks from one data domain to another.

To move disks from virtual machines to a new data domain via the management portal :

1. On the Disks tab, select the hard disk(s) connected to the virtual machine. Click on the Move button.

2. The Move Disk(s) window opens. Select the target data area for each drive in the Target Profile and Disk Profile fields. Click OK to move the virtual machine disks to the destination data domain. It can take up to a minute to move the disks to the virtual machine.

3. In the Disk tab, click each record on the disk. At the bottom of the window, a new section appears with information about the hard drive. In this new section, click on the Storage tab and make sure the target data domain is listed.

Exporting virtual machines to another data center

RHVM supports the use of data domains to move virtual machine images between data centers. The data domain is required to store virtual machine images. The following procedure describes how to export a virtual machine between data centers using the data domain in the administration portal.

1. On the Storage tab, select the row that corresponds to the data area. A new section is displayed at the bottom of the interface, dedicated to the details of the data domain configuration.

In this new section, click the Data Center tab and click Maintenance to put the original Data Center data domain in maintenance mode. To put the data domain in maintenance mode, all virtual machines must be shut down.

2. The Storage Domain Maintenance window opens and you are asked to confirm that you want to put the data domain in maintenance mode. Press OK.

3. If the Data Center Domain Status field for the source data center is Maintenance, click Disconnect to disconnect the data domain from the source data center.

4. A window will open with the title Disconnect Storage. Click OK to disconnect the data domain from the source data center.

5. After logging out, the source data center no longer appears on the Data Center tab of the Configuration Details Data Domain section. In the same tab, click Attach.

6. The Link to Data Center window opens. Select the radio button for the destination data center. Click OK to connect the data domain to the target data center.

7. Click the Data Domain configuration details section of the VM Import registry map. This Registerkarte contains a list of virtual machine images that are stored in the database. Select the virtual machine and click Import.

8. The Import one or more virtual machines window opens. Select the data center destination cluster. Click OK to import the virtual machine.

9. In the left pane of the navigation, click System and then the Virtual Machines tab. Make sure the imported virtual machine is in the list and its status is Down.

ovirt import vmdkkvm export qcow2export rhev vm to vmwarekvm export ovavirt-p2v tutorialkvm export vm,People also search for,Privacy settings,How Search works,ovirt import vmdk,kvm export qcow2,export rhev vm to vmware,kvm export ova,virt-p2v tutorial,kvm export vm,ovirt export vm to kvm,virt-v2v

You May Also Like

PHP contact form with Google reCaptcha

The Google reCaptcha is a security system that uses a test to…

🥇 Security in Telegram  How does it work? Is it reliable? ▷ 2021

Telegram is a popular messaging app with hundreds of millions of active…

🥇 Request Donations from Facebook Live  Step by Step Guide ▷ 2021

Facebook Live will be the biggest thing since the Internet itself. Facebook…

🥇 Invite Friends to Telegram  Step by Step Guide ▷ 2021

Telegram’s features are not available from any other instant messaging service. Its…