|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.virtualbox_6_1.IUnknown
org.virtualbox_6_1.IAppliance
public class IAppliance
Represents a platform-independent appliance in OVF format. An instance of this is returned
byIVirtualBox.createAppliance()
, which can then be used to import and export
virtual machines within an appliance with VirtualBox.
The OVF standard suggests two different physical file formats:
IMachine
involves the following sequence of API calls:IVirtualBox.createAppliance()
. This will create an empty IAppliance object.read(String)
with the full path of the OVF file you
would like to import. So long as this file is syntactically valid, this will succeed
and fill the appliance object with the parsed data from the OVF file.interpret()
, which analyzes the OVF data and sets up the
contents of the IAppliance attributes accordingly. These can be inspected by a
VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
user. In particular, thegetVirtualSystemDescriptions()
array contains
instances ofIVirtualSystemDescription
which represent the virtual
systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
The GUI can then give the user the option to confirm and/or change these suggestions.IVirtualSystemDescription.setFinalValues(List,List,List)
for each
virtual system (machine) to override the suggestions made by theinterpret()
routine.importMachines(List)
to create virtual machines in
VirtualBox as instances ofIMachine
that match the information in the
virtual system descriptions. After this call succeeded, the UUIDs of the machines created
can be found in thegetMachines()
array attribute.IVirtualBox.createAppliance()
to create
an empty IAppliance object.IMachine.exportTo(org.virtualbox_6_1.IAppliance,String)
with the IAppliance object you just created. Each such call creates one instance ofIVirtualSystemDescription
inside the appliance.IVirtualSystemDescription.setFinalValues(List,List,List)
for each
virtual system (machine) to override the suggestions made by theIMachine.exportTo(org.virtualbox_6_1.IAppliance,String)
routine.write(String,List,String)
with a path specification to have the OVF
file written.
Field Summary |
---|
Fields inherited from class org.virtualbox_6_1.IUnknown |
---|
obj, objMgr, port |
Constructor Summary | |
---|---|
IAppliance(java.lang.String wrapped,
org.virtualbox_6_1.ObjectRefManager objMgr,
org.virtualbox_6_1.jaxws.VboxPortType port)
|
Method Summary | |
---|---|
void |
addPasswords(java.util.List<java.lang.String> identifiers,
java.util.List<java.lang.String> passwords)
Adds a list of passwords required to import or export encrypted virtual machines. |
IVFSExplorer |
createVFSExplorer(java.lang.String URI)
Returns a IVFSExplorer object for the given URI. |
java.lang.Long |
createVirtualSystemDescriptions(java.lang.Long requested)
Creates a number of IVirtualSystemDescription objects and store them
in thegetVirtualSystemDescriptions() array. |
ICertificate |
getCertificate()
The X.509 signing certificate, if the imported OVF was signed, null if not signed. |
java.util.List<java.lang.String> |
getDisks()
Array of virtual disk definitions. |
java.util.List<java.lang.String> |
getMachines()
Contains the UUIDs of the machines created from the information in this appliances. |
java.util.List<java.lang.String> |
getMediumIdsForPasswordId(java.lang.String passwordId)
Returns a list of medium identifiers which use the given password identifier. |
java.util.List<java.lang.String> |
getPasswordIds()
Returns a list of password identifiers which must be supplied to import or export encrypted virtual machines. |
java.lang.String |
getPath()
Path to the main file of the OVF appliance, which is either the.ovfor the.ovafile passed to read(String) (for import) orwrite(String,List,String) (for export). |
java.util.List<IVirtualSystemDescription> |
getVirtualSystemDescriptions()
Array of virtual system descriptions. |
java.util.List<java.lang.String> |
getWarnings()
Returns textual warnings which occurred during execution of interpret() . |
IProgress |
importMachines(java.util.List<ImportOptions> options)
Imports the appliance into VirtualBox by creating instances of IMachine and other interfaces that match the information contained in the appliance as
closely as possible, as represented by the import instructions in thegetVirtualSystemDescriptions() array. |
void |
interpret()
Interprets the OVF data that was read when the appliance was constructed. |
static IAppliance |
queryInterface(IUnknown obj)
|
IProgress |
read(java.lang.String file)
Reads an OVF file into the appliance object. |
IProgress |
write(java.lang.String format,
java.util.List<ExportOptions> options,
java.lang.String path)
Writes the contents of the appliance exports into a new OVF file. |
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 |
---|
public IAppliance(java.lang.String wrapped, org.virtualbox_6_1.ObjectRefManager objMgr, org.virtualbox_6_1.jaxws.VboxPortType port)
Method Detail |
---|
public java.lang.String getPath()
read(String)
(for import) orwrite(String,List,String)
(for export).
This attribute is empty until one of these methods has been called.
public java.util.List<java.lang.String> getDisks()
public java.util.List<IVirtualSystemDescription> getVirtualSystemDescriptions()
interpret()
(for import) orIMachine.exportTo(org.virtualbox_6_1.IAppliance,String)
(for export) has been called.
public java.util.List<java.lang.String> getMachines()
importMachines(List)
succeeded.
public ICertificate getCertificate()
read(String)
.
public static IAppliance queryInterface(IUnknown obj)
public IProgress read(java.lang.String file)
interpret()
.
file
- Name of appliance file to open (either with an.ovfor.ovaextension, depending
on whether the appliance is distributed as a set of files or as a single file, respectively).
public void interpret()
getVirtualSystemDescriptions()
array attribute, which will then contain
oneIVirtualSystemDescription
for each virtual machine found in
the appliance.
Calling this method is the second step of importing an appliance into VirtualBox;
seeIAppliance
for an overview.
After calling this method, one should callgetWarnings()
to find out
if problems were encountered during the processing which might later lead to
errors.
public IProgress importMachines(java.util.List<ImportOptions> options)
IMachine
and other interfaces that match the information contained in the appliance as
closely as possible, as represented by the import instructions in thegetVirtualSystemDescriptions()
array.
Calling this method is the final step of importing an appliance into VirtualBox;
seeIAppliance
for an overview.
Since importing the appliance will most probably involve copying and converting
disk images, which can take a long time, this method operates asynchronously and
returns an IProgress object to allow the caller to monitor the progress.
After the import succeeded, the UUIDs of the IMachine instances created can be
retrieved from thegetMachines()
array attribute.
options
- Options for the importing operation.
public IVFSExplorer createVFSExplorer(java.lang.String URI)
IVFSExplorer
object for the given URI.
URI
- The URI describing the file system to use.public IProgress write(java.lang.String format, java.util.List<ExportOptions> options, java.lang.String path)
IAppliance
for an overview.
Since exporting the appliance will most probably involve copying and converting
disk images, which can take a long time, this method operates asynchronously and
returns an IProgress object to allow the caller to monitor the progress.
format
- Output format, as a string. Currently supported formats are "ovf-0.9", "ovf-1.0",
"ovf-2.0" and "opc-1.0"; future versions of VirtualBox may support additional formats.
The "opc-1.0" format is for creating tarballs for the Oracle Public Cloud.options
- Options for the exporting operation.path
- Name of appliance file to create. There are certain restrictions with regard
to the file name suffix. If the format parameter is "opc-1.0" a.tar.gzsuffix is required. Otherwise the suffix must either be.ovfor.ova, depending on whether the appliance is distributed as a set of
files or as a single file, respectively.
public java.util.List<java.lang.String> getWarnings()
interpret()
.
public java.util.List<java.lang.String> getPasswordIds()
public java.util.List<java.lang.String> getMediumIdsForPasswordId(java.lang.String passwordId)
passwordId
- The password identifier to get the medium identifiers for.
public void addPasswords(java.util.List<java.lang.String> identifiers, java.util.List<java.lang.String> passwords)
identifiers
- List of identifiers.passwords
- List of matching passwords.public java.lang.Long createVirtualSystemDescriptions(java.lang.Long requested)
IVirtualSystemDescription
objects and store them
in thegetVirtualSystemDescriptions()
array.
requested
- Requested number of new virtual system description objects
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |