Managing virtual machines and containers

Last updated 12 June, 2018

Viewing, editing, and deleting virtual machine and container 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. Click the volumes icon to add storage and connect storage volumes on the Volumes screen.
  8. 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.

  9. 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 the 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.
Prerequisites

The administrator or consumer deployed a virtual machine to an ESXi private cloud.

Procedure
  1. Log in to the vSphere Client, and select Home > Inventory > Hosts and Clusters.
  2. From the Hosts/Clusters tree view, select the ESXi host name that represents the server you want to open for VNC access.
  3. Select the Configuration tab, locate and open the Software list box, and select Security Profile.
  4. 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.

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 public or 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. To launch the console of a public cloud deployment, click the network icon  and then click the IP address of the deployed virtual machine.
  5. 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.

Adding a storage volume

Add a storage volume to a virtual machine deployment in AWS.

Prerequisites

The administrator or consumer deployed a virtual machine to an Amazon Web Services public account.

Procedure
  1. From the HPE OneSphere main menu, select Projects.
  2. From the Projects screen, select the specific deployment to which you want to add a storage volume.
  3. Click the volumes icon  on the Deployment screen.
  4. Click the plus sign.
  5. From the Create Volume panel, add a name for the volume and a size in GB.

    NOTE:

    A volume that you plan to connect to an AWS VM can have a minimum size of 1 GB and a maximum size of 1 TB.

  6. Click Create Volume.

Connecting a storage volume

After you add a storage volume, you can connect (attach) it to the deployed virtual machine.

Prerequisites
  • The administrator or consumer deployed a virtual machine to an Amazon Web Services public account.

  • The administrator or consumer added a storage volume.

Procedure
  1. From the HPE OneSphere main menu, select Projects.
  2. From the Projects screen, select the specific deployment to which you want to connect a storage volume.

    NOTE:

    You can connect only one volume to a deployment. You cannot connect or disconnect a storage volume from a suspended or powered off virtual machine deployed to the public cloud.

  3. Click the volumes icon  on the Deployment screen.
  4. Select a volume that is not already connected. A volume that is not connected is shown above a disconnected icon.
  5. Click the Update Volume link under the volume name.
  6. Enable the Connect Volume to Deployment slider button.
  7. Click Update Volume.

Launching a Kubernetes cluster web CLI console

Administrator users can access the Kubernetes web CLI console as described in the following procedure. Consumer users can use a local command line to access the cluster using kubectl.

NOTE:

The console may not be available if the Kubernetes cluster is creating, deleting, adding, or removing nodes.

Prerequisites

The administrator or consumer deployed a Kubernetes cluster in the Amazon Web Services public cloud.

Procedure
  1. From the HPE OneSphere main menu, select Projects.
  2. Click the project name into which the Kubernetes cluster was deployed.
  3. Select Deployments.
  4. Select the Kubernetes cluster deployment.
  5. Click the console icon.

Using the kubectl CLI with a Kubernetes cluster

Administrator and consumer users can use the following procedure to access the cluster using kubectl. Administrator users can also launch a Kubernetes cluster web CLI console.

NOTE:

The kubeconfig file may not be available if the Kubernetes cluster is creating, deleting, adding, or removing nodes.

Prerequisites
Procedure
  1. From the HPE OneSphere main menu, select Projects.
  2. Click the project name into which the Kubernetes cluster was deployed.
  3. Select Deployments.
  4. Select the Kubernetes cluster deployment.
  5. Click the download icon  and download the Kubernetes configuration file.
  6. From the Linux machine, export the KUBECONFIG environment variable.
    export KUBECONFIG=<your-kubeconfig-file>

You can now use the kubectl command to access the cluster. For example:

kubectl get pods

Launching a Kubernetes cluster dashboard

Administrator and consumer users can use the following procedure to access the Kubernetes cluster dashboard.

NOTE:

The kubeconfig file may not be available if the Kubernetes cluster is creating, deleting, adding, or removing nodes.

Prerequisites
Procedure
  1. From the HPE OneSphere main menu, select Projects.
  2. Click the project name into which the Kubernetes cluster was deployed.
  3. Select Deployments.
  4. Select the Kubernetes cluster deployment.
  5. Click the download icon  and download the Kubernetes configuration file.
  6. Export the configuration file to the Linux machine.
    export KUBECONFIG=<your-kubeconfig-file>
  7. Configure the cluster proxy API to accept your IP address.
    kubectl proxy --address=0.0.0.0 --accept-hosts='<Your machine-ip>'
  8. Access the Kubernetes cluster dashboard using the following URL.
    http://<your-machine-ip>:<port>/api/v1/proxy/namespaces 
    /kube-system/services/kubernetes-dashboard