virtualmachine

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceVirtualMachineType = "VirtualMachine"
)

Variables

This section is empty.

Functions

func CPUQuantityToMhz

func CPUQuantityToMhz(q resource.Quantity, cpuFreqMhz uint64) int64

func CreateConfigSpec

func CreateConfigSpec(
	name string,
	vmClassSpec *v1alpha1.VirtualMachineClassSpec,
	minFreq uint64,
	imageFirmware string,
	baseConfigSpec *vimtypes.VirtualMachineConfigSpec) *vimtypes.VirtualMachineConfigSpec

CreateConfigSpec returns a ConfigSpec that is created by overlaying the base ConfigSpec with VM Class spec and other arguments.

func CreateConfigSpecForPlacement

func CreateConfigSpecForPlacement(
	vmCtx context.VirtualMachineContext,
	vmClassSpec *v1alpha1.VirtualMachineClassSpec,
	minFreq uint64,
	storageClassesToIDs map[string]string,
	imageFirmware string,
	vmClassConfigSpec *vimtypes.VirtualMachineConfigSpec) *vimtypes.VirtualMachineConfigSpec

CreateConfigSpecForPlacement creates a ConfigSpec to use for placement. Once CL deploy can accept a ConfigSpec, this should largely - or ideally entirely - be folded into CreateConfigSpec() above.

func CreateInstanceStorageDiskDevices

func CreateInstanceStorageDiskDevices(isVolumes []v1alpha1.VirtualMachineVolume) []vimTypes.BaseVirtualDevice

func CreatePCIDevicesFromConfigSpec added in v1.8.1

func CreatePCIDevicesFromConfigSpec(pciDevsFromConfigSpec []*vimTypes.VirtualPCIPassthrough) []vimTypes.BaseVirtualDevice

CreatePCIDevicesFromConfigSpec creates vim25 VirtualDevices from the specified list of PCI devices from the VM Class ConfigSpec.

func CreatePCIDevicesFromVMClass added in v1.8.1

func CreatePCIDevicesFromVMClass(pciDevicesFromVMClass v1alpha1.VirtualDevices) []vimTypes.BaseVirtualDevice

CreatePCIDevicesFromVMClass creates vim25 VirtualDevices from the specified list of PCI devices from VM Class spec.

func CreatePCIPassThroughDevice

func CreatePCIPassThroughDevice(deviceKey int32, backingInfo vimTypes.BaseVirtualDeviceBackingInfo) vimTypes.BaseVirtualDevice

func DecryptWebMKS

func DecryptWebMKS(privKey *rsa.PrivateKey, ciphertext string) (string, error)

func DeleteVirtualMachine

func DeleteVirtualMachine(
	vmCtx context.VirtualMachineContext,
	vcVM *object.VirtualMachine) error

func EncryptWebMKS

func EncryptWebMKS(pubKey string, plaintext string) (string, error)

func GetDefaultDiskProvisioningType

func GetDefaultDiskProvisioningType(
	vmCtx context.VirtualMachineContext,
	vcClient *vcclient.Client,
	storageProfileID string) (string, error)

GetDefaultDiskProvisioningType gets the default disk provisioning type specified for the VM.

func GetVMClusterComputeResource

func GetVMClusterComputeResource(
	ctx context.Context,
	vcVM *object.VirtualMachine) (*object.ClusterComputeResource, error)

GetVMClusterComputeResource returns the VM's ClusterComputeResource.

func GetWebConsoleTicket

func GetWebConsoleTicket(
	vmCtx context.VirtualMachineContext,
	vm *object.VirtualMachine,
	pubKey string) (string, error)

func MemoryQuantityToMb

func MemoryQuantityToMb(q resource.Quantity) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL