Documentation
¶
Index ¶
- Constants
- Variables
- func AddTapInterface(ifname string, uid int) error
- func CreateService(name string) error
- func DelTapInterface(ifname string) error
- func GenHwAddr() (string, error)
- func IsAlreadyConnectedError(err error) bool
- func IsNotConnectedError(err error) bool
- func ParseSCSIAddr(s string) (string, string, string)
- func RemoveService(name string) error
- func SetInterfaceUp(ifname string) error
- type AlreadyConnectedError
- type BlkDisk
- type CPU
- type Channels
- func (cc *Channels) Append(c *VirtioChannel)
- func (cc Channels) Exists(id string) bool
- func (cc Channels) Get(id string) *VirtioChannel
- func (cc *Channels) Insert(c *VirtioChannel, idx int) error
- func (cc Channels) NameExists(name string) bool
- func (cc *Channels) Remove(id string) error
- func (cc *Channels) RemoveN(idx int) error
- type DevDriver
- type DevDrivers
- type Disk
- type DiskBackend
- type Disks
- type ExtKernel
- type ISCSIDisk
- type IncomingConf
- type Instance
- func GetIncomingConf(vmname string) (Instance, error)
- func GetInstanceConf(vmname string) (Instance, error)
- func GetInstanceQemu(vmname string, mon *qmp.Monitor) (Instance, error)
- func GetStartupConf(vmname string) (Instance, error)
- func NewIncomingConf(vmname string) Instance
- func NewInstanceConf(vmname string) Instance
- type InstanceConf
- func (c *InstanceConf) AppendChannel(ch VirtioChannel) error
- func (c *InstanceConf) AppendDisk(d Disk) error
- func (c *InstanceConf) AppendNetIface(iface NetIface) error
- func (c InstanceConf) Clone() Instance
- func (c InstanceConf) GetActualCPUs() int
- func (c InstanceConf) GetActualMem() int
- func (c InstanceConf) GetCPUModel() string
- func (c InstanceConf) GetCPUQuota() int
- func (c InstanceConf) GetChannels() Channels
- func (c InstanceConf) GetDisks() Disks
- func (c InstanceConf) GetKernelCmdline() string
- func (c InstanceConf) GetKernelImage() string
- func (c InstanceConf) GetKernelInitrd() string
- func (c InstanceConf) GetKernelModiso() string
- func (c InstanceConf) GetMachineType() string
- func (c InstanceConf) GetNetIfaces() NetIfaces
- func (c InstanceConf) GetTotalCPUs() int
- func (c InstanceConf) GetTotalMem() int
- func (c *InstanceConf) InsertDisk(d Disk, idx int) error
- func (c InstanceConf) IsIncoming() bool
- func (c InstanceConf) Name() string
- func (c InstanceConf) Pid() int
- func (c *InstanceConf) RemoveChannel(id string) error
- func (c *InstanceConf) RemoveDisk(dpath string) error
- func (c InstanceConf) RemoveDiskBitmap(dpath string) error
- func (c *InstanceConf) RemoveKernelConf() error
- func (c *InstanceConf) RemoveNetIface(ifname string) error
- func (c InstanceConf) ResizeDisk(dpath string) error
- func (c InstanceConf) Save() error
- func (c InstanceConf) SaveStartupConfig() error
- func (c *InstanceConf) SetActualCPUs(n int) error
- func (c *InstanceConf) SetActualMem(s int) error
- func (c *InstanceConf) SetCPUModel(model string) error
- func (c *InstanceConf) SetCPUQuota(quota int) error
- func (c *InstanceConf) SetDiskReadIops(dpath string, iops int) error
- func (c *InstanceConf) SetDiskWriteIops(dpath string, iops int) error
- func (c *InstanceConf) SetKernelCmdline(s string) error
- func (c *InstanceConf) SetKernelImage(s string) error
- func (c *InstanceConf) SetKernelInitrd(s string) error
- func (c *InstanceConf) SetKernelModiso(s string) error
- func (c *InstanceConf) SetMachineType(t string) error
- func (c *InstanceConf) SetNetIfaceDownScript(ifname, scriptPath string) error
- func (c *InstanceConf) SetNetIfaceLinkDown(ifname string) error
- func (c *InstanceConf) SetNetIfaceLinkUp(ifname string) error
- func (c *InstanceConf) SetNetIfaceUpScript(ifname, scriptPath string) error
- func (c *InstanceConf) SetTotalCPUs(n int) error
- func (c *InstanceConf) SetTotalMem(s int) error
- func (c InstanceConf) SetVNCPassword(s string) error
- func (c InstanceConf) Status() (string, error)
- func (c InstanceConf) Uid() int
- type InstanceQemu
- func (r *InstanceQemu) AppendChannel(ch VirtioChannel) error
- func (r *InstanceQemu) AppendDisk(d Disk) error
- func (r *InstanceQemu) AppendNetIface(iface NetIface) error
- func (r InstanceQemu) Clone() Instance
- func (r InstanceQemu) GetActualCPUs() int
- func (r InstanceQemu) GetActualMem() int
- func (r InstanceQemu) GetCPUModel() string
- func (r InstanceQemu) GetCPUQuota() int
- func (r InstanceQemu) GetChannels() Channels
- func (r InstanceQemu) GetDisks() Disks
- func (r InstanceQemu) GetKernelCmdline() string
- func (r InstanceQemu) GetKernelImage() string
- func (r InstanceQemu) GetKernelInitrd() string
- func (r InstanceQemu) GetKernelModiso() string
- func (r InstanceQemu) GetMachineType() string
- func (r InstanceQemu) GetNetIfaces() NetIfaces
- func (r InstanceQemu) GetTotalCPUs() int
- func (r InstanceQemu) GetTotalMem() int
- func (r *InstanceQemu) InsertDisk(d Disk, index int) error
- func (r InstanceQemu) IsIncoming() bool
- func (r InstanceQemu) Name() string
- func (r InstanceQemu) Pid() int
- func (r *InstanceQemu) RemoveChannel(id string) error
- func (r *InstanceQemu) RemoveDisk(dpath string) error
- func (r *InstanceQemu) RemoveDiskBitmap(dpath string) error
- func (r *InstanceQemu) RemoveKernelConf() error
- func (r *InstanceQemu) RemoveNetIface(ifname string) error
- func (r InstanceQemu) ResizeDisk(dpath string) error
- func (r InstanceQemu) Save() error
- func (r *InstanceQemu) SetActualCPUs(n int) error
- func (r *InstanceQemu) SetActualMem(s int) error
- func (r *InstanceQemu) SetCPUModel(model string) error
- func (r *InstanceQemu) SetCPUQuota(quota int) error
- func (r *InstanceQemu) SetDiskReadIops(dpath string, iops int) error
- func (r *InstanceQemu) SetDiskWriteIops(dpath string, iops int) error
- func (r *InstanceQemu) SetKernelCmdline(s string) error
- func (r *InstanceQemu) SetKernelImage(s string) error
- func (r *InstanceQemu) SetKernelInitrd(s string) error
- func (r *InstanceQemu) SetKernelModiso(s string) error
- func (r InstanceQemu) SetMachineType(t string) error
- func (r *InstanceQemu) SetNetIfaceDownScript(ifname, scriptPath string) error
- func (r *InstanceQemu) SetNetIfaceLinkDown(ifname string) error
- func (r *InstanceQemu) SetNetIfaceLinkUp(ifname string) error
- func (r *InstanceQemu) SetNetIfaceUpScript(ifname, scriptPath string) error
- func (r *InstanceQemu) SetTotalCPUs(n int) error
- func (r *InstanceQemu) SetTotalMem(s int) error
- func (r InstanceQemu) SetVNCPassword(s string) error
- func (r InstanceQemu) Status() (string, error)
- func (r InstanceQemu) Uid() int
- type Memory
- type NBDDisk
- type NetIface
- type NetIfaces
- func (nn *NetIfaces) Append(iface *NetIface)
- func (nn NetIfaces) Clone() NetIfaces
- func (nn NetIfaces) Exists(ifname string) bool
- func (nn NetIfaces) Get(ifname string) *NetIface
- func (nn *NetIfaces) Insert(iface *NetIface, idx int) error
- func (nn *NetIfaces) Remove(ifname string) error
- func (nn *NetIfaces) RemoveN(idx int) error
- type NotConnectedError
- type NotFoundError
- type NotRunningError
- type QemuVersion
- type SCSIBusInfo
- type StartupConf
- type VersionInfo
- type VirtMachine
- type VirtioChannel
Constants ¶
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 ¶
var ( DEBUG bool ErrNotImplemented = errors.New("Not implemented") ErrTimedOut = errors.New("Timeout error") )
var DiskDrivers = DevDrivers{ DevDriver{"virtio-blk-pci", true}, DevDriver{"scsi-hd", true}, DevDriver{"ide-hd", false}, }
var NetDrivers = DevDrivers{ DevDriver{"virtio-net-pci", true}, DevDriver{"rtl8139", true}, DevDriver{"e1000", true}, }
var VERSION = VersionInfo{0, 4, 0}
Functions ¶
func AddTapInterface ¶
AddTapInterface creates a new tap interface with Name == ifname and owner == uid.
func CreateService ¶
func DelTapInterface ¶
DelTapInterface destroys an existing tap interface with Name == ifname.
func IsAlreadyConnectedError ¶
func IsNotConnectedError ¶
func RemoveService ¶
func SetInterfaceUp ¶
SetInterfaceUp changes the state of a given interface to UP.
Types ¶
type AlreadyConnectedError ¶
func (*AlreadyConnectedError) Error ¶
func (e *AlreadyConnectedError) Error() string
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 ¶
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 ¶
NameExists returns true if an element with Name == name is present in the list. Otherwise returns false.
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 (Disk) IsAvailable ¶
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) Exists ¶
Exists returns true if an element with Path == p is present in the list. Otherwise returns false.
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 ¶
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 (ISCSIDisk) IsAvailable ¶
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 GetInstanceConf ¶
func GetStartupConf ¶
func NewIncomingConf ¶
func NewInstanceConf ¶
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 NetIface ¶
type NetIfaces ¶
type NetIfaces []NetIface
func (NetIfaces) Exists ¶
Exists returns true if an element with Ifname == ifname is present in the list. Otherwise returns false.
type NotConnectedError ¶
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 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