Documentation ¶
Index ¶
- Variables
- func CheckActiveVM() (bool, string, error)
- func GetVMInfos() ([]*machine.ListResponse, error)
- func IsValidVMName(name string) (bool, error)
- func List(_ machine.ListOptions) ([]*machine.ListResponse, error)
- func LoadVMByName(name string) (machine.VM, error)
- func NewMachine(opts machine.InitOptions) (machine.VM, error)
- type MachineVM
- func (v *MachineVM) Init(opts machine.InitOptions) 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
Constants ¶
This section is empty.
Variables ¶
View Source
var (
QemuCommand = "qemu-system-x86_64"
)
Functions ¶
func CheckActiveVM ¶
CheckActiveVM checks if there is a VM already running
func GetVMInfos ¶
func GetVMInfos() ([]*machine.ListResponse, error)
func IsValidVMName ¶
func List ¶
func List(_ machine.ListOptions) ([]*machine.ListResponse, error)
List lists all vm's that use qemu virtualization
func LoadVMByName ¶
LoadByName reads a json file that describes a known qemu vm and returns a vm instance
func NewMachine ¶
func NewMachine(opts machine.InitOptions) (machine.VM, error)
NewMachine initializes an instance of a virtual machine based on the qemu virtualization.
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 // 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) 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
Click to show internal directories.
Click to hide internal directories.