kvmrun

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INCOMINGPORT = 30000
	WEBSOCKSPORT = 10700
	NBDPORT      = 60000

	VMCONFDIR = "/etc/kvmrun"
	SVDATADIR = "/var/lib/supervise"

	VMNETINIT = "/usr/lib/kvmrun/netinit"

	QMPMONDIR  = "/var/run/kvm-monitor"
	CHROOTDIR  = "/var/lib/kvmrun/chroot"
	KERNELSDIR = "/var/lib/kvmrun/kernels"
	MODULESDIR = "/var/lib/kvmrun/modules"
	LOGSDIR    = "/var/log/kvmrun"
)

Variables

View Source
var (
	DEBUG bool

	ErrNotImplemented = errors.New("Not implemented")
	ErrTimedOut       = errors.New("Timeout error")
)
View Source
var DiskDrivers = DevDrivers{
	DevDriver{"virtio-blk-pci", true},
	DevDriver{"scsi-hd", true},
	DevDriver{"ide-hd", false},
}
View Source
var NetDrivers = DevDrivers{
	DevDriver{"virtio-net-pci", true},
	DevDriver{"rtl8139", true},
	DevDriver{"e1000", true},
}
View Source
var VERSION = VersionInfo{0, 4, 0}

Functions

func AddTapInterface

func AddTapInterface(ifname string, uid int) error

AddTapInterface creates a new tap interface with Name == ifname and owner == uid.

func CreateService

func CreateService(name string) error

func DelTapInterface

func DelTapInterface(ifname string) error

DelTapInterface destroys an existing tap interface with Name == ifname.

func GenHwAddr

func GenHwAddr() (string, error)

GenHwAddr generates a random hardware address with Linux KVM prefix 54:52:00.

func IsAlreadyConnectedError

func IsAlreadyConnectedError(err error) bool

func IsNotConnectedError

func IsNotConnectedError(err error) bool

func ParseSCSIAddr

func ParseSCSIAddr(s string) (string, string, string)

func RemoveService

func RemoveService(name string) error

func SetInterfaceUp

func SetInterfaceUp(ifname string) error

SetInterfaceUp changes the state of a given interface to UP.

Types

type AlreadyConnectedError

type AlreadyConnectedError struct {
	Source string
	Object string
}

func (*AlreadyConnectedError) Error

func (e *AlreadyConnectedError) Error() string

type BlkDisk

type BlkDisk struct {
	Path string
}

func NewBlkDisk

func NewBlkDisk(p string) (*BlkDisk, error)

func (BlkDisk) BaseName

func (d BlkDisk) BaseName() string

func (BlkDisk) IsAvailable

func (d BlkDisk) IsAvailable() (bool, error)

func (BlkDisk) IsLocal

func (d BlkDisk) IsLocal() bool

func (BlkDisk) QdevID

func (d BlkDisk) QdevID() string

func (BlkDisk) Size

func (d BlkDisk) Size() (uint64, error)

type CPU

type CPU struct {
	Actual int    `json:"actual"`
	Total  int    `json:"total"`
	Quota  int    `json:"quota,omitempty"`
	Model  string `json:"model,omitempty"`
}

CPU represents the guest virtual CPU configuration structure.

type Channels

type Channels []VirtioChannel

func (*Channels) Append

func (cc *Channels) Append(c *VirtioChannel)

Append appends a new element to the end of the list.

func (Channels) Exists

func (cc Channels) Exists(id string) bool

Exists returns true if an element with ID == id is present in the list. Otherwise returns false.

func (Channels) Get

func (cc Channels) Get(id string) *VirtioChannel

Get returns a pointer to an element with ID == id.

func (*Channels) Insert

func (cc *Channels) Insert(c *VirtioChannel, idx int) error

Insert inserts a new element into the list at a given position.

func (Channels) NameExists

func (cc Channels) NameExists(name string) bool

NameExists returns true if an element with Name == name is present in the list. Otherwise returns false.

func (*Channels) Remove

func (cc *Channels) Remove(id string) error

Remove removes an element with ID == id from the list.

func (*Channels) RemoveN

func (cc *Channels) RemoveN(idx int) error

RemoveN removes an element with Index == idx from the list.

type DevDriver

type DevDriver struct {
	Name         string `json:"name"`
	HotPluggable bool   `json:"hotplugguble"`
}

type DevDrivers

