converter

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EFICode                          = "OVMF_CODE.fd"
	EFIVars                          = "OVMF_VARS.fd"
	EFICodeAARCH64                   = "AAVMF_CODE.fd"
	EFIVarsAARCH64                   = "AAVMF_VARS.fd"
	EFICodeSecureBoot                = "OVMF_CODE.secboot.fd"
	EFIVarsSecureBoot                = "OVMF_VARS.secboot.fd"
	HostDevicePCI     HostDeviceType = "pci"
	HostDeviceMDEV    HostDeviceType = "mdev"
)

The location of uefi boot loader on ARM64 is different from that on x86

View Source
const (
	QEMUSeaBiosDebugPipe = "/QEMUSeaBiosDebugPipe"
)

Variables

This section is empty.

Functions

func Add_Agent_To_api_Channel

func Add_Agent_To_api_Channel() (channel api.Channel)

Add_Agent_To_api_Channel creates the channel for guest agent communication

func CalculateNetworkQueues added in v0.37.2

func CalculateNetworkQueues(vmi *v1.VirtualMachineInstance) uint32

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

func Convert_HostDevices_And_GPU(devices v1.Devices, domain *api.Domain, c *ConverterContext) error

Both HostDevices and GPUs can allocate PCI devices or a MDEVs

func Convert_v1_BlockSize_To_api_BlockIO added in v0.41.0

func Convert_v1_BlockSize_To_api_BlockIO(source *v1.Disk, disk *api.Disk) error

func Convert_v1_BlockVolumeSource_To_api_Disk

func Convert_v1_BlockVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, volumesDiscardIgnore []string) error

func Convert_v1_Clock_To_api_Clock

func Convert_v1_Clock_To_api_Clock(source *v1.Clock, clock *api.Clock) 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_Config_To_api_Disk

func Convert_v1_Config_To_api_Disk(volumeName string, disk *api.Disk, configType config.Type) 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_Disk_To_api_Disk

func Convert_v1_Disk_To_api_Disk(c *ConverterContext, diskDevice *v1.Disk, disk *api.Disk, prefixMap map[string]deviceNamer, numQueues *uint) error

func Convert_v1_DownwardMetricSource_To_api_Disk added in v0.42.0

func Convert_v1_DownwardMetricSource_To_api_Disk(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) error

func Convert_v1_EphemeralVolumeSource_To_api_Disk

func Convert_v1_EphemeralVolumeSource_To_api_Disk(volumeName string, 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) error

func Convert_v1_Features_To_api_Features

func Convert_v1_Features_To_api_Features(source *v1.Features, features *api.Features, c *ConverterContext) error

func Convert_v1_FilesystemVolumeSource_To_api_Disk

func Convert_v1_FilesystemVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, volumesDiscardIgnore []string) error

Convert_v1_FilesystemVolumeSource_To_api_Disk takes a FS source and builds the domain Disk representation

func Convert_v1_HostDisk_To_api_Disk

func Convert_v1_HostDisk_To_api_Disk(volumeName string, path string, disk *api.Disk) error

func Convert_v1_Hotplug_BlockVolumeSource_To_api_Disk

func Convert_v1_Hotplug_BlockVolumeSource_To_api_Disk(volumeName string, disk *api.Disk, volumesDiscardIgnore []string) 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, volumesDiscardIgnore []string) 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_Input_To_api_InputDevice

func Convert_v1_Input_To_api_InputDevice(input *v1.Input, inputDevice *api.Input) 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_Rng_To_api_Rng

func Convert_v1_Rng_To_api_Rng(_ *v1.Rng, rng *api.Rng, c *ConverterContext) error

func Convert_v1_SysprepSource_To_api_Disk added in v0.39.0

func Convert_v1_SysprepSource_To_api_Disk(volumeName string, disk *api.Disk) error

func Convert_v1_VirtualMachineInstance_To_api_Domain added in v0.39.0

func Convert_v1_VirtualMachineInstance_To_api_Domain(vmi *v1.VirtualMachineInstance, domain *api.Domain, c *ConverterContext) (err error)

func Convert_v1_Volume_To_api_Disk

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

func Convert_v1_Watchdog_To_api_Watchdog(source *v1.Watchdog, watchdog *api.Watchdog, _ *ConverterContext) error

func GetBlockDeviceVolumePath

func GetBlockDeviceVolumePath(volumeName string) string

func GetFilesystemVolumePath

func GetFilesystemVolumePath(volumeName string) string

func GetHotplugBlockDeviceVolumePath

func GetHotplugBlockDeviceVolumePath(volumeName string) string

GetHotplugBlockDeviceVolumePath returns the path and name of a hotplugged block device

func GetHotplugFilesystemVolumePath

func GetHotplugFilesystemVolumePath(volumeName string) string

GetHotplugFilesystemVolumePath returns the path and file name of a hotplug disk image

func GetImageInfo

func GetImageInfo(imagePath string) (*containerdisk.DiskInfo, error)

func GetResolvConfDetailsFromPod

func GetResolvConfDetailsFromPod() ([][]byte, []string, error)

returns nameservers [][]byte, searchdomains []string, error

func GetVolumeNameByTarget added in v0.39.0

func GetVolumeNameByTarget(domain *api.Domain, target string) string

GetVolumeNameByTarget returns the volume name associated to the device target in the domain (e.g vda)

func PlacePCIDevicesOnRootComplex

func PlacePCIDevicesOnRootComplex(spec *api.DomainSpec) (err error)

func QuantityToByte

func QuantityToByte(quantity resource.Quantity) (api.Memory, error)

func QuantityToMebiByte

func QuantityToMebiByte(quantity resource.Quantity) (uint64, error)

func SetDriverCacheMode

func SetDriverCacheMode(disk *api.Disk) error

func SetOptimalIOMode

func SetOptimalIOMode(disk *api.Disk) error

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          []api.HostDevice
	SMBios                *cmdv1.SMBios
	GpuDevices            []string
	VgpuDevices           []string
	HostDevices           map[string]HostDevicesList
	EmulatorThreadCpu     *int
	OVMFPath              string
	MemBalloonStatsPeriod uint
	UseVirtioTransitional bool
	EphemeraldiskCreator  ephemeraldisk.EphemeralDiskCreatorInterface
	VolumesDiscardIgnore  []string
	Topology              *cmdv1.Topology
}

type HostDeviceType

type HostDeviceType string

type HostDevicesList

type HostDevicesList struct {
	Type     HostDeviceType
	AddrList []string
}

Jump to

Keyboard shortcuts

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