View Only

Pin a virtual machine to its host

By Madhavi Yenugu posted Thu December 19, 2019 05:42 AM

Sometimes due to the dependency between host and virtual machine regarding licenses, an administrator may not want to move a virtual machine to any other host.
With the release 1.4.4, PowerVC introduces the feature of ‘Pin virtual machine to a host’ which supports any scenarios involving host and virtual machine licenses. This blog helps you understand:

Pin a virtual machine to host

A virtual machine can be pinned to the host on which it is currently running. You can check whether a virtual machine is pinned to a host on the virtual machine details page.
There are two types of pinning – ‘soft pin’ and ‘hard pin’.
Soft Pin:
Virtual machines that are soft pinned are not eligible for normal LPM. Also, DRO cannot migrate them during load balancing. A soft pinned virtual machine will always try to stick to the host unless there is some expected / unexpected maintenance. If the host goes down or if the host is moved to maintenance mode, then PowerVC moves the soft pinned virtual machines to another viable host.
PowerVC automatically migrates a soft pinned virtual machine, which has moved to some other host due to host maintenance or ARR, back to the original host when the host starts operating.
Hard Pin:
Virtual machines that are hard pinned are not eligible for live migration to another host in any case. Even when the host goes down or moves to maintenance mode, the virtual machines will still not be eligible for migration. They just stay back on the same host forever until they are unpinned.

How do I Pin a virtual machine?

To pin a virtual machine to a host, perform the following steps:

  1. On the virtual machine details page, choose to enable pinning a virtual machine.

  2. Select whether you want to soft pin or hard pin a virtual machine to the host. Soft pin allows for the high availability of a virtual machine during disaster or host maintenance mode on another viable host.

  3. Click OK.

Can I unpin a virtual machine?

Yes, of course. You can unpin a virtual machine that is pinned to a host.

  1. Navigate to the virtual machine details page.

  2. Click on the little edit icon in the ‘Pin state’ feature.

  3. Select the Unpin virtual machine checkbox. Click OK.

And there you are! Now, you can migrate or DRO can migrate the virtual machine any where because there is no host relation with the VM.

Can I do these pinning activities using REST APIs?

Yes, you can. Given below are the examples to pin or unpin a virtual machine using REST APIs.

Example Rest API for pinning a virtual machine


Example Rest API for unpinning a virtual machine


We have seen how simple it is to pin or unpin virtual machines to a host in PowerVC. If you have any questions about this topic, please comment below. Watch this space for more information about troubleshooting your environment. In the meantime, don't forget to follow us on LinkedIn, Facebook, and Twitter.

Blog Authors:
Madhavi Yenugu - PowerVC developer
Srividhya.R - PowerVC developer