Documentation ¶
Index ¶
- Constants
- Variables
- func GetQemuProvider() machine.Provider
- func GetVMInfos() ([]*machine.ListResponse, error)
- type MachineVM
- func (v *MachineVM) Init(opts machine.InitOptions) (bool, error)
- func (v *MachineVM) Remove(name string, opts machine.RemoveOptions) (string, func() error, error)
- func (v *MachineVM) SSH(name string, opts machine.SSHOptions) error
- func (v *MachineVM) Start(name string, _ machine.StartOptions) error
- func (v *MachineVM) Stop(name string, _ machine.StopOptions) error
- type Monitor
- type Mount
- type Provider
- func (p *Provider) CheckExclusiveActiveVM() (bool, string, error)
- func (p *Provider) IsValidVMName(name string) (bool, error)
- func (p *Provider) List(_ machine.ListOptions) ([]*machine.ListResponse, error)
- func (p *Provider) LoadVMByName(name string) (machine.VM, error)
- func (p *Provider) NewMachine(opts machine.InitOptions) (machine.VM, error)
Constants ¶
View Source
const ( VolumeTypeVirtfs = "virtfs" MountType9p = "9p" )
Variables ¶
View Source
var (
QemuCommand = "qemu-system-x86_64"
)
Functions ¶
func GetQemuProvider ¶
func GetVMInfos ¶
func GetVMInfos() ([]*machine.ListResponse, error)
Types ¶
type MachineVM ¶
type MachineVM struct { // CPUs to be assigned to the VM CPUs uint64 // The command line representation of the qemu command CmdLine []string // Mounts is the list of remote filesystems to mount Mounts []Mount // IdentityPath is the fq path to the ssh priv key IdentityPath string // IgnitionFilePath is the fq path to the .ign file IgnitionFilePath string // ImageStream is the update stream for the image ImageStream string // ImagePath is the fq path to ImagePath string // Memory in megabytes assigned to the vm Memory uint64 // Disk size in gigabytes assigned to the vm DiskSize uint64 // Name of the vm Name string // SSH port for user networking Port int // QMPMonitor is the qemu monitor object for sending commands QMPMonitor Monitor // RemoteUsername of the vm user RemoteUsername string }
func (*MachineVM) Init ¶
func (v *MachineVM) Init(opts machine.InitOptions) (bool, error)
Init writes the json configuration file to the filesystem for other verbs (start, stop)
func (*MachineVM) SSH ¶
func (v *MachineVM) SSH(name string, opts machine.SSHOptions) error
SSH opens an interactive SSH session to the vm specified. Added ssh function to VM interface: pkg/machine/config/go : line 58
type Monitor ¶
type Provider ¶
type Provider struct{}
func (*Provider) CheckExclusiveActiveVM ¶
CheckExclusiveActiveVM checks if there is a VM already running that does not allow other VMs to be running
func (*Provider) List ¶
func (p *Provider) List(_ machine.ListOptions) ([]*machine.ListResponse, error)
List lists all vm's that use qemu virtualization
func (*Provider) LoadVMByName ¶
LoadByName reads a json file that describes a known qemu vm and returns a vm instance
func (*Provider) NewMachine ¶
NewMachine initializes an instance of a virtual machine based on the qemu virtualization.
Click to show internal directories.
Click to hide internal directories.