Index: /trunk/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py	(revision 84640)
+++ /trunk/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py	(revision 84641)
@@ -280,7 +280,6 @@
         Returns (True, ProcessStatus, ProcessExitCode, ProcessStdOutBuffer) on success or (False, 0, 0, None) on failure.
         """
+        _ = sTestName;
         fRc = True; # Be optimistic.
-
-        reporter.testStart(sTestName);
 
         reporter.log2('Using session user=%s, name=%s, timeout=%d'
@@ -410,5 +409,4 @@
             fRc = reporter.errorXcpt('asArgs=%s' % (asArgs,));
         reporter.log2('Process (PID %d) has exit code: %d; status: %d ' % (iPid, iExitCode, uExitStatus));
-        reporter.testDone();
 
         return (fRc, uExitStatus, iExitCode, aBuf);
@@ -549,4 +547,5 @@
         cAttempt = 0;
         oGuestSession = None;
+        fRc = False;
         while cAttempt < 30:
             fRc, oGuestSession = self.createSession(oSession, 'Session for user: vbox',
@@ -570,11 +569,18 @@
         Returns result and guest session obtained after reboot
         """
+        reporter.testStart('Reboot VM and wait for readiness');
         (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Reboot the VM',
                                                   30 * 1000, '/usr/bin/sudo',
                                                   ['sudo', 'reboot'],
                                                   False, True);
+        if not fRc:
+            reporter.error('Calling the reboot utility failed');
         fRc = self.closeSession(oGuestSession, True) and fRc and True; # pychecker hack.
         if fRc:
             (fRc, oGuestSession) = self.waitVMisReady(oSession);
+
+        if not fRc:
+            reporter.error('VM is not ready after reboot');
+        reporter.testDone();
         return (fRc, oGuestSession);
 
@@ -588,4 +594,6 @@
         if oGuestSession is None:
             return False;
+
+        reporter.testStart('Power down the VM');
 
         (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Power down the VM',
@@ -593,5 +601,11 @@
                                                   ['sudo', 'poweroff'],
                                                   False, True);
+        if not fRc:
+            reporter.error('Calling the poweroff utility failed');
         fRc = self.closeSession(oGuestSession, True) and fRc and True; # pychecker hack.
+
+        if not fRc:
+            reporter.error('Power down the VM failed');
+        reporter.testDone();
         return fRc;
 
@@ -600,4 +614,5 @@
         Install guest additions in the guest.
         """
+        reporter.testStart('Install Guest Additions');
 
         fRc = False;
@@ -668,8 +683,12 @@
                     asLogFile.append('/var/log/vboxadd-install.log');
                     self.downloadFiles(oGuestSession, asLogFile, fIgnoreErrors = True);
+            else:
+                reporter.error('Installing guest additions failed: Error occured during vbox installer execution')
 
         if fRc:
             (fRc, oGuestSession) = self.rebootVMAndCheckReady(oSession, oGuestSession);
-
+            if not fRc:
+                reporter.error('Reboot after installing GuestAdditions failed');
+        reporter.testDone();
         return (fRc, oGuestSession);
 
@@ -681,8 +700,11 @@
             return False;
 
+        reporter.testStart('Install Virtualbox into the guest VM');
+
         fRc = self.uploadFile(oGuestSession, self.sTestBuild,
                               '/tmp/' + os.path.basename(self.sTestBuild));
-
-        if fRc:
+        if not fRc:
+            reporter.error('Upload the vbox installer into guest VM failed');
+        else:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession,
                                                       'Allowing execution for the vbox installer',
@@ -691,4 +713,6 @@
                                                        '/tmp/' + os.path.basename(self.sTestBuild)],
                                                       False, True);
+            if not fRc:
+                reporter.error('Allowing execution for the vbox installer failed');
         if fRc:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Installing VBox',
@@ -697,4 +721,7 @@
                                                        '/tmp/' + os.path.basename(self.sTestBuild),],
                                                       False, True);
+            if not fRc:
+                reporter.error('Installing VBox failed');
+        reporter.testDone();
         return fRc;
 
@@ -704,5 +731,5 @@
         Configures the autostart feature in the guest.
         """
-
+        reporter.testStart('Configure autostart');
         # Create autostart database directory writeable for everyone
         (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Creating autostart database',
@@ -710,8 +737,13 @@
                                                   ['/usr/bin/sudo', '/bin/mkdir', '-m', '1777', '/etc/vbox/autostart.d'],
                                                   False, True);
+        if not fRc:
+            reporter.error('Creating autostart database failed');
         # Create /etc/default/virtualbox