type DevDrivers []DevDriver

func (DevDrivers) Exists

func (d DevDrivers) Exists(name string) bool

func (DevDrivers) HotPluggable

func (d DevDrivers) HotPluggable(name string) bool

type Disk

type Disk struct {
	Backend         DiskBackend `json:"-"`
	Path            string      `json:"path"`
	Driver          string      `json:"driver"`
	IopsRd          int         `json:"iops_rd"`
	IopsWr          int         `json:"iops_wr"`
	Addr            string      `json:"addr,omitempty"`
	Bootindex       uint        `json:"bootindex,omitempty"`
	QemuVirtualSize uint64      `json:"-"`
	HasBitmap       bool        `json:"-"`
}

func NewDisk

func NewDisk(p string) (*Disk, error)

func (Disk) BaseName

func (d Disk) BaseName() string

func (Disk) IsAvailable

func (d Disk) IsAvailable() (bool, error)

func (Disk) IsLocal

func (d Disk) IsLocal() bool

func (Disk) QdevID

func (d Disk) QdevID() string

type DiskBackend

type DiskBackend interface {
	BaseName() string
	QdevID() string
	Size() (uint64, error)
	IsLocal() bool
	IsAvailable() (bool, error)
}

func NewDiskBackend

func NewDiskBackend(p string) (DiskBackend, error)

type Disks

type Disks []Disk

func (*Disks) Append

func (dd *Disks) Append(d *Disk)

Append appends a new element to the end of the list.

func (Disks) Clone

func (dd Disks) Clone() Disks

// Clone returns a duplicate of a Disks object (deep copy).

func (Disks) Exists

func (dd Disks) Exists(p string) bool

Exists returns true if an element with Path == p is present in the list. Otherwise returns false.

func (Disks) Get

func (dd Disks) Get(p string) *Disk

Get returns a pointer to an element with Path == p.

func (*Disks) Insert

func (dd *Disks) Insert(d *Disk, idx int) error

Insert inserts a new element into the list at a given position.

func (*Disks) Remove

func (dd *Disks) Remove(p string) error

Remove removes an element with Ifname == ifname from the list.

func (*Disks) RemoveN

func (dd *Disks) RemoveN(idx int) error

RemoveN removes an element with Index == idx from the list.

type ExtKernel

type ExtKernel struct {
	Image   string `json:"image"`
	Cmdline string `json:"cmdline"`
	Initrd  string `json:"initrd"`
	Modiso  string `json:"modiso"`
}

ExtKernel represents the guest kernel configuration structure.

type ISCSIDisk

type ISCSIDisk struct {
	Path string
	Url  iscsi.URL
}

We support iscsi url's on the form iscsi://[<username>%<password>@]<host>[:<port>]/<targetname>/<lun> E.g.: iscsi://client%secret@192.168.0.254/iqn.2018-02.ru.netangels.cvds:mailstorage/0

func NewISCSIDisk

func NewISCSIDisk(p string) (*ISCSIDisk, error)

func (ISCSIDisk) BaseName

func (d ISCSIDisk) BaseName() string

func (ISCSIDisk) IsAvailable

func (d ISCSIDisk) IsAvailable() (bool, error)

func (ISCSIDisk) IsLocal

func (d ISCSIDisk) IsLocal() bool

func (ISCSIDisk) QdevID

func (d ISCSIDisk) QdevID() string

func (ISCSIDisk) Size

func (d ISCSIDisk) Size() (uint64, error)

type IncomingConf

type IncomingConf struct {
	InstanceConf
}

IncomingConf represents a virtual machine configuration that is used to launch a QEMU incoming instance.

type Instance

type Instance interface {
	Clone() Instance

	Name() string
	Status() (string, error)

	GetActualMem() int
	GetTotalMem() int
	SetTotalMem(int) error
	SetActualMem(int) error

	GetActualCPUs() int
	GetTotalCPUs() int
	GetCPUQuota() int
	GetCPUModel() string
	SetActualCPUs(int) error
	SetTotalCPUs(int) error
	SetCPUQuota(int) error
	SetCPUModel(string) error

	GetDisks() Disks
	ResizeDisk(string) error
	AppendDisk(Disk) error
	InsertDisk(Disk, int) error
	RemoveDisk(string) error
	SetDiskReadIops(string, int) error
	SetDiskWriteIops(string, int) error
	RemoveDiskBitmap(string) error

	GetNetIfaces() NetIfaces
	AppendNetIface(NetIface) error
	RemoveNetIface(string) error
	SetNetIfaceUpScript(string, string) error
	SetNetIfaceDownScript(string, string) error
	SetNetIfaceLinkUp(string) error
	SetNetIfaceLinkDown(string) error

	GetChannels() Channels
	AppendChannel(VirtioChannel) error
	RemoveChannel(string) error

	GetKernelImage() string
	GetKernelCmdline() string
	GetKernelInitrd() string
	GetKernelModiso() string
	RemoveKernelConf() error
	SetKernelImage(string) error
	SetKernelCmdline(string) error
	SetKernelInitrd(string) error
	SetKernelModiso(string) error

	SetVNCPassword(string) error

	Uid() int
	Pid() int
	GetMachineType() string
	SetMachineType(string) error
	Save() error
	IsIncoming() bool
}

func GetIncomingConf

func GetIncomingConf(vmname string) (Instance, error)

func GetInstanceConf

func GetInstanceConf(vmname string) (Instance, error)

func GetInstanceQemu

func GetInstanceQemu(vmname string, mon *qmp.Monitor) (Instance, error)

func GetStartupConf

func GetStartupConf(vmname string) (Instance, error)

func NewIncomingConf

func NewIncomingConf(vmname string) Instance

func NewInstanceConf

func NewInstanceConf(vmname string) Instance

type InstanceConf

type InstanceConf struct {
	Mem       Memory    `json:"memory"`
	CPU       CPU       `json:"cpu"`
	Disks     Disks     `json:"storage"`
	NetIfaces NetIfaces `json:"network"`
	Channels  Channels  `json:"channels"`
	Kernel    ExtKernel `json:"kernel"`
	Machine   string    `json:"machine,omitempty"`
	// contains filtered or unexported fields
}

InstanceConf represents a virtual machine configuration that is used to prepare a QEMU command line.

func (*InstanceConf) AppendChannel

func (c *InstanceConf) AppendChannel(ch VirtioChannel) error

func (*InstanceConf) AppendDisk

func (c *InstanceConf) AppendDisk(d Disk) error

func (*InstanceConf) AppendNetIface

func (c *InstanceConf) AppendNetIface(iface NetIface) error

func (InstanceConf) Clone

func (c InstanceConf) Clone() Instance

func (InstanceConf) GetActualCPUs

func (c InstanceConf) GetActualCPUs() int

func (InstanceConf) GetActualMem

func (c InstanceConf) GetActualMem() int

func (InstanceConf) GetCPUModel

func (c InstanceConf) GetCPUModel() string

func (InstanceConf) GetCPUQuota

func (c InstanceConf) GetCPUQuota() int

func (InstanceConf) GetChannels

func (c InstanceConf) GetChannels() Channels

func (InstanceConf) GetDisks

func (c InstanceConf) GetDisks() Disks

func (InstanceConf) GetKernelCmdline

func (c InstanceConf) GetKernelCmdline() string

func (InstanceConf) GetKernelImage

func (c InstanceConf) GetKernelImage() string

func (InstanceConf) GetKernelInitrd

func (c InstanceConf) GetKernelInitrd() string

func (InstanceConf) GetKernelModiso

func (c InstanceConf) GetKernelModiso() string

func (InstanceConf) GetMachineType

func (c InstanceConf) GetMachineType() string

func (InstanceConf) GetNetIfaces

func (c InstanceConf) GetNetIfaces() NetIfaces

func (InstanceConf) GetTotalCPUs

func (c InstanceConf) GetTotalCPUs() int

func (InstanceConf) GetTotalMem

func (c InstanceConf) GetTotalMem() int

func (*InstanceConf) InsertDisk

func (c *InstanceConf) InsertDisk(d Disk, idx int) error

func (InstanceConf) IsIncoming

func (c InstanceConf) IsIncoming() bool

func (InstanceConf) Name

func (c InstanceConf) Name() string

func (InstanceConf) Pid

func (c InstanceConf) Pid() int

func (*InstanceConf) RemoveChannel

func (c *InstanceConf) RemoveChannel(id string) error

func (*InstanceConf) RemoveDisk

func (c *InstanceConf) RemoveDisk(dpath string) error

func (InstanceConf) RemoveDiskBitmap

func (c InstanceConf) RemoveDiskBitmap(dpath string) error

func (*InstanceConf) RemoveKernelConf

func (c *InstanceConf) RemoveKernelConf() error

func (*InstanceConf) RemoveNetIface

func (c *InstanceConf) RemoveNetIface(ifname string) error

func (InstanceConf) ResizeDisk

func (c InstanceConf) ResizeDisk(dpath string) error

func (InstanceConf) Save

func (c InstanceConf) Save() error

func (InstanceConf) SaveStartupConfig

func (c InstanceConf) SaveStartupConfig() error

func (*InstanceConf) SetActualCPUs

func (c *InstanceConf) SetActualCPUs(n int) error

func (*InstanceConf) SetActualMem

func (c *InstanceConf) SetActualMem(s int) error

func (*InstanceConf) SetCPUModel

func (c *InstanceConf) SetCPUModel(model string) error

func (*InstanceConf) SetCPUQuota

func (c *InstanceConf) SetCPUQuota(quota int) error

func (*InstanceConf) SetDiskReadIops

func (c *InstanceConf) SetDiskReadIops(dpath string, iops int) error

func (*InstanceConf) SetDiskWriteIops

func (c *InstanceConf) SetDiskWriteIops(dpath string, iops int) error

func (*InstanceConf) SetKernelCmdline

func (c *InstanceConf) SetKernelCmdline(s string) error

func (*InstanceConf) SetKernelImage

func (c *InstanceConf) SetKernelImage(s string) error

func (*InstanceConf) SetKernelInitrd

func (c *InstanceConf) SetKernelInitrd(s string) error

func (*InstanceConf) SetKernelModiso

func (c *InstanceConf) SetKernelModiso(s string) error

func (*InstanceConf) SetMachineType

func (c *InstanceConf) SetMachineType(t string) error

func (*InstanceConf) SetNetIfaceDownScript

func (c *InstanceConf) SetNetIfaceDownScript(ifname, scriptPath string) error

func (*InstanceConf) SetNetIfaceLinkDown

func (c *InstanceConf) SetNetIfaceLinkDown(ifname string) error

func (*InstanceConf) SetNetIfaceLinkUp

func (c *InstanceConf) SetNetIfaceLinkUp(ifname string) error

func (*InstanceConf) SetNetIfaceUpScript

func (c *InstanceConf) SetNetIfaceUpScript(ifname, scriptPath string) error

func (*InstanceConf) SetTotalCPUs

func (c *InstanceConf) SetTotalCPUs(n int) error

func (*InstanceConf) SetTotalMem

func (c *InstanceConf) SetTotalMem(s int) error

func (InstanceConf) SetVNCPassword

func (c InstanceConf) SetVNCPassword(s string) error

func (InstanceConf) Status

func (c InstanceConf) Status() (string, error)

func (InstanceConf) Uid

func (c InstanceConf) Uid() int

type InstanceQemu

type InstanceQemu struct {
	Mem       Memory    `json:"memory"`
	CPU       CPU       `json:"cpu"`
	Disks     Disks     `json:"storage"`
	NetIfaces NetIfaces `json:"network"`
	Channels  Channels  `json:"channels"`
	Kernel    ExtKernel `json:"kernel"`
	Machine   string    `json:"machine,omitempty"`
	// contains filtered or unexported fields
}

InstanceQemu represents a configuration of a running QEMU instance.

func (*InstanceQemu) AppendChannel

func (r *InstanceQemu) AppendChannel(ch VirtioChannel) error

func (*InstanceQemu) AppendDisk

func (r *InstanceQemu) AppendDisk(d Disk) error

func (*InstanceQemu) AppendNetIface

func (r *InstanceQemu) AppendNetIface(iface NetIface) error

func (InstanceQemu) Clone

func (r InstanceQemu) Clone() Instance

func (InstanceQemu) GetActualCPUs

func (r InstanceQemu) GetActualCPUs() int

func (InstanceQemu) GetActualMem

func (r InstanceQemu) GetActualMem() int

func (InstanceQemu) GetCPUModel

func (r InstanceQemu) GetCPUModel() string

func (InstanceQemu) GetCPUQuota

func (r InstanceQemu) GetCPUQuota() int

func (InstanceQemu) GetChannels

func (r InstanceQemu) GetChannels() Channels

func (InstanceQemu) GetDisks

func (r InstanceQemu) GetDisks() Disks

