Manage existing virtual machines

The manage existing virtual machines APIs provide the capability to specify the existing virtual machines that must be managed by the PowerVC Management System. The capabilities include listing virtual machines that exist in the environment, managing individual virtual machines, and unmanaging virtual machines that are currently being managed.

Note: User cannot manage the virtual machine in PowerVC if the host is in standby mode.

Manage existing virtual machines options

Table 1. Options for managing existing virtual machines API
Method URI Description

POST

/v2.1/{tenant_id}/servers/{server_id}/action

Finishes the process of managing a virtual machine. Specify the finishOnboard action in the request body.

Finish managing an existing virtual machine

The operation finishes the management process of an existing virtual machine by selecting the operating system distribution and, if the virtual machine has more than one volume, the boot volume. This API takes the identifier of the virtual machine in the URI and takes the identifiers of the boot volume and the operating system distribution in the request body. The API returns no response body if successful.

Response codes
  • Normal response code: No Content (204)
  • Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)

Request parameters

Table 2. Parameters in the response for finish managing a virtual machine.
Name Style Type Description

os_distro

body

string

The operating system distribution. The values are either aix, rhel, sles, or ubuntu.

boot_volume_ids

body

list of strings

A list of volume identifiers that are boot volumes for this virtual machine. If only one boot volume exists, it is a list of one identifier. If multiple boot volumes exist, the boot order is based on the ordering of identifiers in the list. (The first identifier in the list is the first volume in the boot order).

attach_order

body

list of strings

An ordered list of volume identifiers for this virtual machine. If only one volume exists, it is a list of one identifier. If multiple volumes exist, the order is based on the ordering of identifiers in the list. (The first identifier in the list is the first volume attached). If attach_order is not specified, boot_volume_ids is used for attach order instead.

endianness

body

string

Specifies whether the operating system on the virtual machine is little or big endian. Valid values are little-endian or big-endian.

Example:
{"finishOnboard": { 
  "os_distro": "rhel", 
  "boot_volume_ids": ["84030856-700e-4984-beaa-b72eb43ac017","a486f7a9-d8e2-42a8-a035-3776a9775187","5bd0eeab-1842-48c6-9a55-f4a2e94be442"],
  "endianness": "big-endian"}}

For information on unmanaging virtual machines, see Compute host registration topic.