Importing existing VMware vSphere virtual machine
You can import a VMware vSphere virtual machine as a Managed services stack instance, identify whether the instance is imported successfully, and manage the stack resources.
A default provided template, Import existing VM with a single disk - VMware vSphere for Terraform 1.x.x, is shipped as a sample to import a virtual machine. You can use this template during the import of VMware virtual machines. However,
this template cannot be used to deploy new virtual machines.
Procedure
- Use the
Import VM by IDsorImport VM by Nameto import a VMware vSphere virtual machine as a stack instance. For more information, see Import VM by IDs API and Import VM by Name API. - Log in to IBM Cloud Pak for AIOps console.
- In the navigation bar, click Automate Infrastructure > Instances. Click the Terraform templates tab.
- Click the deployed instance to open it and manage the imported virtual machine resources.
- From the Overview tab > Resources section, use the overflow menu to start, stop, shutdown, taint, untaint, and view details. For more information, see Managing virtual machine resources.
- You can also modify the virtual machine using the plan and apply process. For more information, see Modifying a deployed template instance.
Limitations
-
The
Import existing VM with a single disk - VMware vSphere for Terraform 1.x.xtemplate works only for virtual machines with a single disk. Go to the template source to find the following single disk information:disk{ unit_number = "${var.disk_0_unit_number}" path = "${var.disk_0_path}" label = "${var.disk_0_label}" size = "${var.disk_0_size}" datastore_id="${var.disk_0_datastore_id}" }If you are importing a virtual machine with more than one disk, clone this template to create a copy and duplicate the disk section for each additional disk. Make sure to increment the disk reference number in the variable names.
-
The parameter values of
Import existing VM with a single disk - VMware vSphere for Terraform 1.x.xtemplate are automatically populated after a successful import. When the mapping occurs, if your variable values have dots (.), then Managed services automatically converts them to underscore (_) and sets the new values for the template variables. The conversion occurs because the dot (.) character is not supported for the template variable values.