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.
- Virtual machines are created, as described in Creating virtual machines.
- Placements for compute nodes are created, as described in Creating placements.
- The node and VMs hosted on it have the same placement configuration.
To edit the VM placement
Use the following command:
vinfra service compute server set [--no-placements |--placement placement] <server>
- Clean up placements from the virtual machine.
- Placement name or ID to add the virtual machine to. Specify this option multiple times to add the virtual machine to multiple placements.
- Virtual machine ID or name
For example, to remove all placement assignments from the virtual machine
# vinfra service compute server set myvm --no-placements