cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#!/usr/bin/env python
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# -*- coding: utf-8 -*-
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# $Id$
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox Validation Kit - Guest OS installation tests.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync__copyright__ = \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncCopyright (C) 2010-2014 Oracle Corporation
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncThis file is part of VirtualBox Open Source Edition (OSE), as
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncavailable from http://www.virtualbox.org. This file is free software;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncyou can redistribute it and/or modify it under the terms of the GNU
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncGeneral Public License (GPL) as published by the Free Software
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncFoundation, in version 2 as it comes in the "COPYING" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox OSE distribution. VirtualBox OSE is distributed in the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynchope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncThe contents of this file may alternatively be used under the terms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncof the Common Development and Distribution License Version 1.0
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync(CDDL) only, as it comes in the "COPYING.CDDL" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox OSE distribution, in which case the provisions of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncCDDL are applicable instead of those of the GPL.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncYou may elect to license modified versions of this file under the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncterms and conditions of either the GPL or the CDDL or both.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync__version__ = "$Revision$"
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Standard Python imports.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport os
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport sys
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Only the main script needs to modify the path.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynctry: __file__
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncexcept: __file__ = sys.argv[0]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncg_ksValidationKitDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncsys.path.append(g_ksValidationKitDir)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Validation Kit imports.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testdriver import vbox;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testdriver import base;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testdriver import reporter;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testdriver import vboxcon;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testdriver import vboxtestvms;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncclass InstallTestVm(vboxtestvms.TestVm):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """ Installation test VM. """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## @name The primary controller, to which the disk will be attached.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksSataController = 'SATA Controller'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksIdeController = 'IDE Controller'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## @name VM option flags (OR together).
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## @{
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kf32Bit = 0x01;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kf64Bit = 0x02;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kfReqIoApic = 0x10;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kfReqIoApicSmp = 0x20;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kfReqPae = 0x40;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kfIdeIrqDelay = 0x80;
3daed950597e4ad86ca38b69143be9ccfbc98623vboxsync kfUbuntuNewAmdBug = 0x100;
3daed950597e4ad86ca38b69143be9ccfbc98623vboxsync kfNoWin81Paravirt = 0x200;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## @}
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## IRQ delay extra data config for win2k VMs.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kasIdeIrqDelay = [ 'VBoxInternal/Devices/piix3ide/0/Config/IRQDelay:1', ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## Install ISO path relative to the testrsrc root.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksIsoPathBase = os.path.join('4.2', 'isos');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def __init__(self, oSet, sVmName, sKind, sInstallIso, sHdCtrlNm, cGbHdd, fFlags):
dafe301ef1f0570931a0cfbdae10556163d54ac3vboxsync vboxtestvms.TestVm.__init__(self, oSet, sVmName, sKind = sKind, sHddControllerType = sHdCtrlNm,
6943863c190e951f08adf261d420e888375052c0vboxsync fRandomPvPMode = (fFlags & self.kfNoWin81Paravirt) == 0);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.sDvdImage = os.path.join(self.ksIsoPathBase, sInstallIso);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.cGbHdd = cGbHdd;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.fInstVmFlags = fFlags;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fFlags & self.kfReqPae:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.fPae = True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fFlags & (self.kfReqIoApic | self.kfReqIoApicSmp):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.fIoApic = True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Tweaks
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.iOptRamAdjust = 0;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.asExtraData = [];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fFlags & self.kfIdeIrqDelay:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.asExtraData = self.kasIdeIrqDelay;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def detatchAndDeleteHd(self, oTestDrv):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Detaches and deletes the HD.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Returns success indicator, error info logged.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oVM = oTestDrv.getVmByName(self.sVmName);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oVM is not None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSession = oTestDrv.openSession(oVM);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oSession is not None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (fRc, oHd) = oSession.detachHd(self.sHddControllerType, iPort = 0, iDevice = 0);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fRc is True and oHd is not None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = oSession.saveSettings();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oTestDrv.oVBox.deleteHdByMedium(oHd);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.saveSettings(); # Necessary for media reg?
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = oSession.close() and fRc;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return fRc;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def getReconfiguredVm(self, oTestDrv, cCpus, sVirtMode, sParavirtMode=None):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Do the standard reconfig in the base class first, it'll figure out
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # if we can run the VM as requested.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (fRc, oVM) = vboxtestvms.TestVm.getReconfiguredVm(self, oTestDrv, cCpus, sVirtMode, sParavirtMode);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Make sure there is no HD from the previous run attached nor taking
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # up storage on the host.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fRc is True:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = self.detatchAndDeleteHd(oTestDrv);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Check for ubuntu installer vs. AMD host CPU.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fRc is True and (self.fInstVmFlags & self.kfUbuntuNewAmdBug):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if self.isHostCpuAffectedByUbuntuNewAmdBug(oTestDrv):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return (None, None); # (skip)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Make adjustments to the default config, and adding a fresh HD.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fRc is True:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSession = oTestDrv.openSession(oVM);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oSession is not None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if self.sHddControllerType == self.ksSataController:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.setStorageControllerType(vboxcon.StorageControllerType_IntelAhci,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.sHddControllerType)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.setStorageControllerPortCount(self.sHddControllerType, 1)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync try:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHddPath = os.path.join(os.path.dirname(oVM.settingsFilePath),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync '%s-%s-%s.vdi' % (self.sVmName, sVirtMode, cCpus,));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync except:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.errorXcpt();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHddPath = None;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.createAndAttachHd(sHddPath,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync cb = self.cGbHdd * 1024*1024*1024,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sController = self.sHddControllerType,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync iPort = 0,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fImmutable = False);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Set proper boot order
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.setBootOrder(1, vboxcon.DeviceType_HardDisk)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.setBootOrder(2, vboxcon.DeviceType_DVD)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Adjust memory if requested.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if self.iOptRamAdjust != 0:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.setRamSize(oSession.o.machine.memorySize + self.iOptRamAdjust);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Set extra data
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for sExtraData in self.asExtraData:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync try:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sKey, sValue = sExtraData.split(':')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync except ValueError:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync raise base.InvalidOption('Invalid extradata specified: %s' % sExtraData)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('Set extradata: %s => %s' % (sKey, sValue))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.setExtraData(sKey, sValue)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Other variations?
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Save the settings.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = fRc and oSession.saveSettings()
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = oSession.close() and fRc;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync else:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fRc is not True:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oVM = None;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Done.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return (fRc, oVM)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def isHostCpuAffectedByUbuntuNewAmdBug(self, oTestDrv):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Checks if the host OS is affected by older ubuntu installers being very
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync picky about which families of AMD CPUs it would run on.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync The installer checks for family 15, later 16, later 20, and in 11.10
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync they remove the family check for AMD CPUs.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if not oTestDrv.isHostCpuAmd():
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync try:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (uMaxExt, _, _, _) = oTestDrv.oVBox.host.getProcessorCPUIDLeaf(0, 0x80000000, 0);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (uFamilyModel, _, _, _) = oTestDrv.oVBox.host.getProcessorCPUIDLeaf(0, 0x80000001, 0);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync except:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.logXcpt();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if uMaxExt < 0x80000001 or uMaxExt > 0x8000ffff:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync uFamily = (uFamilyModel >> 8) & 0xf
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if uFamily == 0xf:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync uFamily = ((uFamilyModel >> 20) & 0x7f) + 0xf;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## @todo Break this down into which old ubuntu release supports exactly
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## which AMD family, if we care.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if uFamily <= 15:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('Skipping "%s" because host CPU is a family %u AMD, which may cause trouble for the guest OS installer.'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync % (self.sVmName, uFamily,));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncclass tdGuestOsInstTest1(vbox.TestDriver):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Guest OS installation tests.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Scenario:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync - Create new VM that corresponds specified installation ISO image.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync - Create HDD that corresponds to OS type that will be installed.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync - Boot VM from ISO image (i.e. install guest OS).
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync - Wait for incomming TCP connection (guest should initiate such a
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync connection in case installation has been completed successfully).
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def __init__(self):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Reinitialize child class instance.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync vbox.TestDriver.__init__(self)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.fLegacyOptions = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync assert self.fEnableVrdp; # in parent driver.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Our install test VM set.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSet = vboxtestvms.TestVmSet(self.oTestVmManager, fIgnoreSkippedVm = True);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSet.aoTestVms.extend([
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # pylint: disable=C0301
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-fedora4', 'Fedora', 'fedora4-txs.iso', InstallTestVm.ksIdeController, 8, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-fedora5', 'Fedora', 'fedora5-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfReqPae | InstallTestVm.kfReqIoApicSmp),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-fedora6', 'Fedora', 'fedora6-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfReqIoApic),
455a01392c80ad663ad5337713754940b113b0a7vboxsync InstallTestVm(oSet, 'tst-fedora7', 'Fedora', 'fedora7-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfUbuntuNewAmdBug | InstallTestVm.kfReqIoApic),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-fedora9', 'Fedora', 'fedora9-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-fedora18-64', 'Fedora_64', 'fedora18-x64-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf64Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-fedora18', 'Fedora', 'fedora18-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-ols6', 'Oracle', 'ols6-i386-txs.iso', InstallTestVm.ksSataController, 12, InstallTestVm.kf32Bit | InstallTestVm.kfReqPae),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-ols6-64', 'Oracle_64', 'ols6-x86_64-txs.iso', InstallTestVm.ksSataController, 12, InstallTestVm.kf64Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-rhel5', 'RedHat', 'rhel5-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfReqPae | InstallTestVm.kfReqIoApic),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-suse102', 'OpenSUSE', 'opensuse102-txs.iso', InstallTestVm.ksIdeController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfReqIoApic),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## @todo InstallTestVm(oSet, 'tst-ubuntu606', 'Ubuntu', 'ubuntu606-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## @todo InstallTestVm(oSet, 'tst-ubuntu710', 'Ubuntu', 'ubuntu710-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-ubuntu804', 'Ubuntu', 'ubuntu804-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfUbuntuNewAmdBug | InstallTestVm.kfReqPae | InstallTestVm.kfReqIoApic),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-ubuntu804-64', 'Ubuntu_64', 'ubuntu804-amd64-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf64Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-ubuntu904', 'Ubuntu', 'ubuntu904-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfUbuntuNewAmdBug | InstallTestVm.kfReqPae),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-ubuntu904-64', 'Ubuntu_64', 'ubuntu904-amd64-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf64Bit),
3daed950597e4ad86ca38b69143be9ccfbc98623vboxsync #InstallTestVm(oSet, 'tst-ubuntu1404', 'Ubuntu', 'ubuntu1404-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfUbuntuNewAmdBug | InstallTestVm.kfReqPae), bird: Is 14.04 one of the 'older ones'?
3daed950597e4ad86ca38b69143be9ccfbc98623vboxsync InstallTestVm(oSet, 'tst-ubuntu1404', 'Ubuntu', 'ubuntu1404-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit | InstallTestVm.kfReqPae),
05c797375242f4095ab04bdedb86de02d428782fvboxsync InstallTestVm(oSet, 'tst-ubuntu1404-64','Ubuntu_64', 'ubuntu1404-amd64-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf64Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-debian7', 'Debian', 'debian-7.0.0-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-debian7-64', 'Debian_64', 'debian-7.0.0-x64-txs.iso', InstallTestVm.ksSataController, 8, InstallTestVm.kf64Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-w7-64', 'Windows7_64', 'win7-x64-txs.iso', InstallTestVm.ksSataController, 25, InstallTestVm.kf64Bit),
11934657a00c86ea151d16dfca74cd928c717871vboxsync InstallTestVm(oSet, 'tst-w7-32', 'Windows7', 'win7-x86-txs.iso', InstallTestVm.ksSataController, 25, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-w2k3', 'Windows2003', 'win2k3ent-txs.iso', InstallTestVm.ksIdeController, 25, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-w2k', 'Windows2000', 'win2ksp0-txs.iso', InstallTestVm.ksIdeController, 25, InstallTestVm.kf32Bit | InstallTestVm.kfIdeIrqDelay),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-w2ksp4', 'Windows2000', 'win2ksp4-txs.iso', InstallTestVm.ksIdeController, 25, InstallTestVm.kf32Bit | InstallTestVm.kfIdeIrqDelay),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-wxp', 'WindowsXP', 'winxppro-txs.iso', InstallTestVm.ksIdeController, 25, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-wxpsp2', 'WindowsXP', 'winxpsp2-txs.iso', InstallTestVm.ksIdeController, 25, InstallTestVm.kf32Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync InstallTestVm(oSet, 'tst-wxp64', 'WindowsXP_64', 'winxp64-txs.iso', InstallTestVm.ksIdeController, 25, InstallTestVm.kf64Bit),
dafe301ef1f0570931a0cfbdae10556163d54ac3vboxsync ## @todo disable paravirt for Windows 8.1 guests as long as it's not fixed in the code
ac6e97abf8de101792be6d8ae2aba0f362dd3b4fvboxsync InstallTestVm(oSet, 'tst-w81-32', 'Windows81', 'win81-x86-txs.iso', InstallTestVm.ksSataController, 25, InstallTestVm.kf32Bit),
ac6e97abf8de101792be6d8ae2aba0f362dd3b4fvboxsync InstallTestVm(oSet, 'tst-w81-64', 'Windows81_64', 'win81-x64-txs.iso', InstallTestVm.ksSataController, 25, InstallTestVm.kf64Bit),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # pylint: enable=C0301
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ]);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.oTestVmSet = oSet;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Overridden methods.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def showUsage(self):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Extend usage info
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync rc = vbox.TestDriver.showUsage(self)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('tdGuestOsInstTest1 options:');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' --ioapic, --no-ioapic');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' Enable or disable the I/O apic.');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' Default: --ioapic');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' --pae, --no-pae');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' Enable or disable PAE support for 32-bit guests.');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' Default: Guest dependent.');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' --ram-adjust <MBs>')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' Adjust the VM ram size by the given delta. Both negative and positive');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' values are accepted.');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' --set-extradata <key>:value')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' Set VM extra data. This command line option might be used multiple times.')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('obsolete:');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' --nested-paging, --no-nested-paging');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' --raw-mode');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' --cpus <# CPUs>');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log(' --install-iso <ISO file name>');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return rc
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def parseOption(self, asArgs, iArg):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Extend standard options set
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if False:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync pass;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--ioapic':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTestVm in self.oTestVmSet.aoTestVms:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oTestVm.fIoApic = True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--no-ioapic':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTestVm in self.oTestVmSet.aoTestVms:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oTestVm.fIoApic = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--pae':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTestVm in self.oTestVmSet.aoTestVms:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oTestVm.fPae = True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--no-pae':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTestVm in self.oTestVmSet.aoTestVms:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oTestVm.fPae = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--ram-adjust':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync iArg = self.requireMoreArgs(1, asArgs, iArg);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTestVm in self.oTestVmSet.aoTestVms:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oTestVm.iOptRamAdjust = int(asArgs[iArg]);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--set-extradata':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync iArg = self.requireMoreArgs(1, asArgs, iArg)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTestVm in self.oTestVmSet.aoTestVms:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oTestVm.asExtraData.append(asArgs[iArg]);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # legacy, to be removed once TM is reconfigured.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--install-iso':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.legacyOptions();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync iArg = self.requireMoreArgs(1, asArgs, iArg);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTestVm in self.oTestVmSet.aoTestVms:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oTestVm.fSkip = os.path.basename(oTestVm.sDvdImage) != asArgs[iArg];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--cpus':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.legacyOptions();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync iArg = self.requireMoreArgs(1, asArgs, iArg);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.oTestVmSet.acCpus = [ int(asArgs[iArg]), ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--raw-mode':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.legacyOptions();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.oTestVmSet.asVirtModes = [ 'raw', ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--nested-paging':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.legacyOptions();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.oTestVmSet.asVirtModes = [ 'hwvirt-np', ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif asArgs[iArg] == '--no-nested-paging':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.legacyOptions();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.oTestVmSet.asVirtModes = [ 'hwvirt', ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync else:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return vbox.TestDriver.parseOption(self, asArgs, iArg)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return iArg + 1
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def legacyOptions(self):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """ Enables legacy option mode. """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if not self.fLegacyOptions:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.fLegacyOptions = True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.oTestVmSet.asVirtModes = [ 'hwvirt', ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.oTestVmSet.acCpus = [ 1, ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def actionConfig(self):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if not self.importVBoxApi(): # So we can use the constant below.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return self.oTestVmSet.actionConfig(self, eNic0AttachType = vboxcon.NetworkAttachmentType_NAT);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def actionExecute(self):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Execute the testcase.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return self.oTestVmSet.actionExecute(self, self.testOneVmConfig)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def testOneVmConfig(self, oVM, oTestVm):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Install guest OS and wait for result
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.logVmInfo(oVM)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testStart('Installing %s' % (oTestVm.sVmName,))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync cMsTimeout = 40*60000;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if not reporter.isLocal(): ## @todo need to figure a better way of handling timeouts on the testboxes ...
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync cMsTimeout = 180 * 60000; # will be adjusted down.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSession, _ = self.startVmAndConnectToTxsViaTcp(oTestVm.sVmName, fCdWait = False, cMsTimeout = cMsTimeout);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oSession is not None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # The guest has connected to TXS, so we're done (for now anyways).
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('Guest reported success')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## @todo Do save + restore.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testDone()
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fRc = self.terminateVmBySession(oSession)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return fRc is True
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.error('Installation of %s has failed' % (oTestVm.sVmName,))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oTestVm.detatchAndDeleteHd(self); # Save space.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testDone()
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return False
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncif __name__ == '__main__':
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sys.exit(tdGuestOsInstTest1().main(sys.argv))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync