Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp	(revision 42541)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp	(revision 42542)
@@ -531,4 +531,26 @@
 };
 
+class UIActionSimpleMachineAddGroupDialog : public UIActionSimple
+{
+    Q_OBJECT;
+
+public:
+
+    UIActionSimpleMachineAddGroupDialog(QObject *pParent)
+        : UIActionSimple(pParent, ":/add_shared_folder_16px.png")
+    {
+        retranslateUi();
+    }
+
+protected:
+
+    void retranslateUi()
+    {
+        setText(QApplication::translate("UIActionPool", "&Add group..."));
+        setStatusTip(QApplication::translate("UIActionPool", "Add a new group based on the items selected"));
+        setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMGroupShortcut));
+    }
+};
+
 class UIActionSimpleMachineSettingsDialog : public UIActionSimple
 {
@@ -944,4 +966,5 @@
     m_pool[UIActionIndexSelector_Simple_Machine_NewWizard] = new UIActionSimpleMachineNewWizard(this);
     m_pool[UIActionIndexSelector_Simple_Machine_AddDialog] = new UIActionSimpleMachineAddDialog(this);
+    m_pool[UIActionIndexSelector_Simple_Machine_AddGroupDialog] = new UIActionSimpleMachineAddGroupDialog(this);
     m_pool[UIActionIndexSelector_Simple_Machine_SettingsDialog] = new UIActionSimpleMachineSettingsDialog(this);
     m_pool[UIActionIndexSelector_Simple_Machine_CloneWizard] = new UIActionSimpleMachineCloneWizard(this);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h	(revision 42541)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h	(revision 42542)
@@ -52,4 +52,5 @@
     UIActionIndexSelector_Simple_Machine_NewWizard,
     UIActionIndexSelector_Simple_Machine_AddDialog,
+    UIActionIndexSelector_Simple_Machine_AddGroupDialog,
     UIActionIndexSelector_Simple_Machine_SettingsDialog,
     UIActionIndexSelector_Simple_Machine_CloneWizard,
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorShortcuts.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorShortcuts.cpp	(revision 42541)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorShortcuts.cpp	(revision 42542)
@@ -33,4 +33,5 @@
     m_Shortcuts[NewVMShortcut]               = UIKeySequence("NewVM",               "Ctrl+N");
     m_Shortcuts[AddVMShortcut]               = UIKeySequence("AddVM",               "Ctrl+A");
+    m_Shortcuts[AddVMGroupShortcut]          = UIKeySequence("AddVMGroup",          "Ctrl+U");
     m_Shortcuts[SettingsVMShortcut]          = UIKeySequence("SettingsVM",          "Ctrl+S");
     m_Shortcuts[CloneVMShortcut]             = UIKeySequence("CloneVM",             "Ctrl+O");
@@ -42,5 +43,5 @@
     m_Shortcuts[PauseVMShortcut]             = UIKeySequence("PauseVM",             "Ctrl+P");
     m_Shortcuts[ResetVMShortcut]             = UIKeySequence("ResetVM",             "Ctrl+T");
-    m_Shortcuts[ACPIShutdownVMShortcut]      = UIKeySequence("ACPIShutdownVM",      "Ctrl+U");
+    m_Shortcuts[ACPIShutdownVMShortcut]      = UIKeySequence("ACPIShutdownVM",      "Ctrl+H");
     m_Shortcuts[PowerOffVMShortcut]          = UIKeySequence("PowerOffVM",          "Ctrl+F");
     m_Shortcuts[RefreshVMShortcut]           = UIKeySequence("RefreshVM");
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorShortcuts.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorShortcuts.h	(revision 42541)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorShortcuts.h	(revision 42542)
@@ -35,4 +35,5 @@
         NewVMShortcut,
         AddVMShortcut,
+        AddVMGroupShortcut,
         SettingsVMShortcut,
         CloneVMShortcut,
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp	(revision 42541)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp	(revision 42542)
@@ -759,4 +759,5 @@
     m_pActionMachineSettingsDialog->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_SettingsDialog, items));
     m_pActionMachineCloneWizard->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_CloneWizard, items));
+    m_pActionMachineAddGroupDialog->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_AddGroupDialog, items));
     m_pActionMachineRemoveDialog->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_RemoveDialog, items));
     m_pActionMachineStartOrShow->setEnabled(isActionEnabled(UIActionIndexSelector_State_Machine_StartOrShow, items));
@@ -1206,4 +1207,6 @@
     m_pActionMachineCloneWizard = gActionPool->action(UIActionIndexSelector_Simple_Machine_CloneWizard);
     pMenu->addAction(m_pActionMachineCloneWizard);
+    m_pActionMachineAddGroupDialog = gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroupDialog);
+    pMenu->addAction(m_pActionMachineAddGroupDialog);
     m_pActionMachineRemoveDialog = gActionPool->action(UIActionIndexSelector_Simple_Machine_RemoveDialog);
     pMenu->addAction(m_pActionMachineRemoveDialog);
