3.7. Managing Placements

3.7.1. vinfra service compute placement create

Create a new compute placement:

usage: vinfra service compute placement create [--description <description>]
                                               [--nodes <nodes>]
                                               [--images <images>]
                                               <placement-name>
--description <description>
Placement description
--nodes <nodes>
A comma-separated list of compute node IDs to assign to a compute placement
--images <images>
A comma-separated list of image IDs to assign to a compute placement
<placement-name>
Placement name

Example:

# vinfra service compute placement create placement1
+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| description |                                      |
| id          | e4230b75-a858-404c-be3b-4b3f2dedb057 |
| images      | 0                                    |
| name        | placement1                           |
| nodes       | 0                                    |
| servers     | 0                                    |
+-------------+--------------------------------------+

This command creates a placement called placement1.

3.7.2. vinfra service compute placement assign

Assign nodes or images to a placement:

usage: vinfra service compute placement assign (--images <images> | --nodes <nodes>)
                                               <placement>
--images <images>
A comma-separated list of image IDs to assign to a compute placement
--nodes <nodes>
A comma-separated list of compute node IDs to assign to a compute placement
<placement>
Placement ID or name

If the node has virtual machines on it, they will not automatically inherit the changes to node’s placement configuration. That is, if you add a node with VMs to a placement, the VMs will not be assigned the same placement. If you delete such a node from a placement, the VMs will still keep that placement. You will have to edit virtual machines’ placement configuration accordingly using the vinfra service compute server set command described in the Administrator’s Command Line Guide. Make sure that the node and its VMs have the same placement configuration.

Example:

# vinfra service compute placement assign \
--images b23e23e8-7338-4a09-a827-3c9c509cf35c placement1
Operation successful.

This command assigns the image with the ID b23e23e8-7338-4a09-a827-3c9c509cf35c to placement placement1.

3.7.3. vinfra service compute placement delete assign

Remove images and nodes from a compute placement:

usage: vinfra service compute placement delete assign
                                               (--image-id <images> | --node-id <nodes>)
                                               <placement>
--image-id <images>
An image ID to remove from a compute placement
--node-id <nodes>
A compute node ID to remove from a compute placement
<placement>
Placement ID or name

If the node has virtual machines on it, they will not automatically inherit the changes to node’s placement configuration. That is, if you add a node with VMs to a placement, the VMs will not be assigned the same placement. If you delete such a node from a placement, the VMs will still keep that placement. You will have to edit virtual machines’ placement configuration accordingly using the vinfra service compute server set command described in the Administrator’s Command Line Guide. Make sure that the node and its VMs have the same placement configuration.

Example:

# vinfra service compute placement delete assign \
--image b23e23e8-7338-4a09-a827-3c9c509cf35c placement1
Operation successful.

This command removes the image with the ID b23e23e8-7338-4a09-a827-3c9c509cf35c from placement placement1.

3.7.4. vinfra service compute placement list

List compute placements:

usage: vinfra service compute placement list

Example:

# vinfra service compute placement list
+----------------+----------------+-------------+-------+--------+---------+
| id             | name           | description | nodes | images | servers |
+----------------+----------------+-------------+-------+--------+---------+
| 2d152d33-<...> | placement1     |             |     0 |      1 |       0 |
| 11857e11-<...> | placement2     |             |     1 |      0 |       0 |
+----------------+----------------+-------------+-------+--------+---------+

This command lists available compute placements.

3.7.5. vinfra service compute placement show

Display compute placement details:

usage: vinfra service compute placement show <placement>
<placement>
Placement ID or name

Example:

# vinfra service compute placement show placement1
+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| description |                                      |
| id          | e4230b75-a858-404c-be3b-4b3f2dedb057 |
| images      | 0                                    |
| name        | placement1                           |
| nodes       | 0                                    |
| servers     | 0                                    |
+-------------+--------------------------------------+

This command shows the details of the placement placement1.

3.7.6. vinfra service compute placement update

Update a compute placement:

usage: vinfra service compute placement update [--name <placement-name>]
                                 [--description <placement-description>]
                                 <placement>
--name <placement-name>
A new name for the placement
--description <placement-description>
A new description for the placement
<placement>
Placement ID or name

Example:

# vinfra service compute placement update --name placement1-UPD placement1
Operation successful

This command renames the placement placement1 to placement1-UPD.

3.7.7. vinfra service compute placement delete

Delete a compute placement:

usage: vinfra service compute placement delete <placement>
<placement>
Placement ID or name

Example:

# vinfra service compute placement delete placement1
Operation successful

This command deletes the placement placement1.