Index: /trunk/src/VBox/Installer/linux/debian/VBox.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/VBox.sh	(revision 36713)
+++ /trunk/src/VBox/Installer/linux/debian/VBox.sh	(revision 36714)
@@ -3,5 +3,5 @@
 # Oracle VM VirtualBox
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -89,4 +89,7 @@
     exec "/usr/lib/virtualbox/vboxwebsrv" "$@"
     ;;
+  VBoxBalloonCtrl|vboxballoonctrl)
+    exec "/usr/lib/virtualbox/VBoxBalloonCtrl" "$@"
+    ;;
   *)
     echo "Unknown application - $APP"
Index: /trunk/src/VBox/Installer/linux/debian/lintian-override.in
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/lintian-override.in	(revision 36713)
+++ /trunk/src/VBox/Installer/linux/debian/lintian-override.in	(revision 36714)
@@ -89,4 +89,5 @@
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/components/VBoxXPCOMIPCC.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/kchmviewer /usr/lib/virtualbox
+%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxBalloonCtrl /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/vboxwebsrv /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/webtest /usr/lib/virtualbox
Index: /trunk/src/VBox/Installer/linux/debian/postinst.in
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/postinst.in	(revision 36713)
+++ /trunk/src/VBox/Installer/linux/debian/postinst.in	(revision 36714)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -129,5 +129,5 @@
 
 if [ "$1" = "configure" ]; then
-  # Start vboxdrv/vboxweb-service manually as we use our own error handling in postrm
+  # Start vboxdrv/vboxballoonctrl/vboxweb-service manually as we use our own error handling in postrm
   if [ -x "/etc/init.d/vboxdrv" ]; then
     update-rc.d vboxdrv defaults >/dev/null
@@ -180,4 +180,12 @@
     fi
   fi
+  if [ -x "/etc/init.d/vboxballoonctrl-service" ]; then
+    update-rc.d vboxballoonctrl-service defaults >/dev/null
+    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+        invoke-rc.d vboxballoonctrl-service start || exit $?
+    else
+        /etc/init.d/vboxballoonctrl-service start || exit $?
+    fi
+  fi
   if [ -x "/etc/init.d/vboxweb-service" ]; then
     update-rc.d vboxweb-service defaults >/dev/null
Index: /trunk/src/VBox/Installer/linux/debian/preinst.in
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/preinst.in	(revision 36713)
+++ /trunk/src/VBox/Installer/linux/debian/preinst.in	(revision 36714)
@@ -1,5 +1,5 @@
 #!/bin/bash
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -29,4 +29,12 @@
   VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null || true`
   if [ -n "$VBOXSVC_PID" ]; then
+    if [ -f /etc/init.d/vboxballoonctrl-service ]; then
+      # try graceful termination; terminate the ballon control service first
+      if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+        invoke-rc.d vboxballoonctrl-service stop || true
+      else
+        /etc/init.d/vboxballoonctrl-service stop || true
+      fi
+    fi
     if [ -f /etc/init.d/vboxweb-service ]; then
       # try graceful termination; terminate the webservice first
@@ -36,6 +44,6 @@
         /etc/init.d/vboxweb-service stop || true
       fi
-      kill -USR1 $VBOXSVC_PID
     fi
+    kill -USR1 $VBOXSVC_PID
     sleep 1
     if pidof VBoxSVC > /dev/null 2>&1; then
Index: /trunk/src/VBox/Installer/linux/debian/prerm.in
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/prerm.in	(revision 36713)
+++ /trunk/src/VBox/Installer/linux/debian/prerm.in	(revision 36714)
@@ -38,4 +38,10 @@
   VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null`
   if [ -n "$VBOXSVC_PID" ]; then
+    # try graceful termination; terminate the balloon control servic first
+    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+      invoke-rc.d vboxballoonctrl-service stop || true
+    else
+      /etc/init.d/vboxballoonctrl-service stop || true
+    fi
     # try graceful termination; terminate the webservice first
     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
Index: /trunk/src/VBox/Installer/linux/debian/rules
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/rules	(revision 36713)
+++ /trunk/src/VBox/Installer/linux/debian/rules	(revision 36714)
@@ -1,5 +1,5 @@
 #!/usr/bin/make -f
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -178,5 +178,6 @@
 	dh_testroot
 	rm -f debian/changelog debian/preinst debian/postinst debian/prerm
-	rm -f debian/$(package).init debian/vboxdrv.init debian/vboxweb-service.init
+	rm -f debian/$(package).init debian/vboxdrv.init
+	rm -f debian/vboxballoonctrl-service.init debian/vboxweb-service.init
 	rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
 	rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
