<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en-us" id="gui-vmgroups">
  <title>Using VM Groups</title>
  
  <body>
    <p>Create VM groups if you want to manage several VMs together, and perform functions on them collectively, as well as individually.</p>
    <ul>
      <li>
        <p>Create a group using <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/>. Do one of the following:</p>
        <ul>
          <li>
            <p>Drag a VM on top of another VM.</p>
          </li>
          <li>
            <p>Select multiple VMs and choose <uicontrol>Move to Group</uicontrol>, <uicontrol>New Group</uicontrol> from the right-click menu.</p>
          </li>
        </ul>
      </li>
      <li>
        <p>A default name is assigned to new groups, following the format <uicontrol>New Group &lt;Number></uicontrol>. To rename the new group, right-click on the group's name and choose <uicontrol>Rename Group</uicontrol>. Type the new name, and then press Enter.</p>
      </li>
      <li>To remove a VM from a group, right-click the VM and choose <uicontrol>Move to Group</uicontrol>, <uicontrol>No Group</uicontrol>.</li>
      <li>
        <p>Create and manage a group using the command line. Do one of the following:</p>
        <ul>
          <li>
            <p>Create a group and assign a VM. For example:</p>
            <pre xml:space="preserve">VBoxManage modifyvm "vm01" --groups "/TestGroup"</pre>
            <p>This command creates a group <codeph>TestGroup</codeph> and attaches the VM <codeph>vm01</codeph> to that
              group. </p>
          </li>
          <li>
            <p>Detach a VM from the group, and delete the group if empty. For example:</p>
            <pre xml:space="preserve">VBoxManage modifyvm "vm01" --groups ""</pre>
            <p>This command detaches all groups from the VM <codeph>vm01</codeph> and deletes the empty group.</p>
          </li>
        </ul>
      </li>
      <li>
        <p>Create multiple groups. For example: </p>
        <pre xml:space="preserve">VBoxManage modifyvm "vm01" --groups "/TestGroup,/TestGroup2"</pre>
        <p>This command creates the groups <codeph>TestGroup</codeph> and <codeph>TestGroup2</codeph>, if they do not
          exist, and attaches the VM <codeph>vm01</codeph> to both of them. </p>
      </li>
      <li>
        <p>Create nested groups, having a group hierarchy. For example: </p>
        <pre xml:space="preserve">VBoxManage modifyvm "vm01" --groups "/TestGroup/TestGroup2"</pre>
        <p>This command attaches the VM <codeph>vm01</codeph> to the subgroup <codeph>TestGroup2</codeph> of the
            <codeph>TestGroup</codeph> group. </p>
      </li>
      <li>
        <p>Use <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/> menu options to control and manage all the VMs in a
          group. For example: <b outputclass="bold">Start</b>, <b outputclass="bold">Pause</b>, <b outputclass="bold"
            >Reset</b>, <b outputclass="bold">Close</b> (save state, send shutdown signal, poweroff), <b
            outputclass="bold">Discard Saved State</b>, <b outputclass="bold">Show in Explorer</b>, <b
            outputclass="bold">Sort</b>. </p>
      </li>
    </ul>
  </body>
  
</topic>
