vinfra service compute placement assign

Assign nodes or images to a placement:

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

A virtual machine is assigned a placement when it is created from an image or flavor with the placement assigned. A VM can also inherit a placement from a volume created with an assigned image. However, a VM does not inherit the placement and changes to it from the node. For example, if you assign a placement to a node with existing VMs, only the node will have the placement. The VMs will not inherit the same placement. Likewise, if you have a node and VMs on it assigned to the same placement, and you delete such a node from a placement, only the node will change the placement. The VMs on it will still keep the original placement.

If you need to edit the VM placement, use the vinfra service compute server set command. 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 the placement placement1.