Index: /trunk/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py	(revision 84589)
+++ /trunk/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py	(revision 84590)
@@ -605,4 +605,23 @@
         return fRc;
 
+    def powerDownVM(self, oSession):
+        """
+        Power down the VM by calling guest process without wating
+        the VM is really powered off.
+        It helps the terminateBySession to stop the VM without aborting.
+        """
+
+        fRc, oGuestSession = self.createSession(oSession, 'Session for user: vbox',
+                                            'vbox', 'password', 10 * 1000, True);
+        if not fRc:
+            return fRc;
+
+        (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Power down the VM',
+                                                  30 * 1000, '/usr/bin/sudo',
+                                                  ['sudo', 'poweroff'],
+                                                  False, True);
+        fRc = self.closeSession(oGuestSession, True) and fRc and True; # pychecker hack.
+        return fRc;
+
     def installAdditions(self, oSession, oVM):
         """
@@ -924,4 +943,24 @@
 
         fRc = fRc and self.waitVMisReady(oSession);
+        return fRc;
+
+    def powerDownVM(self, oSession):
+        """
+        Power down the VM by calling guest process without wating
+        the VM is really powered off.
+        It helps the terminateBySession to stop the VM without aborting.
+        """
+
+        fRc, oGuestSession = self.createSession(oSession, 'Session for user: vbox',
+                                            'vbox', 'password', 10 * 1000, True);
+        if not fRc:
+            return fRc;
+
+        (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Power down the VM',
+                                                  30 * 1000, 'C:\\Windows\\System32\\shutdown.exe',
+                                                  ['C:\\Windows\\System32\\shutdown.exe', '/f',
+                                                   '/s', '/t', '0'],
+                                                  False, True);
+        fRc = self.closeSession(oGuestSession, True) and fRc and True; # pychecker hack.
         return fRc;
 
@@ -1428,4 +1467,8 @@
             else:
                 reporter.log('Creating test users failed');
+
+            try:    oGuestOsHlp.powerDownVM(oSession);
+            except: pass;
+
         else:
             reporter.log('Guest OS helper not created for VM %s' % (sVmName));
@@ -1480,5 +1523,6 @@
             if oSession is not None:
                 fRc = self.testAutostartRunProgs(oSession, sVmName, oVM);
-                self.terminateVmBySession(oSession);
+                try:    self.terminateVmBySession(oSession);
+                except: pass;
                 self.deleteVM(oVM);
             else:
