Deploy Instance from Image

Having a virtual machine for testing purposes on your workstation is very common nowadays. Once the virtual machine is ready to be imported to the ITS Private Cloud, we provide a method to do so. This example, describes basic steps to import a virtual machine OVF with disks or an OVA appliance to our environment.

Please, refer to the official documentation for your virtualization software to produce a virtual machine export in OVF or OVA. If you happen to be using VMware workstation or fusion, please refer to the following links:

The ITS Private Cloud virtualization platform is VMware vSphere 7.0, and the maximum VMX hardware version is 19. If you have the latest VMware Fusion or Workstation, update VM compatibility settings to version 19.

As a best practice, we recommend to remove unused devices such as sound cards, printer ports, USB and other unused devices, prior exporting the virtual machine.

Source Image

Once you have exported your virtual machine in OVA or OVF, you can either login to VSKEY-STOR with your VSS credentials or vss-cli stor to upload the OVA or OVF (including vmdk disks) to deploy.

Use vss-cli stor ul <file_path> to upload OVF and disk files to VSKEY-STOR from command line as follows:

vss-cli stor ul ~/Downloads/CentOS-7-x86_64-VMware.ovf vss-cli stor ul ~/Downloads/disk-0.vmdk

Verify files were uploaded successfully with vss-cli stor ls :

vss-cli stor ls images/centos items : disk-0.vmdk, CentOS-7-x86_64-VMware.ovf

At this point, your image is almost ready to be deployed. Sync your images with vss-cli compute image personal sync in order to make them available in the API. You can verify if the task has successfully completed by issuing the command vss-cli request image ls as follows:

vss-cli request image ls -s created_on desc id created_on updated_on status type ---- --------------------------- --------------------------- --------- ------ 68 2018-07-18 Wed 15:36:49 EDT 2018-07-18 Wed 15:36:50 EDT Processed VM

Verify its availability by running vss-cli compute image personal ls as follows:

This version of the VSS CLI supports providing image reference not only using the path, but also using name or Id. In case of multiple results, the CLI prompts to select the right instance.

Save the path in SIMAGE environment variable.

Launch Instance

Use vss-cli compute vm mk from-image to deploy a virtual machine from OVA/OVF and provide the options and arguments specified in the command, as follows:

Operating system

Run vss-cli compute os ls to display the list of supported operating systems in the ITS Private Cloud. In order to narrow down the list to only CentOS operating systems, use the --filter-by/-f option which is structured <field_name>=<operator>,<value> and available operators are eq, ne, lt, le, gt, ge, like, in. So, to limit results to just CentOS, use the following filter:

Set the OS environment variable to centos64Guest to save the guest_id:

Network

Run vss-cli compute net ls to list available network segments to your account. You must have at least VL-1584-VSS-PUBLIC which is our public network.

Save dvportgroup-11052 in NET environment variable:

By default, the network adapter will use vmxnet3 which provides ideal performance, however a few legacy operating systems does not have the drivers. In such case, you can specify which adapter type between: e1000e*, e1000, vmxnet2 or vmxnet3. To do so, append the adapter type to the network adapter network as follows:

Folder

Logical folders can be listed by running vss-cli compute folder ls. Select the target moref folder to store the virtual machine on:

Set the FOLDER environment variable to the target folder (the folder moref may vary):

Deployment

At this point, we have all requirements to run vss-cli compute vm mk from-image command to submit a deployment request. For this example, the request is made for 2GB of memory, 2 vCPU, 2x40GB disks.

The following command should work as well:

A confirmation email will be sent and the command will return the request id and task_id as follows:

Wait a few minutes until the virtual machine is deployed.

Access Virtual Machine

Since we added the --power-on option, the virtual machine should have been powered on right after the Guest Operating System Customization task completed.

In a few minutes the virtual machine will show the hostname and ip configuration by running vss-cli compute vm get <name-or-vm-id> guest:

The Guest Host Name shows that the hostname has been changed, and now you will be able to access via either ssh or the virtual machine console:

University of Toronto - Since 1827