public static final class VMTypes.CreateSpec.Builder
extends java.lang.Object
VMTypes.CreateSpec
.Constructor and Description |
---|
VMTypes.CreateSpec.Builder(GuestOS guestOS)
Constructor with parameters for the required properties of
VMTypes.CreateSpec . |
Modifier and Type | Method and Description |
---|---|
VMTypes.CreateSpec |
build() |
VMTypes.CreateSpec.Builder |
setBoot(BootTypes.CreateSpec boot)
Boot configuration.
|
VMTypes.CreateSpec.Builder |
setBootDevices(java.util.List<DeviceTypes.EntryCreateSpec> bootDevices)
Boot device configuration.
|
VMTypes.CreateSpec.Builder |
setCdroms(java.util.List<CdromTypes.CreateSpec> cdroms)
List of CD-ROMs.
|
VMTypes.CreateSpec.Builder |
setCpu(CpuTypes.UpdateSpec cpu)
CPU configuration.
|
VMTypes.CreateSpec.Builder |
setDisks(java.util.List<DiskTypes.CreateSpec> disks)
List of disks.
|
VMTypes.CreateSpec.Builder |
setFloppies(java.util.List<FloppyTypes.CreateSpec> floppies)
List of floppy drives.
|
VMTypes.CreateSpec.Builder |
setHardwareVersion(HardwareTypes.Version hardwareVersion)
Virtual hardware version.
|
VMTypes.CreateSpec.Builder |
setMemory(MemoryTypes.UpdateSpec memory)
Memory configuration.
|
VMTypes.CreateSpec.Builder |
setName(java.lang.String name)
Virtual machine name.
|
VMTypes.CreateSpec.Builder |
setNics(java.util.List<EthernetTypes.CreateSpec> nics)
List of Ethernet adapters.
|
VMTypes.CreateSpec.Builder |
setParallelPorts(java.util.List<ParallelTypes.CreateSpec> parallelPorts)
List of parallel ports.
|
VMTypes.CreateSpec.Builder |
setPlacement(VMTypes.PlacementSpec placement)
Virtual machine placement information.
|
VMTypes.CreateSpec.Builder |
setSataAdapters(java.util.List<SataTypes.CreateSpec> sataAdapters)
List of SATA adapters.
|
VMTypes.CreateSpec.Builder |
setScsiAdapters(java.util.List<ScsiTypes.CreateSpec> scsiAdapters)
List of SCSI adapters.
|
VMTypes.CreateSpec.Builder |
setSerialPorts(java.util.List<SerialTypes.CreateSpec> serialPorts)
List of serial ports.
|
VMTypes.CreateSpec.Builder |
setStoragePolicy(VMTypes.StoragePolicySpec storagePolicy)
The
StoragePolicySpec class contains information about the storage
policy that is to be associated with the virtual machine home (which contains
the configuration and log files). |
public VMTypes.CreateSpec.Builder(GuestOS guestOS)
VMTypes.CreateSpec
.public VMTypes.CreateSpec.Builder setName(java.lang.String name)
null
, a default name will be generated by the server.name
- New value for the property.public VMTypes.CreateSpec.Builder setPlacement(VMTypes.PlacementSpec placement)
null
, the system will attempt to choose suitable resources on which to place
the virtual machine.placement
- New value for the property.public VMTypes.CreateSpec.Builder setHardwareVersion(HardwareTypes.Version hardwareVersion)
null
, defaults to the most recent version supported by the server.hardwareVersion
- New value for the property.public VMTypes.CreateSpec.Builder setBoot(BootTypes.CreateSpec boot)
null
, guest-specific default values will be used.boot
- New value for the property.public VMTypes.CreateSpec.Builder setBootDevices(java.util.List<DeviceTypes.EntryCreateSpec> bootDevices)
null
, a server-specific boot sequence will be used.bootDevices
- New value for the property.public VMTypes.CreateSpec.Builder setCpu(CpuTypes.UpdateSpec cpu)
null
, guest-specific default values will be used.cpu
- New value for the property.public VMTypes.CreateSpec.Builder setMemory(MemoryTypes.UpdateSpec memory)
null
, guest-specific default values will be used.memory
- New value for the property.public VMTypes.CreateSpec.Builder setDisks(java.util.List<DiskTypes.CreateSpec> disks)
null
, a single blank virtual disk of a guest-specific size will be
created on the same storage as the virtual machine configuration, and will use a
guest-specific host bus adapter type. If the guest-specific size is 0, no
virtual disk will be created.disks
- New value for the property.public VMTypes.CreateSpec.Builder setNics(java.util.List<EthernetTypes.CreateSpec> nics)
null
, no Ethernet adapters will be created.nics
- New value for the property.public VMTypes.CreateSpec.Builder setCdroms(java.util.List<CdromTypes.CreateSpec> cdroms)
null
, no CD-ROM devices will be created.cdroms
- New value for the property.public VMTypes.CreateSpec.Builder setFloppies(java.util.List<FloppyTypes.CreateSpec> floppies)
null
, no floppy drives will be created.floppies
- New value for the property.public VMTypes.CreateSpec.Builder setParallelPorts(java.util.List<ParallelTypes.CreateSpec> parallelPorts)
null
, no parallel ports will be created.parallelPorts
- New value for the property.public VMTypes.CreateSpec.Builder setSerialPorts(java.util.List<SerialTypes.CreateSpec> serialPorts)
null
, no serial ports will be created.serialPorts
- New value for the property.public VMTypes.CreateSpec.Builder setSataAdapters(java.util.List<SataTypes.CreateSpec> sataAdapters)
null
, any adapters necessary to connect the virtual machine's storage
devices will be created; this includes any devices that explicitly specify a
SATA host bus adapter, as well as any devices that do not specify a host bus
adapter if the guest's preferred adapter type is SATA.sataAdapters
- New value for the property.public VMTypes.CreateSpec.Builder setScsiAdapters(java.util.List<ScsiTypes.CreateSpec> scsiAdapters)
null
, any adapters necessary to connect the virtual machine's storage
devices will be created; this includes any devices that explicitly specify a
SCSI host bus adapter, as well as any devices that do not specify a host bus
adapter if the guest's preferred adapter type is SCSI. The type of the SCSI
adapter will be a guest-specific default type.scsiAdapters
- New value for the property.public VMTypes.CreateSpec.Builder setStoragePolicy(VMTypes.StoragePolicySpec storagePolicy)
StoragePolicySpec
class contains information about the storage
policy that is to be associated with the virtual machine home (which contains
the configuration and log files). This property was added in vSphere API 6.7.
If null
the datastore default storage policy (if applicable) is applied.
Currently a default storage policy is only supported by object datastores : VVol
and vSAN. For non-object datastores, if null
then no storage policy
would be associated with the virtual machine home.storagePolicy
- New value for the property.public VMTypes.CreateSpec build()