Managing virtual machines

Last updated 15 April, 2019

Viewing, editing, and deleting virtual machine deployments

Manage the lifecycle of a deployed virtual machine, including viewing the details, editing, and deleting the deployment.

Prerequisites

The administrator or consumer deployed a virtual machine to the public or private cloud.

Procedure

  1. From the HPE OneSphere main menu, select Projects.
  2. From the Projects screen, select the project, then select the specific deployment you want to manage.
  3. Click the console icon to launch the virtual machine console.
  4. Control the power status of the virtual machine instance in the Power section.
  5. Click the binoculars icon to view details about the deployment on the Deployment panel.
  6. View the IP address of the virtual machine instance in the Access section.
  7. To edit the deployment name, click Update Deployment below the deployment title.

    Update the name of the deployment on the Update Deployment panel, then click Rename Deployment.

    NOTE:

    If the deployment is renamed, the updated name of the deployment appears in HPE OneSphere but vCenter retains the existing name of the deployment.

  8. To delete the deployment, click Delete  at the bottom of the Update Deployment screen. 

    IMPORTANT:

    Deleting a deployment is not reversible. Deleting the deployment removes the underlying services, settings, links to other deployments, and all resources (such as storage volumes) attached to the deployment from the infrastructure.

Power cycling and restarting a virtual machine

From HPE OneSphere, you can power on, resume, suspend, and restart a deployed virtual machine.

The power status of a virtual machine can be Adding, Removing, Starting, Started, Stopping, Stopped, Suspending, Suspended, Resuming, or Unknown.

Prerequisites

The administrator or consumer deployed a virtual machine to the public cloud or private cloud.

Procedure
  1. From the HPE OneSphere main menu, select Projects.
  2. Select the project into which the virtual machine instance is deployed.
  3. From the Project screen, select the deployment name.
  4. In the Power section:
    • To power on or power off the virtual machine, click power.

    • To suspend the virtual machine, click suspend.

    • To resume the virtual machine if it is suspended, click resume.

    • To restart the virtual machine, click restart.

Enabling GDB server on an ESXi host

To access the console for the virtual machine from HPE OneSphere, you must enable the GDB server on the ESXi host of the virtual machine. The ESXi host will then allow VNC access to the guest virtual machine console through its firewall.

The following procedure assumes your ESXi host is running version 6.x. Alternate steps are provided where the steps are different for 5.x.

Prerequisites

The administrator or consumer deployed a virtual machine to a VMware vSphere private cloud.

Procedure
  1. Log in to the vSphere Web Client, and select Home > Hosts and Clusters (or use CTRL+Alt+2).

    On ESXi 5.x, select Home > Inventory > Hosts/Clusters.

  2. From the Hosts and Clusters tree view, select the ESXi host name that represents the server you want to open for VNC access.
  3. Select the Configure tab, and locate and open System > Security Profile > Firewall.

    On ESXi 5.x, select the Configuration tab, locate and open the Software list box, and select Security Profile.

  4. From the Firewall section, select the Edit option to display the Firewall Properties dialog box.

    On ESXi 5.x, from the Firewall section, select the Properties link to display the Firewall Properties dialog box.

  5. Scroll and select GDB Server in the dialog box.
  6. Click OK.

Result

This procedure opens the firewall ports from 1000 - 9999 and from 50000 to 50999, which can be used to configure VNC ports in the VM configurations.

You can change firewall ports by editing the gdbserver service section in the file /etc/vmware/firewall/service.xml on the ESXi host.

Example

<service id='0023'>
   <id>gdbserver</id>
   <rule id='0000'>
     <direction>inbound</direction>
     <protocol>tcp</protocol>
     <porttype>dst</porttype>
     <port>
       <begin>1000</begin>
       <end>9999</end>
     </port>
   </rule>
   <rule id='0001'>
     <direction>inbound</direction>
     <protocol>tcp</protocol>
     <porttype>dst</porttype>
     <port>
       <begin>50000</begin>
       <end>50999</end>
     </port>
   </rule>
   <enabled>false</enabled>
   <required>false</required>
 </service>

Next step: Launching a virtual machine console

Launching a virtual machine console

Launch a console for a deployed virtual machine to perform operations using the command line.
Prerequisites
  • (VMware ESXi only) The administrator enabled GDB server on the ESXi host for a private cloud deployment.

  • The administrator or consumer deployed a virtual machine to the private cloud.

Procedure
  1. From the HPE OneSphere main menu, select Projects.
  2. Click the project name into which the virtual machine was deployed. A list of virtual machines is displayed.
  3. To launch the console of a private cloud deployment, click the clipboard  on the right corner of the deployed virtual machine.
  4. Log in to the console using cloud-init or SSH public key credentials, which were configured during the deployment of the virtual machine.

    NOTE:

    You cannot log in to the console using SSH public key credentials until the IP address of the VM is displayed in HPE OneSphere, which may take some time to populate after the VM is created.