none
Hyper-V VMGroups and Clusters

    Pertanyaan

  • I tried playing around with the new VM groups commands for the first time and was a little confused as to how exactly they function within a cluster (If at all) and how they handle VMs moving between hosts. I had a 3-node cluster with a dozen VMs spread between the 3 hosts, I created a group with all 12 guests (All 2016 hosts and guests patched to the May Rollup). I used "New-VMGroup -ComputerName <CLUSTER>" and then added the members in the same fashion, specifying the cluster.

    When running a Get-VMGroup -ComputerName <CLUSTER> I could see all 12 VMs and all seemed well. However, if I tried to do any other commands referencing the group, only the guests on a single host were affected. It was the host owning the Computername/IP resource at the time of creation which sort of made sense but also didn't at the same time. I then tried a Get-VMGroup against each node individually, and only the first node even had the group, and it only showed the guests running on that host at the time of the creation. The other 2 hosts returned nothing at all when querying for the group like it didn't even exist. Running the Get-VMGroup command against the cluster at the same time showed all 12 guests in the group still.

    I gave up and decided to delete the group. This proved tough as well, as I could only actually delete the guests running on that single host. Running a Remove-VMGroupMember -ComputerName <CLUSTER> and specifying the VM object wouldn't return errors, but also wouldn't be removed from the group. I then started migrating the VMs to the single host that seemed to be aware of the group, and once I had them on that host, I could delete them and finally delete the group once it was empty.

    So my question... I assumed these commands were somehow meant to work within a cluster, are they? Or does all of this assume everything in the group is all tied to a single host? That wouldn't make much sense, so what am I missing?

    11 Juni 2018 12:43

Semua Balasan

  • Hi,

    I am currently performing research on this issue and will get back to you as soon as possible. I appreciate your patience.

    If you have any updates during this process, please feel free to let me know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    12 Juni 2018 10:15
  • Hi,

    Sorry for my delay.

    For the PowerShell command: new-vmgroup, we should create group like: new-vmgrouop -computername <hostname instead of cluster name>.

    Here is the official explain for the command for your reference.

    https://docs.microsoft.com/en-us/powershell/module/hyper-v/new-vmgroup?view=win10-ps

    Hope above information can help you.

    If you have other questions, please feel free to let me know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    15 Juni 2018 3:29
  • Thanks for the reply, but I don't quite understand how that's supposed to work then. If I create the group with 2 VMs on a host and then migrate one to a different host, the other host doesn't appear to know anything about the group nor does it take whatever action I make on the group, ie creating a snapshot. I thought the whole point of these groups was to coordinate an action, like a snapshot, across multiple VMs at the same time, but I'm still not seeing how any of these commandlets work in a clustered environment at all.
    15 Juni 2018 10:50
  • Hi,

    May I know how did you run the command to create the group?

    To create such group, I would like to you run the command: new-vmgroup -computer <type multiple hosts and separate with dot>.

    Best Regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    19 Juni 2018 10:16
  • Michael,

    I did eventually find you can create a group on every host manually by forcing the Id to be the same which seems a little clumsy, but does appear to work as it does update membership when being migrated. Since the PowerShell commandlets don't work as suggested for creating the snapshots (New-VMCheckpoint -VM (Get-VMGroup).VMMembers), I followed other advice by using WMI directly like below.

    $collSnapSvc = Get-WmiObject -Namespace Root\Virtualization\v2 Msvm_CollectionSnapshotService
    $vmColl = Get-WmiObject -Namespace Root\Virtualization\v2 Msvm_VirtualSystemCollection | ? "ElementName" -eq <GROUP NAME>
    $collSnapSvc.CreateSnapshot($vmColl, $null, 32768)

    This did create a snapshot, but ONLY if both guests in my collection are on the same host. How can you get this work with the VMs on separate hosts? Having them on the same host isn't very practical since one of the reasons people use a guest cluster is the protection of a failed host, most would create an availability set in VMM to keep them separated actually.

    Following this thread below, it still seems this simply doesn't work, has never worked, and Microsoft has no plans of making work until Server 2019.

    https://social.technet.microsoft.com/Forums/ie/en-US/0d6cddde-3ff3-4a50-a627-6ad7bf7667fd/cannot-create-checkpoint-when-shared-vhdset-vhds-is-used-by-vm-not-part-of-a-checkpoint?forum=winserverClustering


    19 Juni 2018 11:47