Importing Virtual Machines from a VCD

In cases where network bandwidth is insufficient for remote Virtual Machine (VM) import, you can pack virtualization files into an ISO, upload the ISO to the system as a Virtual CD (VCD), and import the VM using the Representational State Transfer (REST) application programming interface (API) as described in this section.

Note: You cannot import VMs from VCDs using the everRun Availability Console; you can import VMs from VCDs only through the REST API.
Prerequisites:  

To import a VM from a VCD

  1. Package your virtualization files into an ISO. For example, you can use the genisoimage CLI tool (part of the cdrkit suite) with the following command format:

    > $ genisoimage -o <output-file-name.iso> -allow-limited-size <space-separated virtualization and disk files>

    The following example creates an ISO image called centos76-vhd.iso from an OVF file and VHD disk file: 

    > $ genisoimage -o centos76-vhd.iso -allow-limited-size CENTOS76.ovf disk0.vhd
    Note: Pack only one set of virtualization files per ISO (either one OVA file, or one OVF file with its disk files — not both).
    Note: Because the created ISO contains virtualization files (not a bootable image), you cannot use it for VM creation, only for VM import.
  2. Upload the ISO as a Virtual CD:

    1. Log in to the everRun Availability Console.

    2. Open the Virtual CDs page and upload the ISO file (see Downloading a Virtual CD).

    3. To display a list of the files inside an uploaded VCD (optional):

      1. ssh into the system.

      2. Run the command blkid. Look for the entry that matches the VCD name.

      3. List the ISO contents using the following command: 

        $ isoinfo -i /dev/mapper/<your-vcd-device-path> -l
    4. Wait for the everRun system to synchronize the VCD across all nodes.

  3. Import the VM using the REST API. You can submit the import request using any HTTP client, such as Swagger™, which is a suite of tools for the OpenAPI Specification. For more information, see REST API.

    For example, to execute the API call:

    1. Open Swagger at https://<system IP or domain>:8888/restapi/swagger-ui/index.html#/.

    2. Navigate to the section VMImport Api, then to /v2/import/importvm. This is the end-point to import a VM from an OVF or OVA file.

    3. Click Try it out and submit the request with the following required parameters:

      • vm-name — Name to assign to the imported VM.

      • remote-type — Type of remote connection or resource. Must be vcd for VCD-based import.

      • vcd-name — Name of the VCD you uploaded.

      • network — Network name.

      The following example includes all required parameters for a VCD-based OVF file import. Although certain parameters (such as file-name and remote-dir) are ignored for VCD imports, the request schema requires them, so placeholder values must be provided. See the Swagger documentation for details. 

      {
      "vm-name": "centos76-vhd",
      "file-name": "string",
      "remote-type": "vcd",
      "port": "string",
      "remote-dir": "string",
      "vcd-name": "centos76-vhd",
      "virtual-cpus": 0,
      "memory": 0,
      "destination": "string",
      "availability-level": "HA",
      "preferred-node": "string",
      "network": ["network0"]
      }

After you submit the request, the system automatically:

Related Topics

Adding, Migrating, and Importing Virtual Machines