org.virtualbox_6_1
Class IUnattended

java.lang.Object
  extended by org.virtualbox_6_1.IUnknown
      extended by org.virtualbox_6_1.IUnattended

public class IUnattended
extends IUnknown

The IUnattended interface represents the pipeline for preparing the Guest OS for fully automated install. The typical workflow is:

  1. CallIVirtualBox.createUnattendedInstaller()to create the object
  2. SetgetIsoPath()and calldetectIsoOS()
  3. Create, configure and register a machine according togetDetectedOSTypeId()and the other detectedOS* attributes.
  4. SetgetMachine()to the new IMachine instance.
  5. Set the other IUnattended attributes as desired.
  6. Callprepare()for the object to check the attribute values and create an internal installer instance.
  7. CallconstructMedia()to create additional media files (ISO/floppy) needed.
  8. CallreconfigureVM()to reconfigure the VM with the installation ISO, additional media files and whatnot
  9. Optionally calldone()to destroy the internal installer and allow restarting from the second step.
Note! Steps one is currently not implemented. Interface ID: {6F89464F-7193-426C-A41F-522E8F537FA0}


Field Summary
 
Fields inherited from class org.virtualbox_6_1.IUnknown
obj, objMgr, port
 
Constructor Summary
IUnattended(java.lang.String wrapped, org.virtualbox_6_1.ObjectRefManager objMgr, org.virtualbox_6_1.jaxws.VboxPortType port)
           
 
Method Summary
 void constructMedia()
          Constructors the necessary ISO/VISO/Floppy images, with unattended scripts and all necessary bits on them.
 void detectIsoOS()
          Detects the OS on the ISO given bygetIsoPath()and setsgetDetectedOSTypeId(),getDetectedOSVersion()getDetectedOSFlavor(),getDetectedOSLanguages(), andgetDetectedOSHints().
 void done()
          Done - time to start the VM.
 java.lang.String getAdditionsIsoPath()
          Guest Additions ISO image path.
 java.lang.String getAuxiliaryBasePath()
          The path + basename for auxiliary files generated by the unattended installation.
 java.lang.String getCountry()
          The 2 upper case letter country identifier, ISO 3166-1 alpha-2.
 java.lang.String getDetectedOSFlavor()
          The detected OS flavor (e.g.
 java.lang.String getDetectedOSHints()
          Space separated list of other stuff detected about the OS and the installation ISO.
 java.lang.String getDetectedOSLanguages()
          The space separated list of (Windows) installation UI languages we detected (lang.ini).
 java.lang.String getDetectedOSTypeId()
          The detected OS type ID (IGuestOSType.getId()).
 java.lang.String getDetectedOSVersion()
          The detected OS version string.
 java.lang.String getExtraInstallKernelParameters()
          Extra kernel arguments passed to the install kernel of some guests.
 java.lang.String getFullUserName()
          The full name of the user.
 java.lang.String getHostname()
          The fully qualified guest hostname.
 java.lang.Long getImageIndex()
          The image index on installation CD/DVD used to install.
 java.lang.Boolean getInstallGuestAdditions()
          Indicates whether the guest additions should be installed or not.
 java.lang.Boolean getInstallTestExecService()
          Indicates whether the test execution service (TXS) from the VBox ValidationKit should be installed.
 java.lang.String getIsoPath()
          Guest operating system ISO image
 java.lang.String getLanguage()
          This is more or less a Windows specific setting for choosing the UI language setting of the installer.
 java.lang.String getLocale()
          The 5 letter locale identifier, no codesets or such.
 IMachine getMachine()
          The associated machine object.
 java.lang.String getPackageSelectionAdjustments()
          Guest OS specific package selection adjustments.
 java.lang.String getPassword()
          Assign a password to the user.
 java.lang.String getPostInstallCommand()
          Custom post installation command.
 java.lang.String getPostInstallScriptTemplatePath()
          The post installation (shell/batch) script template file.
 java.lang.String getProductKey()
          Any key which is used as authorization of access to install genuine OS
 java.lang.String getProxy()
          Proxy incantation to pass on to the guest OS installer.
 java.lang.String getScriptTemplatePath()
          The unattended installation script template file.
 java.lang.String getTimeZone()
          The guest time zone specifier.
 java.lang.String getUser()
          Assign an user login name.
 java.lang.String getValidationKitIsoPath()
          VirtualBox ValidationKit ISO image path.
 void prepare()
          Prepare for running the unattended process of installation.
static IUnattended queryInterface(IUnknown obj)
           
 void reconfigureVM()
          Reconfigures the machine to start the installation.
 void setAdditionsIsoPath(java.lang.String value)
          Guest Additions ISO image path.
 void setAuxiliaryBasePath(java.lang.String value)
          The path + basename for auxiliary files generated by the unattended installation.
 void setCountry(java.lang.String value)
          The 2 upper case letter country identifier, ISO 3166-1 alpha-2.
 void setExtraInstallKernelParameters(java.lang.String value)
          Extra kernel arguments passed to the install kernel of some guests.
 void setFullUserName(java.lang.String value)
          The full name of the user.
 void setHostname(java.lang.String value)
          The fully qualified guest hostname.
 void setImageIndex(java.lang.Long value)
          The image index on installation CD/DVD used to install.
 void setInstallGuestAdditions(java.lang.Boolean value)
          Indicates whether the guest additions should be installed or not.
 void setInstallTestExecService(java.lang.Boolean value)
          Indicates whether the test execution service (TXS) from the VBox ValidationKit should be installed.
 void setIsoPath(java.lang.String value)
          Guest operating system ISO image
 void setLanguage(java.lang.String value)
          This is more or less a Windows specific setting for choosing the UI language setting of the installer.
 void setLocale(java.lang.String value)
          The 5 letter locale identifier, no codesets or such.
 void setMachine(IMachine value)
          The associated machine object.
 void setPackageSelectionAdjustments(java.lang.String value)
          Guest OS specific package selection adjustments.
 void setPassword(java.lang.String value)
          Assign a password to the user.
 void setPostInstallCommand(java.lang.String value)
          Custom post installation command.
 void setPostInstallScriptTemplatePath(java.lang.String value)
          The post installation (shell/batch) script template file.
 void setProductKey(java.lang.String value)
          Any key which is used as authorization of access to install genuine OS
 void setProxy(java.lang.String value)
          Proxy incantation to pass on to the guest OS installer.
 void setScriptTemplatePath(java.lang.String value)
          The unattended installation script template file.
 void setTimeZone(java.lang.String value)
          The guest time zone specifier.
 void setUser(java.lang.String value)
          Assign an user login name.
 void setValidationKitIsoPath(java.lang.String value)
          VirtualBox ValidationKit ISO image path.
 
Methods inherited from class org.virtualbox_6_1.IUnknown
getObjMgr, getRemoteWSPort, getWrapped, releaseRemote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IUnattended

public IUnattended(java.lang.String wrapped,
                   org.virtualbox_6_1.ObjectRefManager objMgr,
                   org.virtualbox_6_1.jaxws.VboxPortType port)
Method Detail

getIsoPath

public java.lang.String getIsoPath()
Guest operating system ISO image

Returns:
String

setIsoPath

public void setIsoPath(java.lang.String value)
Guest operating system ISO image

Parameters:
value - String

getMachine

public IMachine getMachine()
The associated machine object. This must be set beforeprepare()is called. The VM must be registered.

Returns:
org.virtualbox_6_1.IMachine

setMachine

public void setMachine(IMachine value)
The associated machine object. This must be set beforeprepare()is called. The VM must be registered.

Parameters:
value - org.virtualbox_6_1.IMachine

getUser

public java.lang.String getUser()
Assign an user login name.

Returns:
String

setUser

public void setUser(java.lang.String value)
Assign an user login name.

Parameters:
value - String

getPassword

public java.lang.String getPassword()
Assign a password to the user. The password is the same for both normal user and for Administrator / 'root' accounts.

Returns:
String

setPassword

public void setPassword(java.lang.String value)
Assign a password to the user. The password is the same for both normal user and for Administrator / 'root' accounts.

Parameters:
value - String

getFullUserName

public java.lang.String getFullUserName()
The full name of the user. This is optional and defaults togetUser(). Please note that not all guests picks up this attribute.

Returns:
String

setFullUserName

public void setFullUserName(java.lang.String value)
The full name of the user. This is optional and defaults togetUser(). Please note that not all guests picks up this attribute.

Parameters:
value - String

getProductKey

public java.lang.String getProductKey()
Any key which is used as authorization of access to install genuine OS

Returns:
String

setProductKey

public void setProductKey(java.lang.String value)
Any key which is used as authorization of access to install genuine OS

Parameters:
value - String

getAdditionsIsoPath

public java.lang.String getAdditionsIsoPath()
Guest Additions ISO image path. This defaults toISystemProperties.getDefaultAdditionsISO()when the Unattended object is instantiated. This property is ignored whengetInstallGuestAdditions()is false.

Returns:
String

setAdditionsIsoPath

public void setAdditionsIsoPath(java.lang.String value)
Guest Additions ISO image path. This defaults toISystemProperties.getDefaultAdditionsISO()when the Unattended object is instantiated. This property is ignored whengetInstallGuestAdditions()is false.

Parameters:
value - String

getInstallGuestAdditions

public java.lang.Boolean getInstallGuestAdditions()
Indicates whether the guest additions should be installed or not. Setting this to false does not affect additions shipped with the linux distribution, only the installation of additions pointed to bygetAdditionsIsoPath().

Returns:
Boolean

setInstallGuestAdditions

public void setInstallGuestAdditions(java.lang.Boolean value)
Indicates whether the guest additions should be installed or not. Setting this to false does not affect additions shipped with the linux distribution, only the installation of additions pointed to bygetAdditionsIsoPath().

Parameters:
value - Boolean

getValidationKitIsoPath

public java.lang.String getValidationKitIsoPath()
VirtualBox ValidationKit ISO image path. This is used whengetInstallTestExecService()is set to true.

Returns:
String

setValidationKitIsoPath

public void setValidationKitIsoPath(java.lang.String value)
VirtualBox ValidationKit ISO image path. This is used whengetInstallTestExecService()is set to true.

Parameters:
value - String

getInstallTestExecService

public java.lang.Boolean getInstallTestExecService()
Indicates whether the test execution service (TXS) from the VBox ValidationKit should be installed. The TXS binary will be taken from the ISO indicated bygetValidationKitIsoPath().

Returns:
Boolean

setInstallTestExecService

public void setInstallTestExecService(java.lang.Boolean value)
Indicates whether the test execution service (TXS) from the VBox ValidationKit should be installed. The TXS binary will be taken from the ISO indicated bygetValidationKitIsoPath().

Parameters:
value - Boolean

getTimeZone

public java.lang.String getTimeZone()
The guest time zone specifier. This is unfortunately guest OS specific. Windows XP and earlier takes the index number from this table: https://support.microsoft.com/en-gb/help/973627/microsoft-time-zone-index-values Windows Vista and later takes the time zone string from this table: https://technet.microsoft.com/en-us/library/cc749073(v=ws.10).aspx Linux usually takes the TZ string from this table: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones The default is currently UTC/GMT, but this may change to be same as the host later. TODO: Investigate automatic mapping between linux and the two windows time zone formats. TODO: Take default from host (this requires mapping).

Returns:
String

setTimeZone

public void setTimeZone(java.lang.String value)
The guest time zone specifier. This is unfortunately guest OS specific. Windows XP and earlier takes the index number from this table: https://support.microsoft.com/en-gb/help/973627/microsoft-time-zone-index-values Windows Vista and later takes the time zone string from this table: https://technet.microsoft.com/en-us/library/cc749073(v=ws.10).aspx Linux usually takes the TZ string from this table: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones The default is currently UTC/GMT, but this may change to be same as the host later. TODO: Investigate automatic mapping between linux and the two windows time zone formats. TODO: Take default from host (this requires mapping).

Parameters:
value - String

getLocale

public java.lang.String getLocale()
The 5 letter locale identifier, no codesets or such. The format is two lower case language letters (ISO 639-1), underscore ('_'), and two upper case country letters (ISO 3166-1 alpha-2). For instance 'en_US', 'de_DE', or 'ny_NO'. The default is taken from the host if possible, with 'en_US' as fallback.

Returns:
String

setLocale

public void setLocale(java.lang.String value)
The 5 letter locale identifier, no codesets or such. The format is two lower case language letters (ISO 639-1), underscore ('_'), and two upper case country letters (ISO 3166-1 alpha-2). For instance 'en_US', 'de_DE', or 'ny_NO'. The default is taken from the host if possible, with 'en_US' as fallback.

Parameters:
value - String

getLanguage

public java.lang.String getLanguage()
This is more or less a Windows specific setting for choosing the UI language setting of the installer. The value should be from the list availble viagetDetectedOSLanguages(). The typical format is {language-code}-{COUNTRY} but windows may also use {16-bit code}:{32-bit code} or insert another component between the language and country codes. We consider the format guest OS specific. Note that it is crucial that this is correctly specified for Windows installations. If an unsupported value is given the installer will ask for an installation language and wait for user input. Best to leave it to the default value. The default is the first one fromgetDetectedOSLanguages().

Returns:
String

setLanguage

public void setLanguage(java.lang.String value)
This is more or less a Windows specific setting for choosing the UI language setting of the installer. The value should be from the list availble viagetDetectedOSLanguages(). The typical format is {language-code}-{COUNTRY} but windows may also use {16-bit code}:{32-bit code} or insert another component between the language and country codes. We consider the format guest OS specific. Note that it is crucial that this is correctly specified for Windows installations. If an unsupported value is given the installer will ask for an installation language and wait for user input. Best to leave it to the default value. The default is the first one fromgetDetectedOSLanguages().

Parameters:
value - String

getCountry

public java.lang.String getCountry()
The 2 upper case letter country identifier, ISO 3166-1 alpha-2. This is used for mirrors and such. The default is taken from the host when possible, falling back ongetLocale().

Returns:
String

setCountry

public void setCountry(java.lang.String value)
The 2 upper case letter country identifier, ISO 3166-1 alpha-2. This is used for mirrors and such. The default is taken from the host when possible, falling back ongetLocale().

Parameters:
value - String

getProxy

public java.lang.String getProxy()
Proxy incantation to pass on to the guest OS installer. This is important to get right if the guest OS installer is of the type that goes online to fetch the packages (e.g. debian-*-netinst.iso) or to fetch updates during the install process. Format: [schema=]schema://[login[:password]@]proxy[:port][;...] The default is taken from the host proxy configuration (once implemented).

Returns:
String

setProxy

public void setProxy(java.lang.String value)
Proxy incantation to pass on to the guest OS installer. This is important to get right if the guest OS installer is of the type that goes online to fetch the packages (e.g. debian-*-netinst.iso) or to fetch updates during the install process. Format: [schema=]schema://[login[:password]@]proxy[:port][;...] The default is taken from the host proxy configuration (once implemented).

Parameters:
value - String

getPackageSelectionAdjustments

public java.lang.String getPackageSelectionAdjustments()
Guest OS specific package selection adjustments. This is a semicolon separated list of keywords, and later maybe guest OS package specifiers. Currently the 'minimal' is the only recognized value, and this only works with a selection of linux installers.

Returns:
String

setPackageSelectionAdjustments

public void setPackageSelectionAdjustments(java.lang.String value)
Guest OS specific package selection adjustments. This is a semicolon separated list of keywords, and later maybe guest OS package specifiers. Currently the 'minimal' is the only recognized value, and this only works with a selection of linux installers.

Parameters:
value - String

getHostname

public java.lang.String getHostname()
The fully qualified guest hostname. This defaults to machine-name + ".myguest.virtualbox.org", though it may change to the host domain name later.

Returns:
String

setHostname

public void setHostname(java.lang.String value)
The fully qualified guest hostname. This defaults to machine-name + ".myguest.virtualbox.org", though it may change to the host domain name later.

Parameters:
value - String

getAuxiliaryBasePath

public java.lang.String getAuxiliaryBasePath()
The path + basename for auxiliary files generated by the unattended installation. This defaults to the VM folder + Unattended + VM UUID. The files which gets generated depends on the OS being installed. When installing Windows there is currently only a auxiliaryBasePath + "floppy.img" being created. But for linux, a "cdrom.viso" and one or more configuration files are generate generated.

Returns:
String

setAuxiliaryBasePath

public void setAuxiliaryBasePath(java.lang.String value)
The path + basename for auxiliary files generated by the unattended installation. This defaults to the VM folder + Unattended + VM UUID. The files which gets generated depends on the OS being installed. When installing Windows there is currently only a auxiliaryBasePath + "floppy.img" being created. But for linux, a "cdrom.viso" and one or more configuration files are generate generated.

Parameters:
value - String

getImageIndex

public java.lang.Long getImageIndex()
The image index on installation CD/DVD used to install. Used only with Windows installation CD/DVD: https://technet.microsoft.com/en-us/library/cc766022%28v=ws.10%29.aspx

Returns:
Long

setImageIndex

public void setImageIndex(java.lang.Long value)
The image index on installation CD/DVD used to install. Used only with Windows installation CD/DVD: https://technet.microsoft.com/en-us/library/cc766022%28v=ws.10%29.aspx

Parameters:
value - Long

getScriptTemplatePath

public java.lang.String getScriptTemplatePath()
The unattended installation script template file. The template default is based on the guest OS type and is determined by the internal installer when whenprepare()is invoked. Most users will want the defaults. Afterprepare()is called, it can be read to see which file is being used.

Returns:
String

setScriptTemplatePath

public void setScriptTemplatePath(java.lang.String value)
The unattended installation script template file. The template default is based on the guest OS type and is determined by the internal installer when whenprepare()is invoked. Most users will want the defaults. Afterprepare()is called, it can be read to see which file is being used.

Parameters:
value - String

getPostInstallScriptTemplatePath

public java.lang.String getPostInstallScriptTemplatePath()
The post installation (shell/batch) script template file. The template default is based on the guest OS type and is determined by the internal installer when whenprepare()is invoked. Most users will want the defaults. Afterprepare()is called, it can be read to see which file is being used.

Returns:
String

setPostInstallScriptTemplatePath

public void setPostInstallScriptTemplatePath(java.lang.String value)
The post installation (shell/batch) script template file. The template default is based on the guest OS type and is determined by the internal installer when whenprepare()is invoked. Most users will want the defaults. Afterprepare()is called, it can be read to see which file is being used.

Parameters:
value - String

getPostInstallCommand

public java.lang.String getPostInstallCommand()
Custom post installation command. Exactly what is expected as input here depends on the guest OS installer and the post installation script template (seegetPostInstallScriptTemplatePath()). Most users will not need to set this attribute.

Returns:
String

setPostInstallCommand

public void setPostInstallCommand(java.lang.String value)
Custom post installation command. Exactly what is expected as input here depends on the guest OS installer and the post installation script template (seegetPostInstallScriptTemplatePath()). Most users will not need to set this attribute.

Parameters:
value - String

getExtraInstallKernelParameters

public java.lang.String getExtraInstallKernelParameters()
Extra kernel arguments passed to the install kernel of some guests. This is currently only picked up by linux guests. The exact parameters are specific to the guest OS being installed of course. Afterprepare()is called, it can be read to see which parameters are being used.

Returns:
String

setExtraInstallKernelParameters

public void setExtraInstallKernelParameters(java.lang.String value)
Extra kernel arguments passed to the install kernel of some guests. This is currently only picked up by linux guests. The exact parameters are specific to the guest OS being installed of course. Afterprepare()is called, it can be read to see which parameters are being used.

Parameters:
value - String

getDetectedOSTypeId

public java.lang.String getDetectedOSTypeId()
The detected OS type ID (IGuestOSType.getId()). Set bydetectIsoOS()orprepare(). Not yet implemented.

Returns:
String

getDetectedOSVersion

public java.lang.String getDetectedOSVersion()
The detected OS version string. Set bydetectIsoOS()orprepare(). Not yet implemented.

Returns:
String

getDetectedOSFlavor

public java.lang.String getDetectedOSFlavor()
The detected OS flavor (e.g. server, desktop, etc) Set bydetectIsoOS()orprepare(). Not yet implemented.

Returns:
String

getDetectedOSLanguages

public java.lang.String getDetectedOSLanguages()
The space separated list of (Windows) installation UI languages we detected (lang.ini). The language specifier format is specific to the guest OS. They are used to setgetLanguage(). Set bydetectIsoOS()orprepare(). Partially implemented.

Returns:
String

getDetectedOSHints

public java.lang.String getDetectedOSHints()
Space separated list of other stuff detected about the OS and the installation ISO. Set bydetectIsoOS()orprepare(). Not yet implemented.

Returns:
String

queryInterface

public static IUnattended queryInterface(IUnknown obj)

detectIsoOS

public void detectIsoOS()
Detects the OS on the ISO given bygetIsoPath()and setsgetDetectedOSTypeId(),getDetectedOSVersion()getDetectedOSFlavor(),getDetectedOSLanguages(), andgetDetectedOSHints(). Not really yet implemented.


prepare

public void prepare()
Prepare for running the unattended process of installation. This will instantiate the installer based on the guest type associated with the machine (seeIMachine.getOSTypeId()). It will also performdetectIsoOS()if not yet called on the currentgetIsoPath()value.


constructMedia

public void constructMedia()
Constructors the necessary ISO/VISO/Floppy images, with unattended scripts and all necessary bits on them.


reconfigureVM

public void reconfigureVM()
Reconfigures the machine to start the installation. This involves mounting the ISOs and floppy images created byconstructMedia(), attaching new DVD and floppy drives as necessary, and possibly modifying the boot order.


done

public void done()
Done - time to start the VM. This deletes the internal installer instance thatprepare()created. Before done() is called, it is not possible to start over again fromprepare().