@@ -249,5 +250,5 @@
 	for i in VBoxManage VBoxSVC $(if $(HEADLESS),,VBoxSDL) \
 	    $(if $(NOQT),,VirtualBox) VBoxHeadless \
-	    VBoxExtPackHelperApp \
+	    VBoxExtPackHelperApp VBoxBalloonCtrl \
 	    $(if $(NOWEBSVC),,vboxwebsrv webtest); do \
 	    mv $(archdir)/$$i $(prefix)/usr/lib/$(package); done
@@ -295,4 +296,6 @@
 	    usr/bin/VBox                        usr/bin/VBoxHeadless \
 	    usr/bin/VBox                        usr/bin/vboxheadless \
+	    usr/bin/VBox                        usr/bin/VBoxBalloonCtrl \
+	    usr/bin/VBox                        usr/bin/vboxballoonctrl \
 	    $(if $(NOWEBSVC),,usr/bin/VBox      usr/bin/vboxwebsrv) \
 	    usr/share/virtualbox/src/vboxhost   usr/src/vboxhost-$(ver)
@@ -306,4 +309,10 @@
 	    $(vboxroot)/src/VBox/Installer/linux/vboxdrv.sh.in > debian/vboxdrv.init
 	dh_installinit --name=vboxdrv --noscripts
+	sed \
+	    -e 's|%NOLSB%||g' \
+	    -e 's|%DEBIAN%|yes|g' \
+	    -e 's|%PACKAGE%|virtualbox|g' \
+	    $(vboxroot)/src/VBox/Installer/linux/vboxballoonctrl-service.sh.in > debian/vboxballoonctrl-service.init
+	dh_installinit --name=vboxballoonctrl-service --noscripts
 	sed \
 	    -e 's|%NOLSB%||g' \
Index: /trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
===================================================================
--- /trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec	(revision 36713)
+++ /trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec	(revision 36714)
@@ -4,5 +4,5 @@
 
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -105,5 +105,5 @@
 rmdir icons
 mv virtualbox.xml $RPM_BUILD_ROOT/usr/share/mime/packages
-for i in VBoxManage VBoxSVC VBoxSDL VirtualBox VBoxHeadless VBoxExtPackHelperApp vboxwebsrv webtest; do
+for i in VBoxManage VBoxSVC VBoxSDL VirtualBox VBoxHeadless VBoxExtPackHelperApp VBoxBalloonCtrl vboxwebsrv webtest; do
   mv $i $RPM_BUILD_ROOT/usr/lib/virtualbox; done
 for i in VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl; do
@@ -138,6 +138,8 @@
 ln -sf ../etc/init.d/vboxdrv $RPM_BUILD_ROOT/sbin/rcvboxdrv
 %endif
+install -D -m 755 vboxballoonctrl-service.init $RPM_BUILD_ROOT%{_initrddir}/vboxballoonctrl-service
 install -D -m 755 vboxweb-service.init $RPM_BUILD_ROOT%{_initrddir}/vboxweb-service
 %if %{?rpm_suse:1}%{!?rpm_suse:0}
+ln -sf ../etc/init.d/vboxballoonctrl-service $RPM_BUILD_ROOT/sbin/rcvboxballoonctrl-service
 ln -sf ../etc/init.d/vboxweb-service $RPM_BUILD_ROOT/sbin/rcvboxweb-service
 %endif
@@ -151,4 +153,6 @@
 ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxHeadless
 ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxheadless
+ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxBalloonCtrl
+ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxballoonctrl
 ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxwebsrv
 ln -s /usr/share/virtualbox/src/vboxhost $RPM_BUILD_ROOT/usr/src/vboxhost-%VER%
@@ -165,10 +169,14 @@
 if [ -n "$VBOXSVC_PID" ]; then
   # executed before the new package is installed!
+  if [ -f /etc/init.d/vboxballoonctrl-service ]; then
+    # try graceful termination; terminate the balloon control service first
+    /etc/init.d/vboxballoonctrl-service stop 2>/dev/null || true
+  fi
   if [ -f /etc/init.d/vboxweb-service ]; then
     # try graceful termination; terminate the webservice first
     /etc/init.d/vboxweb-service stop 2>/dev/null || true
-    # ask the daemon to terminate immediately
-    kill -USR1 $VBOXSVC_PID
-  fi
+  fi
+  # ask the daemon to terminate immediately
+  kill -USR1 $VBOXSVC_PID
   sleep 1
   if pidof VBoxSVC > /dev/null 2>&1; then