func (InstanceQemu) GetKernelCmdline

func (r InstanceQemu) GetKernelCmdline() string

func (InstanceQemu) GetKernelImage

func (r InstanceQemu) GetKernelImage() string

func (InstanceQemu) GetKernelInitrd

func (r InstanceQemu) GetKernelInitrd() string

func (InstanceQemu) GetKernelModiso

func (r InstanceQemu) GetKernelModiso() string

func (InstanceQemu) GetMachineType

func (r InstanceQemu) GetMachineType() string

func (InstanceQemu) GetNetIfaces

func (r InstanceQemu) GetNetIfaces() NetIfaces

func (InstanceQemu) GetTotalCPUs

func (r InstanceQemu) GetTotalCPUs() int

func (InstanceQemu) GetTotalMem

func (r InstanceQemu) GetTotalMem() int

func (*InstanceQemu) InsertDisk

func (r *InstanceQemu) InsertDisk(d Disk, index int) error

func (InstanceQemu) IsIncoming

func (r InstanceQemu) IsIncoming() bool

func (InstanceQemu) Name

func (r InstanceQemu) Name() string

func (InstanceQemu) Pid

func (r InstanceQemu) Pid() int

func (*InstanceQemu) RemoveChannel

func (r *InstanceQemu) RemoveChannel(id string) error

func (*InstanceQemu) RemoveDisk

func (r *InstanceQemu) RemoveDisk(dpath string) error

func (*InstanceQemu) RemoveDiskBitmap

func (r *InstanceQemu) RemoveDiskBitmap(dpath string) error

func (*InstanceQemu) RemoveKernelConf

func (r *InstanceQemu) RemoveKernelConf() error

func (*InstanceQemu) RemoveNetIface

func (r *InstanceQemu) RemoveNetIface(ifname string) error

func (InstanceQemu) ResizeDisk

func (r InstanceQemu) ResizeDisk(dpath string) error

func (InstanceQemu) Save

func (r InstanceQemu) Save() error

func (*InstanceQemu) SetActualCPUs

func (r *InstanceQemu) SetActualCPUs(n int) error

func (*InstanceQemu) SetActualMem

func (r *InstanceQemu) SetActualMem(s int) error

func (*InstanceQemu) SetCPUModel

func (r *InstanceQemu) SetCPUModel(model string) error

func (*InstanceQemu) SetCPUQuota

func (r *InstanceQemu) SetCPUQuota(quota int) error

func (*InstanceQemu) SetDiskReadIops

func (r *InstanceQemu) SetDiskReadIops(dpath string, iops int) error

func (*InstanceQemu) SetDiskWriteIops

func (r *InstanceQemu) SetDiskWriteIops(dpath string, iops int) error

func (*InstanceQemu) SetKernelCmdline

func (r *InstanceQemu) SetKernelCmdline(s string) error

func (*InstanceQemu) SetKernelImage

func (r *InstanceQemu) SetKernelImage(s string) error

func (*InstanceQemu) SetKernelInitrd

func (r *InstanceQemu) SetKernelInitrd(s string) error

func (*InstanceQemu) SetKernelModiso

func (r *InstanceQemu) SetKernelModiso(s string) error

func (InstanceQemu) SetMachineType

func (r InstanceQemu) SetMachineType(t string) error

func (*InstanceQemu) SetNetIfaceDownScript

func (r *InstanceQemu) SetNetIfaceDownScript(ifname, scriptPath string) error

func (*InstanceQemu) SetNetIfaceLinkDown

func (r *InstanceQemu) SetNetIfaceLinkDown(ifname string) error

func (*InstanceQemu) SetNetIfaceLinkUp

func (r *InstanceQemu) SetNetIfaceLinkUp(ifname string) error

func (*InstanceQemu) SetNetIfaceUpScript

func (r *InstanceQemu) SetNetIfaceUpScript(ifname, scriptPath string) error

func (*InstanceQemu) SetTotalCPUs

func (r *InstanceQemu) SetTotalCPUs(n int) error

func (*InstanceQemu) SetTotalMem

func (r *InstanceQemu) SetTotalMem(s int) error

func (InstanceQemu) SetVNCPassword

func (r InstanceQemu) SetVNCPassword(s string) error

func (InstanceQemu) Status

func (r InstanceQemu) Status() (string, error)

func (InstanceQemu) Uid