-        sVBoxCfg =   'VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg\n' \
-                   + 'VBOXAUTOSTART_DB=/etc/vbox/autostart.d\n';
-        fRc = fRc and self.uploadString(oGuestSession, sVBoxCfg, '/tmp/virtualbox');
+        if fRc:
+            sVBoxCfg =   'VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg\n' \
+                       + 'VBOXAUTOSTART_DB=/etc/vbox/autostart.d\n';
+            fRc = self.uploadString(oGuestSession, sVBoxCfg, '/tmp/virtualbox');
+            if not fRc:
+                reporter.error('Upload to /tmp/virtualbox failed');
         if fRc:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Moving to destination',
@@ -720,4 +752,6 @@
                                                        '/etc/default/virtualbox'],
                                                       False, True);
+            if not fRc:
+                reporter.error('Moving the /tmp/virtualbox to destination failed');
         if fRc:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Setting permissions',
@@ -726,7 +760,13 @@
                                                        '/etc/default/virtualbox'],
                                                       False, True);
-
-        sVBoxCfg = self._createAutostartCfg(sDefaultPolicy, asUserAllow, asUserDeny);
-        fRc = fRc and self.uploadString(oGuestSession, sVBoxCfg, '/tmp/autostart.cfg');
+            if not fRc:
+                reporter.error('Setting permissions for the virtualbox failed');
+
+        if fRc:
+            sVBoxCfg = self._createAutostartCfg(sDefaultPolicy, asUserAllow, asUserDeny);
+            fRc = self.uploadString(oGuestSession, sVBoxCfg, '/tmp/autostart.cfg');
+            if not fRc:
+                reporter.error('Upload to /tmp/autostart.cfg failed');
+
         if fRc:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Moving to destination',
@@ -735,4 +775,6 @@
                                                        '/etc/vbox/autostart.cfg'],
                                                       False, True);
+            if not fRc:
+                reporter.error('Moving the /tmp/autostart.cfg to destination failed');
         if fRc:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Setting permissions',
@@ -741,4 +783,7 @@
                                                        '/etc/vbox/autostart.cfg'],
                                                       False, True);
+            if not fRc:
+                reporter.error('Setting permissions for the autostart.cfg failed');
+        reporter.testDone();
         return fRc;
 
@@ -747,9 +792,12 @@
         Create a new user with the given name
         """
-
+        reporter.testStart('Create user %s' % sUser);
         (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Creating new user',
                                                   30 * 1000, '/usr/bin/sudo',
                                                   ['/usr/bin/sudo', '/usr/sbin/useradd', '-m', '-U',
                                                    sUser], False, True);
+        if not fRc:
+            reporter.error('Create user %s failed' % sUser);
+        reporter.testDone();
         return fRc;
 
@@ -764,4 +812,6 @@
 
         _ = oSession;
+
+        reporter.testStart('Create test VM for user %s' % sUser);
 
         (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Configuring autostart database',
@@ -770,5 +820,7 @@
                                                    'setproperty', 'autostartdbpath', '/etc/vbox/autostart.d'],
                                                   False, True);
-        if fRc:
+        if not fRc:
+            reporter.error('Configuring autostart database failed');
+        else:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Create VM ' + sVmName,
                                                       30 * 1000, '/usr/bin/sudo',
@@ -776,4 +828,6 @@
                                                        '/opt/VirtualBox/VBoxManage', 'createvm',
                                                        '--name', sVmName, '--register'], False, True);
+            if not fRc:
+                reporter.error('Create VM %s failed' % sVmName);
         if fRc:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Enabling autostart for test VM',
@@ -782,4 +836,7 @@
                                                        '/opt/VirtualBox/VBoxManage', 'modifyvm',
                                                       sVmName, '--autostart-enabled', 'on'], False, True);
+            if not fRc:
+                reporter.error('Enabling autostart for %s failed' % sVmName);
+        reporter.testDone();
         return fRc;
 
@@ -793,4 +850,5 @@
         _ = oSession;
 
+        reporter.testStart('Check the VM %s is running for user %s' % (sVmName, sUser));
         (fRc, _, _, aBuf) = self.guestProcessExecute(oGuestSession, 'Check for running VM',
                                                      30 * 1000, '/usr/bin/sudo',
@@ -798,9 +856,12 @@
                                                       '/opt/VirtualBox/VBoxManage',
                                                       'list', 'runningvms'], True, True);
-        if fRc:
+        if not fRc:
+            reporter.error('Checking the VM %s is running for user %s failed' % (sVmName, sUser));
+        else:
             bufWrapper = VBoxManageStdOutWrapper();
             bufWrapper.write(aBuf);
             fRc = bufWrapper.sVmRunning == sVmName;
 
+        reporter.testDone();
         return fRc;
 
@@ -872,5 +933,5 @@
         Reboot the VM and wait the VM is ready.
         """
