Documentation
¶
Index ¶
- type MachineConfig
- func (c *MachineConfig) CleanPIDFile()
- func (c *MachineConfig) CreateQemuDiskImage(imageName string) error
- func (c *MachineConfig) Exec(cmd string, root bool) error
- func (c *MachineConfig) GetAccel() string
- func (c *MachineConfig) HasHostCPU() bool
- func (c *MachineConfig) IsNativeArch() bool
- func (c *MachineConfig) Launch() error
- func (c *MachineConfig) Pause() error
- func (c *MachineConfig) ResizeQemuDiskImage() error
- func (c *MachineConfig) Resume() error
- func (c *MachineConfig) Start() error
- func (c *MachineConfig) Status() (string, int)
- func (c *MachineConfig) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MachineConfig ¶
type MachineConfig struct {
Alias string `yaml:"alias"`
Image string `yaml:"image"`
Arch string `yaml:"arch"`
CPU string `yaml:"cpu"`
Memory string `yaml:"memory"`
Disk string `yaml:"disk"`
Mount string `yaml:"mount"`
Port string `yaml:"port"`
SSHPort string `yaml:"sshport"`
SSHUser string `yaml:"sshuser"`
SSHPassword string `yaml:"sshpassword"`
RootPassword *string `yaml:"rootpassword,omitempty"`
MACAddress string `yaml:"macaddress"`
Location string `yaml:"location"`
Tags []string `yaml:"tags"`
}
func (*MachineConfig) CleanPIDFile ¶
func (c *MachineConfig) CleanPIDFile()
func (*MachineConfig) CreateQemuDiskImage ¶
func (c *MachineConfig) CreateQemuDiskImage(imageName string) error
CreateQemuDiskImage creates a qcow2 disk image
func (*MachineConfig) Exec ¶
func (c *MachineConfig) Exec(cmd string, root bool) error
Exec starts an interactive shell terminal in VM
func (*MachineConfig) GetAccel ¶
func (c *MachineConfig) GetAccel() string
GetAccel Returns platform-appropriate accelerator
func (*MachineConfig) HasHostCPU ¶
func (c *MachineConfig) HasHostCPU() bool
func (*MachineConfig) IsNativeArch ¶
func (c *MachineConfig) IsNativeArch() bool
IsNativeArch tests if VM architecture is the same as host
func (*MachineConfig) Launch ¶
func (c *MachineConfig) Launch() error
Launch macpine downloads a fresh image and creates a VM directory
func (*MachineConfig) ResizeQemuDiskImage ¶
func (c *MachineConfig) ResizeQemuDiskImage() error
ResizeQemuDiskImage resizes a qcow2 disk image
func (*MachineConfig) Status ¶
func (c *MachineConfig) Status() (string, int)
Status returns VM status
Click to show internal directories.
Click to hide internal directories.