@@ -275,4 +283,5 @@
   chcon -t java_exec_t    /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1
   chcon -t java_exec_t    /usr/lib/virtualbox/VBoxExtPackHelperApp > /dev/null 2>&1
+  chcon -t java_exec_t    /usr/lib/virtualbox/VBoxBalloonCtrl > /dev/null 2>&1
   chcon -t java_exec_t    /usr/lib/virtualbox/vboxwebsrv > /dev/null 2>&1
 fi
@@ -288,12 +297,14 @@
 %if %{?rpm_redhat:1}%{!?rpm_redhat:0}
 /sbin/chkconfig --add vboxdrv
+/sbin/chkconfig --add vboxballoonctrl-service
 /sbin/chkconfig --add vboxweb-service
 %endif
 %if %{?rpm_suse:1}%{!?rpm_suse:0}
-%{fillup_and_insserv -f -y -Y vboxdrv vboxweb-service}
+%{fillup_and_insserv -f -y -Y vboxdrv vboxballoonctrl-service vboxweb-service}
 %endif
 %if %{?rpm_mdv:1}%{!?rpm_mdv:0}
 /sbin/ldconfig
 %_post_service vboxdrv
+%_post_service vboxballoonctrl-service
 %_post_service vboxweb-service
 %update_menus
@@ -339,4 +350,5 @@
   /etc/init.d/vboxdrv start > /dev/null
 fi
+/etc/init.d/vboxballoonctrl-service start > /dev/null
 /etc/init.d/vboxweb-service start > /dev/null
 
@@ -347,11 +359,15 @@
 # $1>=2: upgrade
 %if %{?rpm_suse:1}%{!?rpm_suse:0}
+%stop_on_removal vboxballoonctrl-service
 %stop_on_removal vboxweb-service
 %endif
 %if %{?rpm_mdv:1}%{!?rpm_mdv:0}
+%_preun_service vboxballoonctrl-service
 %_preun_service vboxweb-service
 %endif
 %if %{?rpm_redhat:1}%{!?rpm_redhat:0}
 if [ "$1" = 0 ]; then
+  /sbin/service vboxballoonctrl-service stop > /dev/null
+  /sbin/chkconfig --del vboxballoonctrl-service
   /sbin/service vboxweb-service stop > /dev/null
   /sbin/chkconfig --del vboxweb-service
@@ -400,9 +416,10 @@
 if [ "$1" -ge 1 ]; then
   /sbin/service vboxdrv restart > /dev/null 2>&1
+  /sbin/service vboxballoonctrl-service restart > /dev/null 2>&1
   /sbin/service vboxweb-service restart > /dev/null 2>&1
 fi
 %endif
 %if %{?rpm_suse:1}%{!?rpm_suse:0}
-%restart_on_update vboxdrv vboxweb-service
+%restart_on_update vboxdrv vboxballoonctrl-service vboxweb-service
 %insserv_cleanup
 %endif
@@ -428,8 +445,10 @@
 %doc VirtualBox*.chm
 %{_initrddir}/vboxdrv
+%{_initrddir}/vboxballoonctrl-service
 %{_initrddir}/vboxweb-service
 %{?rpm_suse: %{py_sitedir}/*}
 %{!?rpm_suse: %{python_sitelib}/*}
 %{?rpm_suse: /sbin/rcvboxdrv}
+%{?rpm_suse: /sbin/rcvboxballoonctrl-service}
 %{?rpm_suse: /sbin/rcvboxweb-service}
 /lib/modules
Index: /trunk/src/VBox/Installer/linux/rpm/rules
===================================================================
--- /trunk/src/VBox/Installer/linux/rpm/rules	(revision 36713)
+++ /trunk/src/VBox/Installer/linux/rpm/rules	(revision 36714)
@@ -2,5 +2,5 @@
 
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -182,4 +182,9 @@
 	   -e 's|%DEBIAN%||g' \
 	   -e 's|%PACKAGE%|virtualbox|g' \
+	   vboxballoonctrl-service.sh.in > $(archdir)/vboxballoonctrl-service.init
+	sed \
+	   -e 's|%NOLSB%|yes|g' \
+	   -e 's|%DEBIAN%||g' \
+	   -e 's|%PACKAGE%|virtualbox|g' \
 	   vboxweb-service.sh.in > $(archdir)/vboxweb-service.init
 	cp debian/VBox.sh $(archdir)