-
+        reporter.testStart('Reboot VM and wait for readiness');
         (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Reboot the VM',
                                                   30 * 1000, 'C:\\Windows\\System32\\shutdown.exe',
@@ -878,7 +939,12 @@
                                                    '/r', '/t', '0'],
                                                   False, True);
+        if not fRc:
+            reporter.error('Calling the shutdown utility failed');
         fRc = self.closeSession(oGuestSession, True) and fRc and True; # pychecker hack.
         if fRc:
             (fRc, oGuestSession) = self.waitVMisReady(oSession);
+        if not fRc:
+            reporter.error('VM is not ready after reboot');
+        reporter.testDone();
         return (fRc, oGuestSession);
 
@@ -893,4 +959,5 @@
             return False;
 
+        reporter.testStart('Power down the VM');
         (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Power down the VM',
                                                   30 * 1000, 'C:\\Windows\\System32\\shutdown.exe',
@@ -898,5 +965,10 @@
                                                    '/s', '/t', '0'],
                                                   False, True);
+        if not fRc:
+            reporter.error('Calling the shutdown utility failed');
         fRc = self.closeSession(oGuestSession, True) and fRc and True; # pychecker hack.
+        if not fRc:
+            reporter.error('Power down the VM failed');
+        reporter.testDone();
         return fRc;
 
@@ -911,4 +983,5 @@
         #       deletion errors from the guest side (e.g. sharing violations) and just continue.
         #
+        reporter.testStart('Install Guest Additions');
         asLogFiles = [];
         fHaveSetupApiDevLog = False;
@@ -975,5 +1048,9 @@
                     #
                     self.downloadFiles(oGuestSession, asLogFiles, fIgnoreErrors = True);
-
+                else:
+                    reporter.error('Reboot after installing GuestAdditions failed');
+            else:
+                reporter.error('Create session for user vbox after GA updating failed');
+        reporter.testDone();
         return (fRc, oGuestSession);
 
@@ -985,10 +1062,11 @@
         if self.sTestBuild is None:
             return False;
-
+        reporter.testStart('Install Virtualbox into the guest VM');
         # Used windows image already contains the C:\Temp
         fRc = self.uploadFile(oGuestSession, self.sTestBuild,
                               'C:\\Temp\\' + os.path.basename(self.sTestBuild));
-
-        if fRc:
+        if not fRc:
+            reporter.error('Upload the installing into guest VM failed');
+        else:
             if self.sTestBuild.endswith('.msi'):
                 (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Installing VBox',
@@ -997,4 +1075,6 @@
                                                          'C:\\Temp\\' + os.path.basename(self.sTestBuild)],
                                                         False, True);
+                if not fRc:
+                    reporter.error('Installing the VBox from msi installer failed');
             else:
                 (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Installing VBox',
@@ -1002,4 +1082,7 @@
                                                         ['C:\\Temp\\' + os.path.basename(self.sTestBuild), '--silent'],
                                                         False, True);
+                if not fRc:
+                    reporter.error('Installing the VBox failed');
+        reporter.testDone();
         return fRc;
 
@@ -1009,5 +1092,5 @@
         Configures the autostart feature in the guest.
         """
-
+        reporter.testStart('Configure autostart');
         # Create autostart database directory writeable for everyone
         (fRc, _, _, _) = \
@@ -1019,7 +1102,13 @@
                                       'C:\\ProgramData\\autostart.cfg', '/f'],
                                      False, True);
-
-        sVBoxCfg = self._createAutostartCfg(sDefaultPolicy, asUserAllow, asUserDeny);
-        fRc = fRc and self.uploadString(oGuestSession, sVBoxCfg, 'C:\\ProgramData\\autostart.cfg');
+        if not fRc:
+            reporter.error('Setting the autostart environment variable failed');
+
+        if fRc:
+            sVBoxCfg = self._createAutostartCfg(sDefaultPolicy, asUserAllow, asUserDeny);
+            fRc = self.uploadString(oGuestSession, sVBoxCfg, 'C:\\ProgramData\\autostart.cfg');
+            if not fRc:
+                reporter.error('Upload the autostart.cfg failed');
+        reporter.testDone();
         return fRc;
 
@@ -1029,32 +1118,46 @@
         """
         _ = oGuestSession;
+
+        reporter.testStart('Create test VM for user %s' % sUser);
 
         fRc, oGuestSession = self.createSession(oSession, 'Session for user: %s' % (sUser,),
                                                 sUser, 'password', 10 * 1000, True);
         if not fRc:
