Documentation ¶
Index ¶
- func NewParaVirtualSCSIController(controller types.VirtualSCSIController) *types.ParaVirtualSCSIController
- func NewVirtualBusLogicController(controller types.VirtualSCSIController) *types.VirtualBusLogicController
- func NewVirtualCdrom(device *types.VirtualIDEController) *types.VirtualCdrom
- func NewVirtualDisk(controller types.BaseVirtualController) *types.VirtualDisk
- func NewVirtualE1000() *types.VirtualE1000
- func NewVirtualFloppy(device *types.VirtualIDEController) *types.VirtualFloppy
- func NewVirtualIDEController(key int32) *types.VirtualIDEController
- func NewVirtualIDEDisk(controller types.VirtualIDEController) *types.VirtualDisk
- func NewVirtualLsiLogicController(controller types.VirtualSCSIController) *types.VirtualLsiLogicController
- func NewVirtualLsiLogicSASController(controller types.VirtualSCSIController) *types.VirtualLsiLogicSASController
- func NewVirtualPCNet32() *types.VirtualPCNet32
- func NewVirtualSCSIController(bus int32, key int32) types.VirtualSCSIController
- func NewVirtualSCSIDisk(controller types.VirtualSCSIController) *types.VirtualDisk
- func NewVirtualVmxnet3() *types.VirtualVmxnet3
- func VirtualDeviceSlotNumber(d types.BaseVirtualDevice) int32
- type VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddAndCreateVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddParaVirtualSCSIController(device *types.ParaVirtualSCSIController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualBusLogicController(device *types.VirtualBusLogicController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualCdrom(device *types.VirtualCdrom) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualDisk(device *types.VirtualDisk) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualE1000(device *types.VirtualE1000) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualFloppy(device *types.VirtualFloppy) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualIDEController(device *types.VirtualIDEController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualLsiLogicController(device *types.VirtualLsiLogicController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualLsiLogicSASController(device *types.VirtualLsiLogicSASController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualPCNet32(device *types.VirtualPCNet32) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AddVirtualVmxnet3(device *types.VirtualVmxnet3) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) AssignSlotNumber(dev types.BaseVirtualDevice, known map[int32]bool) int32
- func (s *VirtualMachineConfigSpec) BootMediaPath() string
- func (s *VirtualMachineConfigSpec) CollectSlotNumbers(known map[int32]bool) map[int32]bool
- func (s *VirtualMachineConfigSpec) FindNICs(ctx context.Context, network object.NetworkReference) ([]types.BaseVirtualDeviceConfigSpec, error)
- func (s *VirtualMachineConfigSpec) ID() string
- func (s *VirtualMachineConfigSpec) ImageStoreName() string
- func (s *VirtualMachineConfigSpec) ImageStorePath() *url.URL
- func (s *VirtualMachineConfigSpec) Name() string
- func (s *VirtualMachineConfigSpec) ParentImageID() string
- func (s *VirtualMachineConfigSpec) RemoveAndDestroyVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveParaVirtualSCSIController(device *types.ParaVirtualSCSIController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualBusLogicController(device *types.VirtualBusLogicController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualCdrom(device *types.VirtualCdrom) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualDisk(device *types.VirtualDisk) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualE1000(device *types.VirtualE1000) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualFloppyDevice(device *types.VirtualFloppy) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualIDEController(device *types.VirtualIDEController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualLsiLogicController(device *types.VirtualLsiLogicController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualLsiLogicSASController(device *types.VirtualLsiLogicSASController) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualPCNet32(device *types.VirtualPCNet32) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) RemoveVirtualVmxnet3(device *types.VirtualVmxnet3) *VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) Spec() *types.VirtualMachineConfigSpec
- func (s *VirtualMachineConfigSpec) VMPathName() string
- type VirtualMachineConfigSpecConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewParaVirtualSCSIController ¶
func NewParaVirtualSCSIController(controller types.VirtualSCSIController) *types.ParaVirtualSCSIController
NewParaVirtualSCSIController returns ParaVirtualSCSIController spec.
func NewVirtualBusLogicController ¶
func NewVirtualBusLogicController(controller types.VirtualSCSIController) *types.VirtualBusLogicController
NewVirtualBusLogicController returns VirtualBusLogicController spec.
func NewVirtualCdrom ¶
func NewVirtualCdrom(device *types.VirtualIDEController) *types.VirtualCdrom
NewVirtualCdrom returns a virtual CDROM device.
func NewVirtualDisk ¶
func NewVirtualDisk(controller types.BaseVirtualController) *types.VirtualDisk
NewVirtualDisk returns a new disk attached to the controller
func NewVirtualE1000 ¶
func NewVirtualE1000() *types.VirtualE1000
NewVirtualE1000 returns VirtualE1000 spec.
func NewVirtualFloppy ¶
func NewVirtualFloppy(device *types.VirtualIDEController) *types.VirtualFloppy
NewVirtualFloppy adds a floppy device in a virtual machine.
func NewVirtualIDEController ¶
func NewVirtualIDEController(key int32) *types.VirtualIDEController
NewVirtualIDEController returns a VirtualIDEController spec with key.
func NewVirtualIDEDisk ¶
func NewVirtualIDEDisk(controller types.VirtualIDEController) *types.VirtualDisk
NewVirtualIDEDisk returns a new disk attached to the IDE controller
func NewVirtualLsiLogicController ¶
func NewVirtualLsiLogicController(controller types.VirtualSCSIController) *types.VirtualLsiLogicController
NewVirtualLsiLogicController returns a VirtualLsiLogicController spec
func NewVirtualLsiLogicSASController ¶
func NewVirtualLsiLogicSASController(controller types.VirtualSCSIController) *types.VirtualLsiLogicSASController
NewVirtualLsiLogicSASController returns VirtualLsiLogicSASController spec.
func NewVirtualPCNet32 ¶
func NewVirtualPCNet32() *types.VirtualPCNet32
NewVirtualPCNet32 returns VirtualPCNet32 spec.
func NewVirtualSCSIController ¶
func NewVirtualSCSIController(bus int32, key int32) types.VirtualSCSIController
NewVirtualSCSIController returns a VirtualSCSIController with bus number and key.
func NewVirtualSCSIDisk ¶
func NewVirtualSCSIDisk(controller types.VirtualSCSIController) *types.VirtualDisk
NewVirtualSCSIDisk returns a new disk attached to the SCSI controller
func NewVirtualVmxnet3 ¶
func NewVirtualVmxnet3() *types.VirtualVmxnet3
NewVirtualVmxnet3 returns VirtualVmxnet3 spec.
func VirtualDeviceSlotNumber ¶
func VirtualDeviceSlotNumber(d types.BaseVirtualDevice) int32
VirtualDeviceSlotNumber returns the PCI slot number of a device
Types ¶
type VirtualMachineConfigSpec ¶
type VirtualMachineConfigSpec struct { *session.Session *types.VirtualMachineConfigSpec // contains filtered or unexported fields }
VirtualMachineConfigSpec type
func NewVirtualMachineConfigSpec ¶
func NewVirtualMachineConfigSpec(ctx context.Context, session *session.Session, config *VirtualMachineConfigSpecConfig) (*VirtualMachineConfigSpec, error)
NewVirtualMachineConfigSpec returns a VirtualMachineConfigSpec
func (*VirtualMachineConfigSpec) AddAndCreateVirtualDevice ¶
func (s *VirtualMachineConfigSpec) AddAndCreateVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec
AddAndCreateVirtualDevice appends an Add operation to the DeviceChange list
func (*VirtualMachineConfigSpec) AddParaVirtualSCSIController ¶
func (s *VirtualMachineConfigSpec) AddParaVirtualSCSIController(device *types.ParaVirtualSCSIController) *VirtualMachineConfigSpec
AddParaVirtualSCSIController adds a paravirtualized SCSI controller.
func (*VirtualMachineConfigSpec) AddVirtualBusLogicController ¶
func (s *VirtualMachineConfigSpec) AddVirtualBusLogicController(device *types.VirtualBusLogicController) *VirtualMachineConfigSpec
AddVirtualBusLogicController adds a BusLogic SCSI controller.
func (*VirtualMachineConfigSpec) AddVirtualCdrom ¶
func (s *VirtualMachineConfigSpec) AddVirtualCdrom(device *types.VirtualCdrom) *VirtualMachineConfigSpec
AddVirtualCdrom adds a CD-ROM device in a virtual machine.
func (*VirtualMachineConfigSpec) AddVirtualDevice ¶
func (s *VirtualMachineConfigSpec) AddVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec
AddVirtualDevice appends an Add operation to the DeviceChange list
func (*VirtualMachineConfigSpec) AddVirtualDisk ¶
func (s *VirtualMachineConfigSpec) AddVirtualDisk(device *types.VirtualDisk) *VirtualMachineConfigSpec
AddVirtualDisk adds a virtual disk to a virtual machine.
func (*VirtualMachineConfigSpec) AddVirtualE1000 ¶
func (s *VirtualMachineConfigSpec) AddVirtualE1000(device *types.VirtualE1000) *VirtualMachineConfigSpec
AddVirtualE1000 adds a VirtualE1000 device.
func (*VirtualMachineConfigSpec) AddVirtualFloppy ¶
func (s *VirtualMachineConfigSpec) AddVirtualFloppy(device *types.VirtualFloppy) *VirtualMachineConfigSpec
AddVirtualFloppy adds a floppy device in a virtual machine.
func (*VirtualMachineConfigSpec) AddVirtualIDEController ¶
func (s *VirtualMachineConfigSpec) AddVirtualIDEController(device *types.VirtualIDEController) *VirtualMachineConfigSpec
AddVirtualIDEController adds a virtual IDE controller.
func (*VirtualMachineConfigSpec) AddVirtualLsiLogicController ¶
func (s *VirtualMachineConfigSpec) AddVirtualLsiLogicController(device *types.VirtualLsiLogicController) *VirtualMachineConfigSpec
AddVirtualLsiLogicController adds a LSI Logic SCSI controller.
func (*VirtualMachineConfigSpec) AddVirtualLsiLogicSASController ¶
func (s *VirtualMachineConfigSpec) AddVirtualLsiLogicSASController(device *types.VirtualLsiLogicSASController) *VirtualMachineConfigSpec
AddVirtualLsiLogicSASController add a LSI Logic SAS SCSI controller.
func (*VirtualMachineConfigSpec) AddVirtualPCNet32 ¶
func (s *VirtualMachineConfigSpec) AddVirtualPCNet32(device *types.VirtualPCNet32) *VirtualMachineConfigSpec
AddVirtualPCNet32 adds a VirtualPCNet32 device.
func (*VirtualMachineConfigSpec) AddVirtualVmxnet3 ¶
func (s *VirtualMachineConfigSpec) AddVirtualVmxnet3(device *types.VirtualVmxnet3) *VirtualMachineConfigSpec
AddVirtualVmxnet3 adds a VirtualVmxnet3 device.
func (*VirtualMachineConfigSpec) AssignSlotNumber ¶
func (s *VirtualMachineConfigSpec) AssignSlotNumber(dev types.BaseVirtualDevice, known map[int32]bool) int32
AssignSlotNumber assigns a specific PCI slot number to the specified device. This ensures that the slot is valid and not in use by anything else in the spec
func (*VirtualMachineConfigSpec) BootMediaPath ¶
func (s *VirtualMachineConfigSpec) BootMediaPath() string
BootMediaPath returns the image path
func (*VirtualMachineConfigSpec) CollectSlotNumbers ¶
func (s *VirtualMachineConfigSpec) CollectSlotNumbers(known map[int32]bool) map[int32]bool
CollectSlotNumbers returns a collection of all the PCI slot numbers for devices in the spec Can take a nil map as argument
func (*VirtualMachineConfigSpec) FindNICs ¶
func (s *VirtualMachineConfigSpec) FindNICs(ctx context.Context, network object.NetworkReference) ([]types.BaseVirtualDeviceConfigSpec, error)
func (*VirtualMachineConfigSpec) ID ¶
func (s *VirtualMachineConfigSpec) ID() string
ID returns the ID of the VM
func (*VirtualMachineConfigSpec) ImageStoreName ¶
func (s *VirtualMachineConfigSpec) ImageStoreName() string
ImageStoreName returns the image store name
func (*VirtualMachineConfigSpec) ImageStorePath ¶
func (s *VirtualMachineConfigSpec) ImageStorePath() *url.URL
ImageStorePath returns the image store url
func (*VirtualMachineConfigSpec) Name ¶
func (s *VirtualMachineConfigSpec) Name() string
Name returns the name of the VM
func (*VirtualMachineConfigSpec) ParentImageID ¶
func (s *VirtualMachineConfigSpec) ParentImageID() string
ParentImageID returns the ID of the image that VM is based on
func (*VirtualMachineConfigSpec) RemoveAndDestroyVirtualDevice ¶
func (s *VirtualMachineConfigSpec) RemoveAndDestroyVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec
RemoveAndDestroyVirtualDevice appends a Remove operation to the DeviceChange list
func (*VirtualMachineConfigSpec) RemoveParaVirtualSCSIController ¶
func (s *VirtualMachineConfigSpec) RemoveParaVirtualSCSIController(device *types.ParaVirtualSCSIController) *VirtualMachineConfigSpec
RemoveParaVirtualSCSIController removes a paravirtualized SCSI controller.
func (*VirtualMachineConfigSpec) RemoveVirtualBusLogicController ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualBusLogicController(device *types.VirtualBusLogicController) *VirtualMachineConfigSpec
RemoveVirtualBusLogicController removes a BusLogic SCSI controller.
func (*VirtualMachineConfigSpec) RemoveVirtualCdrom ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualCdrom(device *types.VirtualCdrom) *VirtualMachineConfigSpec
RemoveVirtualCdrom adds a CD-ROM device in a virtual machine.
func (*VirtualMachineConfigSpec) RemoveVirtualDevice ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec
RemoveVirtualDevice appends a Remove operation to the DeviceChange list
func (*VirtualMachineConfigSpec) RemoveVirtualDisk ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualDisk(device *types.VirtualDisk) *VirtualMachineConfigSpec
RemoveVirtualDisk remvoes the virtual disk from a virtual machine.
func (*VirtualMachineConfigSpec) RemoveVirtualE1000 ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualE1000(device *types.VirtualE1000) *VirtualMachineConfigSpec
RemoveVirtualE1000 adds a VirtualE1000 device.
func (*VirtualMachineConfigSpec) RemoveVirtualFloppyDevice ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualFloppyDevice(device *types.VirtualFloppy) *VirtualMachineConfigSpec
RemoveVirtualFloppyDevice removes a floppy device from the virtual machine.
func (*VirtualMachineConfigSpec) RemoveVirtualIDEController ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualIDEController(device *types.VirtualIDEController) *VirtualMachineConfigSpec
RemoveVirtualIDEController removes a virtual IDE controller.
func (*VirtualMachineConfigSpec) RemoveVirtualLsiLogicController ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualLsiLogicController(device *types.VirtualLsiLogicController) *VirtualMachineConfigSpec
RemoveVirtualLsiLogicController removes a LSI Logic SCSI controller.
func (*VirtualMachineConfigSpec) RemoveVirtualLsiLogicSASController ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualLsiLogicSASController(device *types.VirtualLsiLogicSASController) *VirtualMachineConfigSpec
RemoveVirtualLsiLogicSASController removes a LSI Logic SAS SCSI controller.
func (*VirtualMachineConfigSpec) RemoveVirtualPCNet32 ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualPCNet32(device *types.VirtualPCNet32) *VirtualMachineConfigSpec
RemoveVirtualPCNet32 adds a VirtualPCNet32 device.
func (*VirtualMachineConfigSpec) RemoveVirtualVmxnet3 ¶
func (s *VirtualMachineConfigSpec) RemoveVirtualVmxnet3(device *types.VirtualVmxnet3) *VirtualMachineConfigSpec
RemoveVirtualVmxnet3 adds a VirtualVmxnet3 device.
func (*VirtualMachineConfigSpec) Spec ¶
func (s *VirtualMachineConfigSpec) Spec() *types.VirtualMachineConfigSpec
Spec returns the base types.VirtualMachineConfigSpec object
func (*VirtualMachineConfigSpec) VMPathName ¶
func (s *VirtualMachineConfigSpec) VMPathName() string
VMPathName returns the VM folder path
type VirtualMachineConfigSpecConfig ¶
type VirtualMachineConfigSpecConfig struct { // ID of the VM ID string BiosUUID string VMFullName string // ParentImageID of the VM ParentImageID string // Name of the VM Name string // Number of CPUs NumCPUs int32 // Memory - in MB MemoryMB int64 // VMFork enabled VMForkEnabled bool // datastore path of the media file we boot from BootMediaPath string // datastore path of the VM VMPathName string // Name of the image store ImageStoreName string // url path to image store ImageStorePath *url.URL // Temporary Metadata *executor.ExecutorConfig }
VirtualMachineConfigSpecConfig holds the config values