You can create a compute policy and check the compliance status of the policy for a specific virtual machine.

Procedure

  1. Retrieve the object ID of a virtual machine.
  2. Retrieve the object ID of the host you want the virtual machine to run on.
    Note: The host should be different from the host the virtual machine is already running on.
  3. Tag the virtual machine.
    For example, use the tag-1 tag.
  4. Tag the host.
    For example, use the tag-2 tag.
  5. Create a compute policy.
    For example, use the tag-1 and tag-2 tags.
  6. Check the compliance status of the policy on this virtual machine.
    Note: The compliance status can take up to 3 minutes to update.