-            return fRc;
-
-        (fRc, _, _, _) = \
-            self.guestProcessExecute(oGuestSession, 'Create VM ' + sVmName,
-                                     30 * 1000, 'C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
-                                     ['C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe', 'createvm',
-                                      '--name', sVmName, '--register'], False, True);
-        if fRc:
+            reporter.error('Create session for user %s failed' % sUser);
+        else:
             (fRc, _, _, _) = \
-                self.guestProcessExecute(oGuestSession, 'Enabling autostart for test VM',
+                self.guestProcessExecute(oGuestSession, 'Create VM ' + sVmName,
                                          30 * 1000, 'C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
-                                         ['C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
-                                          'modifyvm', sVmName, '--autostart-enabled', 'on'], False, True);
-        fRc = fRc and self.uploadString(oGuestSession, 'password', 'C:\\ProgramData\\password.cfg');
-        if fRc:
-            (fRc, _, _, _) = \
-                self.guestProcessExecute(oGuestSession, 'Install autostart service for the user',
-                                         30 * 1000, 'C:\\Program Files\\Oracle\\VirtualBox\\VBoxAutostartSvc.exe',
-                                         ['C:\\Program Files\\Oracle\\VirtualBox\\VBoxAutostartSvc.exe',
-                                          'install', '--user=' + sUser,
-                                          '--password-file=C:\\ProgramData\\password.cfg'],
-                                         False, True);
-        fRc = self.closeSession(oGuestSession, True) and fRc and True; # pychecker hack.
-
+                                         ['C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe', 'createvm',
+                                          '--name', sVmName, '--register'], False, True);
+            if not fRc:
+                reporter.error('Create VM %s for user %s failed' % (sVmName, sUser));
+            else:
+                (fRc, _, _, _) = \
+                    self.guestProcessExecute(oGuestSession, 'Enabling autostart for test VM',
+                                             30 * 1000, 'C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
+                                             ['C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
+                                              'modifyvm', sVmName, '--autostart-enabled', 'on'], False, True);
+                if not fRc:
+                    reporter.error('Enabling autostart for VM %s for user %s failed' % (sVmName, sUser));
+            if fRc:
+                fRc = self.uploadString(oGuestSession, 'password', 'C:\\ProgramData\\password.cfg');
+                if not fRc:
+                    reporter.error('Upload the password.cfg failed');
+            if fRc:
+                (fRc, _, _, _) = \
+                    self.guestProcessExecute(oGuestSession, 'Install autostart service for the user',
+                                             30 * 1000, 'C:\\Program Files\\Oracle\\VirtualBox\\VBoxAutostartSvc.exe',
+                                             ['C:\\Program Files\\Oracle\\VirtualBox\\VBoxAutostartSvc.exe',
+                                              'install', '--user=' + sUser,
+                                              '--password-file=C:\\ProgramData\\password.cfg'],
+                                             False, True);
+                if not fRc:
+                    reporter.error('Install autostart service for user %s failed' % (sVmName, sUser));
+            fRc1 = self.closeSession(oGuestSession, True);
+            if not fRc1:
+                reporter.error('Closing session for user %s failed' % sUser);
+            fRc = fRc1 and fRc and True; # pychecker hack.
+        reporter.testDone();
         return fRc;
 
@@ -1065,21 +1168,28 @@
 
         _ = oGuestSession;
+
+        reporter.testStart('Check the VM %s is running for user %s' % (sVmName, sUser));
 
         fRc, oGuestSession = self.createSession(oSession, 'Session for user: %s' % (sUser,),
                                                 sUser, 'password', 10 * 1000, True);
         if not fRc:
-            return fRc;
-
-        (fRc, _, _, aBuf) = self.guestProcessExecute(oGuestSession, 'Check for running VM',
-                                                   30 * 1000, 'C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
-                                                   ['C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
-                                                    'list', 'runningvms'], True, True);
-        if fRc:
-            bufWrapper = VBoxManageStdOutWrapper();
-            bufWrapper.write(aBuf);
-            fRc = bufWrapper.sVmRunning == sVmName;
-
-        fRc = self.closeSession(oGuestSession, True) and fRc and True; # pychecker hack.
-
+            reporter.error('Create session for user %s failed' % sUser);
+        else:
+            (fRc, _, _, aBuf) = self.guestProcessExecute(oGuestSession, 'Check for running VM',
+                                                       30 * 1000, 'C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
+                                                       ['C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe',
+                                                        'list', 'runningvms'], True, True);
+            if not fRc:
+                reporter.error('Checking the VM %s is running for user %s failed' % (sVmName, sUser));
+            else:
+                bufWrapper = VBoxManageStdOutWrapper();
+                bufWrapper.write(aBuf);
+                fRc = bufWrapper.sVmRunning == sVmName;
+
+            fRc1 = self.closeSession(oGuestSession, True);
+            if not fRc1:
+                reporter.error('Closing session for user %s failed' % sUser);
+            fRc = fRc1 and fRc and True; # pychecker hack.
+        reporter.testDone();
         return fRc;
 
