Documentation ¶
Index ¶
- Constants
- func Add_Agent_To_api_Channel() (channel api.Channel)
- func CalculateNetworkQueueNumberAndGetCPUTopology(vmi *v1.VirtualMachineInstance) (uint32, *api.CPUTopology)
- func CheckEFI_OVMFRoms(vmi *v1.VirtualMachineInstance, c *ConverterContext) (err error)
- func ConvertV1ToAPIBalloning(source *v1.Devices, ballooning *api.MemBalloon, c *ConverterContext)
- func Convert_HostDevices_And_GPU(devices v1.Devices, domain *api.Domain, c *ConverterContext) error
- func Convert_v1_BlockVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Clock_To_api_Clock(source *v1.Clock, clock *api.Clock, c *ConverterContext) error
- func Convert_v1_CloudInitSource_To_api_Disk(source v1.VolumeSource, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Config_To_api_Disk(volumeName string, disk *api.Disk, configType config.Type) error
- func Convert_v1_ContainerDiskSource_To_api_Disk(volumeName string, _ *v1.ContainerDiskSource, disk *api.Disk, ...) error
- func Convert_v1_DataVolume_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Disk_To_api_Disk(c *ConverterContext, diskDevice *v1.Disk, disk *api.Disk, ...) error
- func Convert_v1_EmptyDiskSource_To_api_Disk(volumeName string, _ *v1.EmptyDiskSource, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_EphemeralVolumeSource_To_api_Disk(volumeName string, source *v1.EphemeralVolumeSource, disk *api.Disk, ...) error
- func Convert_v1_FeatureHyperv_To_api_FeatureHyperv(source *v1.FeatureHyperv, hyperv *api.FeatureHyperv, c *ConverterContext) error
- func Convert_v1_Features_To_api_Features(source *v1.Features, features *api.Features, c *ConverterContext) error
- func Convert_v1_FilesystemVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_HostDisk_To_api_Disk(volumeName string, path string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Hotplug_BlockVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Hotplug_DataVolume_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Hotplug_FilesystemVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Hotplug_PersistentVolumeClaim_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Hotplug_Volume_To_api_Disk(source *v1.Volume, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_IgnitionData_To_api_Disk(disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Input_To_api_InputDevice(input *v1.Input, inputDevice *api.Input, c *ConverterContext) error
- func Convert_v1_Machine_To_api_OSType(source *v1.Machine, ost *api.OSType, c *ConverterContext) error
- func Convert_v1_PersistentVolumeClaim_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error
- func Convert_v1_Rng_To_api_Rng(_ *v1.Rng, rng *api.Rng, c *ConverterContext) error
- func Convert_v1_VirtualMachine_To_api_Domain(vmi *v1.VirtualMachineInstance, domain *api.Domain, c *ConverterContext) (err error)
- func Convert_v1_Volume_To_api_Disk(source *v1.Volume, disk *api.Disk, c *ConverterContext, diskIndex int) error
- func Convert_v1_Watchdog_To_api_Watchdog(source *v1.Watchdog, watchdog *api.Watchdog, _ *ConverterContext) error
- func FormatDeviceName(prefix string, index int) string
- func GetBlockDeviceVolumePath(volumeName string) string
- func GetFilesystemVolumePath(volumeName string) string
- func GetHotplugBlockDeviceVolumePath(volumeName string) string
- func GetHotplugFilesystemVolumePath(volumeName string) string
- func GetImageInfo(imagePath string) (*containerdisk.DiskInfo, error)
- func GetResolvConfDetailsFromPod() ([][]byte, []string, error)
- func PlacePCIDevicesOnRootComplex(spec *api.DomainSpec) (err error)
- func QuantityToByte(quantity resource.Quantity) (api.Memory, error)
- func QuantityToMebiByte(quantity resource.Quantity) (uint64, error)
- func SecretToLibvirtSecret(vmi *v1.VirtualMachineInstance, secretName string) string
- func SetDriverCacheMode(disk *api.Disk) error
- func SetOptimalIOMode(disk *api.Disk) error
- type ConverterContext
- type HostDeviceType
- type HostDevicesList
Constants ¶
const ( CPUModeHostPassthrough = "host-passthrough" CPUModeHostModel = "host-model" EFICode = "OVMF_CODE.fd" EFIVars = "OVMF_VARS.fd" EFICodeSecureBoot = "OVMF_CODE.secboot.fd" EFIVarsSecureBoot = "OVMF_VARS.secboot.fd" HostDevicePCI HostDeviceType = "pci" HostDeviceMDEV HostDeviceType = "mdev" )
Variables ¶
This section is empty.
Functions ¶
func Add_Agent_To_api_Channel ¶
Add_Agent_To_api_Channel creates the channel for guest agent communication
func CalculateNetworkQueueNumberAndGetCPUTopology ¶
func CalculateNetworkQueueNumberAndGetCPUTopology(vmi *v1.VirtualMachineInstance) (uint32, *api.CPUTopology)
func CheckEFI_OVMFRoms ¶
func CheckEFI_OVMFRoms(vmi *v1.VirtualMachineInstance, c *ConverterContext) (err error)
func ConvertV1ToAPIBalloning ¶
func ConvertV1ToAPIBalloning(source *v1.Devices, ballooning *api.MemBalloon, c *ConverterContext)
func Convert_HostDevices_And_GPU ¶
Both HostDevices and GPUs can allocate PCI devices or a MDEVs
func Convert_v1_BlockVolumeSource_To_api_Disk ¶
func Convert_v1_BlockVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, c *ConverterContext) error
func Convert_v1_CloudInitSource_To_api_Disk ¶
func Convert_v1_CloudInitSource_To_api_Disk(source v1.VolumeSource, disk *api.Disk, c *ConverterContext) error
func Convert_v1_ContainerDiskSource_To_api_Disk ¶
func Convert_v1_ContainerDiskSource_To_api_Disk(volumeName string, _ *v1.ContainerDiskSource, disk *api.Disk, c *ConverterContext, diskIndex int) error
func Convert_v1_DataVolume_To_api_Disk ¶
func Convert_v1_DataVolume_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error
func Convert_v1_EmptyDiskSource_To_api_Disk ¶
func Convert_v1_EmptyDiskSource_To_api_Disk(volumeName string, _ *v1.EmptyDiskSource, disk *api.Disk, c *ConverterContext) error
func Convert_v1_EphemeralVolumeSource_To_api_Disk ¶
func Convert_v1_EphemeralVolumeSource_To_api_Disk(volumeName string, source *v1.EphemeralVolumeSource, disk *api.Disk, c *ConverterContext) error
func Convert_v1_FeatureHyperv_To_api_FeatureHyperv ¶
func Convert_v1_FeatureHyperv_To_api_FeatureHyperv(source *v1.FeatureHyperv, hyperv *api.FeatureHyperv, c *ConverterContext) error
func Convert_v1_FilesystemVolumeSource_To_api_Disk ¶
func Convert_v1_FilesystemVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, c *ConverterContext) error
Convert_v1_FilesystemVolumeSource_To_api_Disk takes a FS source and builds the domain Disk representation
func Convert_v1_Hotplug_BlockVolumeSource_To_api_Disk ¶
func Convert_v1_Hotplug_BlockVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, c *ConverterContext) error
Convert_v1_Hotplug_BlockVolumeSource_To_api_Disk takes a block device source and builds the domain Disk representation
func Convert_v1_Hotplug_DataVolume_To_api_Disk ¶
func Convert_v1_Hotplug_DataVolume_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error
Convert_v1_Hotplug_DataVolume_To_api_Disk converts a Hotplugged DataVolume to an api disk
func Convert_v1_Hotplug_FilesystemVolumeSource_To_api_Disk ¶
func Convert_v1_Hotplug_FilesystemVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, c *ConverterContext) error
Convert_v1_Hotplug_FilesystemVolumeSource_To_api_Disk takes a FS source and builds the KVM Disk representation
func Convert_v1_Hotplug_PersistentVolumeClaim_To_api_Disk ¶
func Convert_v1_Hotplug_PersistentVolumeClaim_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error
Convert_v1_Hotplug_PersistentVolumeClaim_To_api_Disk converts a Hotplugged PVC to an api disk
func Convert_v1_Hotplug_Volume_To_api_Disk ¶
func Convert_v1_Hotplug_Volume_To_api_Disk(source *v1.Volume, disk *api.Disk, c *ConverterContext) error
Convert_v1_Hotplug_Volume_To_api_Disk convers a hotplug volume to an api disk
func Convert_v1_IgnitionData_To_api_Disk ¶
func Convert_v1_IgnitionData_To_api_Disk(disk *api.Disk, c *ConverterContext) error
func Convert_v1_PersistentVolumeClaim_To_api_Disk ¶
func Convert_v1_PersistentVolumeClaim_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error
func Convert_v1_VirtualMachine_To_api_Domain ¶
func Convert_v1_VirtualMachine_To_api_Domain(vmi *v1.VirtualMachineInstance, domain *api.Domain, c *ConverterContext) (err error)
func FormatDeviceName ¶
port of http://elixir.free-electrons.com/linux/v4.15/source/drivers/scsi/sd.c#L3211
func GetFilesystemVolumePath ¶
func GetHotplugBlockDeviceVolumePath ¶
GetHotplugBlockDeviceVolumePath returns the path and name of a hotplugged block device
func GetHotplugFilesystemVolumePath ¶
GetHotplugFilesystemVolumePath returns the path and file name of a hotplug disk image
func GetImageInfo ¶
func GetImageInfo(imagePath string) (*containerdisk.DiskInfo, error)
func GetResolvConfDetailsFromPod ¶
returns nameservers [][]byte, searchdomains []string, error
func PlacePCIDevicesOnRootComplex ¶
func PlacePCIDevicesOnRootComplex(spec *api.DomainSpec) (err error)
func SecretToLibvirtSecret ¶
func SecretToLibvirtSecret(vmi *v1.VirtualMachineInstance, secretName string) string
func SetDriverCacheMode ¶
func SetOptimalIOMode ¶
Set optimal io mode automatically
Types ¶
type ConverterContext ¶
type ConverterContext struct { Architecture string UseEmulation bool Secrets map[string]*k8sv1.Secret VirtualMachine *v1.VirtualMachineInstance CPUSet []int IsBlockPVC map[string]bool IsBlockDV map[string]bool HotplugVolumes map[string]v1.VolumeStatus PermanentVolumes map[string]v1.VolumeStatus DiskType map[string]*containerdisk.DiskInfo SRIOVDevices map[string][]string SMBios *cmdv1.SMBios GpuDevices []string VgpuDevices []string HostDevices map[string]HostDevicesList EmulatorThreadCpu *int OVMFPath string MemBalloonStatsPeriod uint UseVirtioTransitional bool }
type HostDeviceType ¶
type HostDeviceType string
type HostDevicesList ¶
type HostDevicesList struct { Type HostDeviceType AddrList []string }