arch

package
v0.3.10-0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Arch_x86_64  string = "x86_64"
	Arch_aarch64 string = "aarch64"
)
View Source
const (
	ARM_MAX_CPUS = 64
	ARM_SOCKETS  = 2
	ARM_CORES    = 32
	ARM_THREADS  = 1

	ARM_MEM_DEFAULT_SLOTS = 4
	ARM_MAX_MEM_MB        = 262144
)
View Source
const (
	X86_MAX_CPUS = 240
	X86_SOCKETS  = 2
	X86_CORES    = 64
	X86_THREADS  = 1

	X86_MEM_DEFAULT_SLOTS = 4
)

Variables

View Source
var X86_MAX_MEM_MB uint = 524288

Functions

This section is empty.

Types

type ARM

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

func (*ARM) GenerateCdromDesc

func (*ARM) GenerateCdromDesc(osName string, cdrom *desc.SGuestCdrom)

-device scsi-cd,drive=cd0,share-rw=true if=none,file=%s,id=cd0,media=cdrom

func (*ARM) GenerateCpuDesc

func (*ARM) GenerateCpuDesc(cpus uint, s KVMGuestInstance) (*desc.SGuestCpu, error)

func (*ARM) GenerateFloppyDesc

func (*ARM) GenerateFloppyDesc(osName string, floppy *desc.SGuestFloppy)

func (*ARM) GenerateIsaSerialDesc

func (*ARM) GenerateIsaSerialDesc() *desc.SGuestIsaSerial

func (*ARM) GenerateMachineDesc

func (*ARM) GenerateMachineDesc(accel string) *desc.SGuestMachine

func (*ARM) GenerateMemDesc

func (*ARM) GenerateMemDesc() *desc.SGuestMem

func (*ARM) GeneratePvpanicDesc

func (*ARM) GeneratePvpanicDesc() *desc.SGuestPvpanic

func (*ARM) GenerateQgaDesc

func (*ARM) GenerateQgaDesc(qgaPath string) *desc.SGuestQga

type Arch

type Arch interface {
	GenerateCpuDesc(cpus uint, s KVMGuestInstance) (*desc.SGuestCpu, error)
	GenerateMemDesc() *desc.SGuestMem
	GenerateMachineDesc(accel string) *desc.SGuestMachine
	GenerateCdromDesc(osName string, cdrom *desc.SGuestCdrom)
	GenerateFloppyDesc(osName string, floppy *desc.SGuestFloppy)
	GenerateQgaDesc(qgaPath string) *desc.SGuestQga
	GeneratePvpanicDesc() *desc.SGuestPvpanic
	GenerateIsaSerialDesc() *desc.SGuestIsaSerial
}

func NewArch

func NewArch(arch string) Arch

type KVMGuestInstance

type KVMGuestInstance interface {
	HasGpu() bool
	IsOldWindows() bool
	GetOsName() string

	GetKernelVersion() string
	CpuMax() (uint, error)
	IsEnabledNestedVirt() bool
	IsKvmSupport() bool
}

type X86

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

func (*X86) GenerateCdromDesc

func (*X86) GenerateCdromDesc(osName string, cdrom *desc.SGuestCdrom)

func (*X86) GenerateCpuDesc

func (x86 *X86) GenerateCpuDesc(cpus uint, s KVMGuestInstance) (*desc.SGuestCpu, error)

func (*X86) GenerateFloppyDesc

func (*X86) GenerateFloppyDesc(osName string, floppy *desc.SGuestFloppy)

-device floppy,drive=floppy0 -drive id=floppy0,if=none

func (*X86) GenerateIsaSerialDesc

func (*X86) GenerateIsaSerialDesc() *desc.SGuestIsaSerial

func (*X86) GenerateMachineDesc

func (*X86) GenerateMachineDesc(accel string) *desc.SGuestMachine

func (*X86) GenerateMemDesc

func (*X86) GenerateMemDesc() *desc.SGuestMem

func (*X86) GeneratePvpanicDesc

func (*X86) GeneratePvpanicDesc() *desc.SGuestPvpanic

func (*X86) GenerateQgaDesc

func (*X86) GenerateQgaDesc(qgaPath string) *desc.SGuestQga

func (*X86) IsKernelVersionEnableHyperv

func (*X86) IsKernelVersionEnableHyperv(kernelVersion string) bool

Jump to

Keyboard shortcuts

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