converter

package
v0.59.0-alpha.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	QEMUSeaBiosDebugPipe = "/var/run/kubevirt-private/QEMUSeaBiosDebugPipe"
)
View Source
const (
	SEVPolicyNoDebug = "0x1"
)

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

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, ifaceType string) uint32

func ConvertV1ToAPIBalloning

func ConvertV1ToAPIBalloning(source *v1.Devices, ballooning *api.MemBalloon, c *ConverterContext)

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, volumeStatusMap map[string]v1.VolumeStatus) 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_Sound_To_api_Sound added in v0.48.0

func Convert_v1_Sound_To_api_Sound(vmi *v1.VirtualMachineInstance, domainDevices *api.Devices, _ *ConverterContext)

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_Usbredir_To_api_Usbredir added in v0.44.1

func Convert_v1_Usbredir_To_api_Usbredir(vmi *v1.VirtualMachineInstance, domainDevices *api.Devices, _ *ConverterContext) 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 GetInterfaceType added in v0.59.0

func GetInterfaceType(iface *v1.Interface) string

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 IsPreAllocated added in v0.48.0

func IsPreAllocated(path string) bool

func PlacePCIDevicesOnRootComplex

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

func SetDriverCacheMode

func SetDriverCacheMode(disk *api.Disk, directIOChecker DirectIOChecker) error

func SetOptimalIOMode

func SetOptimalIOMode(disk *api.Disk) error

Set optimal io mode automatically

Types

type ConverterContext

type ConverterContext struct {
	Architecture          string
	AllowEmulation        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
	DisksInfo             map[string]*cmdv1.DiskInfo
	SMBios                *cmdv1.SMBios
	SRIOVDevices          []api.HostDevice
	GenericHostDevices    []api.HostDevice
	GPUHostDevices        []api.HostDevice
	EFIConfiguration      *EFIConfiguration
	MemBalloonStatsPeriod uint
	UseVirtioTransitional bool
	EphemeraldiskCreator  ephemeraldisk.EphemeralDiskCreatorInterface
	VolumesDiscardIgnore  []string
	Topology              *cmdv1.Topology
	CpuScheduler          *api.VCPUScheduler
	ExpandDisksEnabled    bool
	UseLaunchSecurity     bool
}

type DirectIOChecker added in v0.44.1

type DirectIOChecker interface {
	CheckBlockDevice(path string) (bool, error)
	CheckFile(path string) (bool, error)
}

func NewDirectIOChecker added in v0.44.1

func NewDirectIOChecker() DirectIOChecker

type EFIConfiguration added in v0.44.1

type EFIConfiguration struct {
	EFICode      string
	EFIVars      string
	SecureLoader bool
}

type MockDirectIOChecker added in v0.44.1

type MockDirectIOChecker struct {
	// contains filtered or unexported fields
}

Mock of DirectIOChecker interface

func NewMockDirectIOChecker added in v0.44.1

func NewMockDirectIOChecker(ctrl *gomock.Controller) *MockDirectIOChecker

func (*MockDirectIOChecker) CheckBlockDevice added in v0.44.1

func (_m *MockDirectIOChecker) CheckBlockDevice(path string) (bool, error)

func (*MockDirectIOChecker) CheckFile added in v0.44.1

func (_m *MockDirectIOChecker) CheckFile(path string) (bool, error)

func (*MockDirectIOChecker) EXPECT added in v0.44.1

func (_m *MockDirectIOChecker) EXPECT() *_MockDirectIOCheckerRecorder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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