1.9. Using VM Groups

VM groups enable the user to create ad hoc groups of VMs, and to manage and perform functions on them collectively, as well as individually.

The following figure shows VM groups displayed in VirtualBox Manager.

Figure 1.9 Groups of Virtual Machines


The following features are available for groups:

  • Create a group using the VirtualBox Manager. Do one of the following:

    • Drag one VM on top of another VM.

    • Select multiple VMs and select Group from the right-click menu.

  • Create and manage a group using the command line. Do one of the following:

    • Create a group and assign a VM. For example:

      VBoxManage modifyvm "vm01" --groups "/TestGroup"

      This command creates a group "TestGroup" and attaches the VM "vm01" to that group.

    • Detach a VM from the group, and delete the group if empty. For example:

      VBoxManage modifyvm "vm01" --groups ""

      This command detaches all groups from the VM "vm01" and deletes the empty group.

  • Create multiple groups. For example:

    VBoxManage modifyvm "vm01" --groups "/TestGroup,/TestGroup2"

    This command creates the groups "TestGroup" and "TestGroup2", if they do not exist, and attaches the VM "vm01" to both of them.

  • Create nested groups, having a group hierarchy. For example:

    VBoxManage modifyvm "vm01" --groups "/TestGroup/TestGroup2"

    This command attaches the VM "vm01" to the subgroup "TestGroup2" of the "TestGroup" group.

  • The following is a summary of group commands: Start, Pause, Reset, Close (save state, send shutdown signal, poweroff), Discard Saved State, Show in File System, Sort.