5.10. Managing placements

A placement is a group of compute nodes that share a distinctive feature. It can be a special license for software to run in VMs or an advanced CPU model. After you group nodes into a placement, you can assign an image to it. Then, all of the VMs created from this image will be placed on the nodes included in the placement. In this way, you can create placements to assign VMs that need a specific feature to the nodes that have it.

Take note of the following:

  • The same node can be included into several placements.
  • A virtual machine that is assigned a placement can only be migrated between nodes in this placement. Similarly, a VM without a placement can only be migrated between nodes that are not in placements. When adding nodes to placements, make sure to provide migration options for various scenarios, including high availability and maintenance. Avoid situations when VMs cannot migrate because of limitations imposed by placements. In this case, a VM placement can be edited, as described in Managing virtual machines in placements.
  • Self-service users can only use placements by creating VMs from images added to those placements. If all of the nodes are in placements, make sure that at least one image is added to a placement. Otherwise, self-service users will not be able to create virtual machines.

5.10.1. Creating placements

To create a placement, do the following:

  1. Open the Compute > Nodes > Placements tab and click Create placement.

  2. Specify a name for the new placement. The name should clearly state the distinctive feature of nodes in the placement. For example, Microsoft Windows Server license.

    ../_images/compute_placements1_ac.png
  3. Select the nodes to be included in the placement.

    ../_images/compute_placements2_ac.png
  4. Optionally, add images to the placement. VMs created from such images will automatically be added to the placement.

    ../_images/compute_placements3_ac.png
  5. Click Create.

The new placement will appear in the list.

5.10.2. Managing nodes in placements

To add a node to a placement, do the following:

  1. On the Compute > Nodes > Placements tab, click the required placement.
  2. Go to the Nodes tab and click Add.
  3. Select the nodes to be included in the placement, and then click Add.

To remove nodes from a placement, select them on the placement’s Nodes tab, and then click Remove.

5.10.3. Managing images in placements

To have VMs deployed from an image added to a placement automatically, add that image to a placement. You can do this with images that are shared between all projects (refer to Managing images).

Do the following:

  1. Open Compute > Nodes > Placements tab and click the required placement.
  2. On the Properties tab, click + Add in the Images section.
  3. Select one or more images, and then click Add.

When you choose this image while creating a VM, the corresponding placement will be selected automatically.

To remove an image from a placement, open the placement properties, and then click the bin icon next to the image you want to remove.

5.10.4. Managing virtual machines in placements

A virtual machine is assigned a placement when it is created from an image with the placement assigned. A VM can also inherit a placement from a volume created with an assigned image (refer to Creating, editing, and removing volumes). However, a VM does not inherit the placement and changes to it from the node. For example, if you add a node with existing VMs to a placement, 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.

5.10.5. Renaming placements

To rename a placement, do the following:

  1. On the Compute > Nodes > Placements tab, select the required placement, and then click Edit on its right pane.
  2. Enter a new name, and then click Save.

5.10.6. Deleting placements

Prior to deleting a placement, make sure there are no nodes in it. A placement with nodes cannot be deleted. Remove nodes from the placement, if any, do the following:

  1. On the Compute > Nodes > Placements tab, select the required placement, and then click Delete on its right pane.
  2. In the confirmation window, click Delete placement.