@@ -1088,18 +1198,22 @@
         Create a new user with the given name
         """
-
+        reporter.testStart('Create user %s' % sUser);
         # Create user
         (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Creating user %s to run a VM' % sUser,
                                                 30 * 1000, 'C:\\Windows\\System32\\net.exe',
                                                 ['net', 'user', sUser, 'password', '/add' ], False, True);
-
+        if not fRc:
+            reporter.error('Creating user %s to run a VM failed' % sUser);
         # Add the user to Administrators group
-        if fRc:
+        else:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 'Adding the user %s to Administrators group' % sUser,
                                                       30 * 1000, 'C:\\Windows\\System32\\net.exe',
                                                       ['net', 'localgroup', 'Administrators', sUser, '/add' ], False, True);
+            if not fRc:
+                reporter.error('Adding the user %s to Administrators group failed' % sUser);
 
         #Allow the user to logon as service
-        sSecPolicyEditor = """
+        if fRc:
+            sSecPolicyEditor = """
 ' SetLogonAsAServiceRight.vbs
 ' Sample VBScript to set or grant Logon As A Service Right.
@@ -1136,5 +1250,7 @@
 WScript.Echo "Logon As A Service Right granted to user '"& strUserName &"'"
                            """ % sUser;
-        fRc = fRc and self.uploadString(oGuestSession, sSecPolicyEditor, 'C:\\Temp\\adjustsec.vbs');
+            fRc = self.uploadString(oGuestSession, sSecPolicyEditor, 'C:\\Temp\\adjustsec.vbs');
+            if not fRc:
+                reporter.error('Upload the adjustsec.vbs failed');
         if fRc:
             (fRc, _, _, _) = self.guestProcessExecute(oGuestSession,
@@ -1142,8 +1258,11 @@
                                                       30 * 1000, 'C:\\Windows\\System32\\cscript.exe',
                                                       ['cscript.exe', 'C:\\Temp\\adjustsec.vbs', '//Nologo'], False, True);
+            if not fRc:
+                reporter.error('Setting the "Logon as service" policy to the user %s failed' % sUser);
         try:
             oGuestSession.fsObjRemove('C:\\Temp\\adjustsec.vbs');
         except:
             fRc = reporter.errorXcpt('Removing policy script failed');
+        reporter.testDone();
         return fRc;
 
@@ -1377,13 +1496,13 @@
                                     reporter.error('Test VM is not running inside the guest for allowed user');
                             else:
-                                reporter.log('Rebooting the guest failed');
+                                reporter.error('Rebooting the guest failed');
                         else:
-                            reporter.log('Creating test VM failed');
+                            reporter.error('Creating test VM failed');
                     else:
-                        reporter.log('Configuring autostart in the guest failed');
+                        reporter.error('Configuring autostart in the guest failed');
                 else:
-                    reporter.log('Installing VirtualBox in the guest failed');
-            else:
-                reporter.log('Creating test users failed');
+                    reporter.error('Installing VirtualBox in the guest failed');
+            else:
+                reporter.error('Creating test users failed');
 
             if oGuestSession is not None:
@@ -1391,26 +1510,9 @@
                 except: pass;
         else:
-            reporter.log('Guest OS helper not created for VM %s' % (sVmName));
+            reporter.error('Guest OS helper not created for VM %s' % (sVmName));
             fRc = False;
 
         reporter.testDone();
         return fRc;
-
-    def deleteVM(self, oVM):
-        try:    self.oVBox.unregisterMachine(oVM.id);
-        except: pass;
-        if self.fpApiVer >= 4.0:
-            try:
-                if self.fpApiVer >= 4.3:
-                    oProgress = oVM.deleteConfig([]);
-                else:
-                    oProgress = oVM.delete(None);
-                self.waitOnProgress(oProgress);
-            except:
-                reporter.logXcpt();
-        else:
-            try:    oVM.deleteSettings();
-            except: reporter.logXcpt();
-        return None;
 
     def testAutostartOneCfg(self, sVmName):
@@ -1444,5 +1546,4 @@
                 try:    self.terminateVmBySession(oSession);
                 except: pass;
-                self.deleteVM(oVM);
             else:
                 fRc = False;