func (r InstanceQemu) Uid() int

type Memory

type Memory struct {
	Actual int `json:"actual"`
	Total  int `json:"total"`
}

Memory represents the guest memory configuration structure.

type NBDDisk

type NBDDisk struct {
	Path string
	URI  nbd.URI
}

func NewNBDDisk

func NewNBDDisk(p string) (*NBDDisk, error)

func (NBDDisk) BaseName

func (d NBDDisk) BaseName() string

func (NBDDisk) IsAvailable

func (d NBDDisk) IsAvailable() (bool, error)

func (NBDDisk) IsLocal

func (d NBDDisk) IsLocal() bool

func (NBDDisk) QdevID

func (d NBDDisk) QdevID() string

func (NBDDisk) Size

func (d NBDDisk) Size() (uint64, error)

type NetIface

type NetIface struct {
	Ifname    string `json:"ifname"`
	Driver    string `json:"driver"`
	HwAddr    string `json:"hwaddr"`
	Addr      string `json:"addr,omitempty"`
	Bootindex int    `json:"bootindex,omitempty"`
	Ifup      string `json:"ifup,omitempty"`
	Ifdown    string `json:"ifdown,omitempty"`
}

func (*NetIface) QdevID

func (iface *NetIface) QdevID() string

type NetIfaces

type NetIfaces []NetIface

func (*NetIfaces) Append

func (nn *NetIfaces) Append(iface *NetIface)

Append appends a new element to the end of the list.

func (NetIfaces) Clone

func (nn NetIfaces) Clone() NetIfaces

Clone returns a duplicate of a NetIfaces object (deep copy).

func (NetIfaces) Exists

func (nn NetIfaces) Exists(ifname string) bool

Exists returns true if an element with Ifname == ifname is present in the list. Otherwise returns false.

func (NetIfaces) Get

func (nn NetIfaces) Get(ifname string) *NetIface

Get returns a pointer to an element with Ifname == ifname.

func (*NetIfaces) Insert

func (nn *NetIfaces) Insert(iface *NetIface, idx int) error

Insert inserts a new element into the list at a given position.

func (*NetIfaces) Remove

func (nn *NetIfaces) Remove(ifname string) error

Remove removes an element with Ifname == ifname from the list.

func (*NetIfaces) RemoveN

func (nn *NetIfaces) RemoveN(idx int) error

RemoveN removes an element with Index == idx from the list.

type NotConnectedError

type NotConnectedError struct {
	Source string
	Object string
}

func (*NotConnectedError) Error

func (e *NotConnectedError) Error() string

type NotFoundError

type NotFoundError struct {
	VMName string
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type NotRunningError

type NotRunningError struct {
	VMName string
}

func (*NotRunningError) Error

func (e *NotRunningError) Error() string

type QemuVersion

type QemuVersion int

func (QemuVersion) String

func (v QemuVersion) String() string

type SCSIBusInfo

type SCSIBusInfo struct {
	Type string `json:"type"`
	Addr string `json:"addr,omitempty"`
}

type StartupConf

type StartupConf struct {
	InstanceConf
}

StartupConf represents a virtual machine configuration that was used to launch a QEMU instance.

func (StartupConf) Save

func (c StartupConf) Save() error

type VersionInfo

type VersionInfo struct {
	Major int `json:"major"`
	Minor int `json:"minor"`
	Micro int `json:"micro"`
}

func (VersionInfo) String

func (v VersionInfo) String() string

func (VersionInfo) ToInt

func (v VersionInfo) ToInt() int

type VirtMachine

type VirtMachine struct {
	Name string   `json:"name"`
	C    Instance `json:"conf"`
	R    Instance `json:"run,omitempty"`
	// contains filtered or unexported fields
}

func GetVirtMachine

func GetVirtMachine(vmname string, mon *qmp.Monitor) (*VirtMachine, error)

func (VirtMachine) Clone

func (vm VirtMachine) Clone() *VirtMachine

func (*VirtMachine) Status

func (vm *VirtMachine) Status() (string, error)

type VirtioChannel

type VirtioChannel struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Addr string `json:"addr,omitempty"`
}

func (*VirtioChannel) CharDevName

func (c *VirtioChannel) CharDevName() string

func (*VirtioChannel) QdevID

func (c *VirtioChannel) QdevID() string

Jump to

Keyboard shortcuts

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