Documentation ¶
Index ¶
- Constants
- func GenerateStartOptions(input *GenerateStartOptionsInput) (string, error)
- func GetDiskAddr(idx int, isVdiSpice bool) int
- func GetDiskDeviceModel(driver string) string
- func GetNicAddr(index int, disksLen int, isoDevsLen int, isVdiSpice bool) int
- func GetNicDeviceModel(name string) string
- func RegisterCmd(cmds ...QemuCommand)
- type Arch
- type CPUOption
- type GenerateStartOptionsInput
- type Monitor
- type QemuCommand
- type QemuOptions
- type Version
Constants ¶
View Source
const ( OS_NAME_LINUX = "Linux" OS_NAME_WINDOWS = "Windows" OS_NAME_MACOS = "macOS" OS_NAME_ANDROID = "Android" OS_NAME_VMWARE = "VMWare" OS_NAME_CIRROS = "Cirros" OS_NAME_OPENWRT = "OpenWrt" MODE_READLINE = "readline" MODE_CONTROL = "control" DISK_DRIVER_VIRTIO = "virtio" DISK_DRIVER_SCSI = "scsi" DISK_DRIVER_PVSCSI = "pvscsi" DISK_DRIVER_IDE = "ide" DISK_DRIVER_SATA = "sata" BIOS_UEFI = "UEFI" )
Variables ¶
This section is empty.
Functions ¶
func GenerateStartOptions ¶
func GenerateStartOptions( input *GenerateStartOptionsInput, ) (string, error)
func GetDiskAddr ¶
func GetDiskDeviceModel ¶
func GetNicDeviceModel ¶
func RegisterCmd ¶
func RegisterCmd(cmds ...QemuCommand)
Types ¶
type GenerateStartOptionsInput ¶
type GenerateStartOptionsInput struct { QemuVersion Version QemuArch Arch CPUOption EnableUUID bool UUID string Mem uint64 Cpu uint Name string OsName string HugepagesEnabled bool EnableMemfd bool IsQ35 bool BootOrder string CdromPath string Nics []jsonutils.JSONObject OVNIntegrationBridge string Disks []api.GuestdiskJsonDesc Devices []string Machine string BIOS string OVMFPath string VNCPort uint VNCPassword bool IsolatedDevicesParams *isolated_device.QemuParams EnableLog bool LogPath string HMPMonitor *Monitor QMPMonitor *Monitor IsVdiSpice bool SpicePort uint PCIBus string VGA string PidFilePath string HomeDir string ExtraOptions []string EnableRNGRandom bool EnableSerialDevice bool NeedMigrate bool LiveMigratePort uint LiveMigrateUseTLS bool IsSlave bool IsMaster bool EnablePvpanic bool EncryptKeyPath string }
type QemuCommand ¶
type QemuCommand interface { GetVersion() Version GetArch() Arch GetOptions() QemuOptions }
func EnsureGetCommand ¶
func EnsureGetCommand(version Version, arch Arch) QemuCommand
func GetCommand ¶
func GetCommand(version Version, arch Arch) (QemuCommand, bool)
type QemuOptions ¶
type QemuOptions interface { IsArm() bool CPU(opt CPUOption, osName string) (string, string, error) Log(enable bool, qemuLogPath string) string RTC() string FreezeCPU() string Daemonize() string Nodefaults() string Nodefconfig() string NoKVMPitReinjection() string Global() string Machine(machineType string, accel string) string KeyboardLayoutLanguage(lang string) string SMP(cpus uint) string Name(name string) string UUID(enable bool, uuid string) string Memory(sizeMB uint64) string MemPath(sizeMB uint64, p string) string MemDev(sizeMB uint64) string MemFd(sizeMB uint64) string Boot(order string, enableMenu bool) string BIOS(ovmfPath, homedir string) (string, error) Device(devStr string) string Drive(driveStr string) string Spice(port uint, password string) string Chardev(backend string, id string, name string) string MonitorChardev(id string, port uint, host string) string Mon(chardev string, id string, mode string) string Object(typeName string, props map[string]string) string Pidfile(file string) string USB() string VdiSpice(spicePort uint, pciBus string) []string VNC(port uint, usePasswd bool) string VGA(vType string, alterOpt string) string Cdrom(cdromPath string, osName string, isQ35 bool, disksLen int) []string SerialDevice() []string QGA(homeDir string) []string PvpanicDevice() string }
Click to show internal directories.
Click to hide internal directories.