public static final class VMTypes.CreateSpec.Builder
extends java.lang.Object
VMTypes.CreateSpec
.Constructor and Description |
---|
Builder(GuestOS guestOS)
Constructor with parameters for the required properties of
VMTypes.CreateSpec . |
public 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()