@@ -1235,4 +1238,5 @@
     m_machineActions << m_pActionMachineNewWizard << m_pActionMachineAddDialog
                      << m_pActionMachineSettingsDialog << m_pActionMachineCloneWizard
+                     << m_pActionMachineAddGroupDialog
                      << m_pActionMachineRemoveDialog << m_pActionMachineStartOrShow
                      << m_pActionMachineDiscard << m_pActionMachinePauseAndResume
@@ -1589,4 +1593,12 @@
                    pItem->sessionState() == KSessionState_Unlocked;
         }
+        case UIActionIndexSelector_Simple_Machine_AddGroupDialog:
+        {
+            /* Check that there is more than one item,
+             * all items are accessible and in 'powered off' states: */
+            return items.size() > 1 &&
+                   isItemsAccessible(items) &&
+                   isItemsPoweredOff(items);
+        }
         case UIActionIndexSelector_Simple_Group_RenameDialog:
         case UIActionIndexSelector_Simple_Group_RemoveDialog:
@@ -1768,2 +1780,14 @@
 }
 
+/* static */
+bool UISelectorWindow::isItemsPoweredOff(const QList<UIVMItem*> &items)
+{
+    foreach (UIVMItem *pItem, items)
+        if (!(pItem->machineState() == KMachineState_PoweredOff ||
+              pItem->machineState() == KMachineState_Saved ||
+              pItem->machineState() == KMachineState_Teleported ||
+              pItem->machineState() == KMachineState_Aborted))
+        return false;
+    return true;
+}
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h	(revision 42541)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h	(revision 42542)
@@ -139,4 +139,5 @@
     static bool isItemsHasUnlockedSession(const QList<UIVMItem*> &items);
     static bool isItemsSupportsShortcuts(const QList<UIVMItem*> &items);
+    static bool isItemsPoweredOff(const QList<UIVMItem*> &items);
 
     /* Central splitter window: */
@@ -192,4 +193,5 @@
     UIAction *m_pActionMachineSettingsDialog;
     UIAction *m_pActionMachineCloneWizard;
+    UIAction *m_pActionMachineAddGroupDialog;
     UIAction *m_pActionMachineRemoveDialog;
     UIAction *m_pActionMachineStartOrShow;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp	(revision 42541)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp	(revision 42542)
@@ -657,4 +657,44 @@
         unregisterMachines(names);
     }
+}
+
+void UIGChooserModel::sltAddGroupBasedOnChosenItems()
+{
+    /* Create new group in the current root: */
+    UIGChooserItemGroup *pNewGroupItem = new UIGChooserItemGroup(root(), uniqueGroupName(root()));
+    /* Enumerate all the currently chosen items: */
+    QStringList busyGroupNames;
+    QStringList busyMachineNames;
+    foreach (UIGChooserItem *pItem, selectionList())
+    {
+        /* For each of known types: */
+        switch (pItem->type())
+        {
+            case UIGChooserItemType_Group:
+            {
+                /* Avoid name collisions: */
+                if (busyGroupNames.contains(pItem->name()))
+                    break;
+                /* Copy group item: */
+                new UIGChooserItemGroup(pNewGroupItem, pItem->toGroupItem());
+                busyGroupNames << pItem->name();
+                break;
+            }
+            case UIGChooserItemType_Machine:
+            {
+                /* Avoid name collisions: */
+                if (busyMachineNames.contains(pItem->name()))
+                    break;
+                /* Copy machine item: */
+                new UIGChooserItemMachine(pNewGroupItem, pItem->toMachineItem());
+                busyMachineNames << pItem->name();
+                break;
+            }
+        }
+    }
+    /* Update model: */
+    updateNavigation();
+    updateLayout();
+    setCurrentItem(pNewGroupItem);
 }
 
@@ -774,4 +814,5 @@
     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_SettingsDialog));
     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_CloneWizard));
+    m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroupDialog));
     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_RemoveDialog));
     m_pContextMenuMachine->addSeparator();
@@ -798,4 +839,6 @@
     connect(gActionPool->action(UIActionIndexSelector_Simple_Group_RemoveDialog), SIGNAL(triggered()),
             this, SLOT(sltRemoveCurrentlySelectedGroup()));
+    connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroupDialog), SIGNAL(triggered()),
+            this, SLOT(sltAddGroupBasedOnChosenItems()));
     connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_RemoveDialog), SIGNAL(triggered()),
             this, SLOT(sltRemoveCurrentlySelectedMachine()));
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h	(revision 42541)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h	(revision 42542)
@@ -156,4 +156,7 @@
     void sltRemoveCurrentlySelectedMachine();
 
+    /* Handler: Group add stuff: */
+    void sltAddGroupBasedOnChosenItems();
+
     /* Handler: Group name editing stuff: */
     void sltStartEditingSelectedGroup();
