Documentation
¶
Index ¶
- func SaveMachineConfig(machineConfig MachineConfig) error
- type MachineConfig
- func (c *MachineConfig) CleanPIDFile()
- func (c *MachineConfig) CompressQemuDiskImage() error
- func (c *MachineConfig) CreateQemuDiskImage(imageName string) error
- func (c *MachineConfig) DecompressQemuDiskImage() error
- func (c *MachineConfig) Exec(cmd string, root bool) (string, error)
- func (c *MachineConfig) GetAccel() string
- func (c *MachineConfig) GetIPAddressByMac() string
- func (c *MachineConfig) GetInstancePID() (int, error)
- 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 ¶
func SaveMachineConfig ¶ added in v1.0.3
func SaveMachineConfig(machineConfig MachineConfig) error
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"` MachineIP string `yaml:"machineip"` Port string `yaml:"port"` VMNet bool `yaml:"vmnet"` 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 GetMachineConfig ¶ added in v1.0.3
func GetMachineConfig(vmName string) (MachineConfig, error)
func (*MachineConfig) CleanPIDFile ¶
func (c *MachineConfig) CleanPIDFile()
func (*MachineConfig) CompressQemuDiskImage ¶ added in v1.0.5
func (c *MachineConfig) CompressQemuDiskImage() error
CompressQemuDiskImage compresses the QEMU Disk image and overwrites it
func (*MachineConfig) CreateQemuDiskImage ¶
func (c *MachineConfig) CreateQemuDiskImage(imageName string) error
CreateQemuDiskImage creates a qcow2 disk image
func (*MachineConfig) DecompressQemuDiskImage ¶ added in v1.0.5
func (c *MachineConfig) DecompressQemuDiskImage() error
DecompressQemuDiskImage decompresses the QEMU Disk image and overwrites it
func (*MachineConfig) Exec ¶
func (c *MachineConfig) Exec(cmd string, root bool) (string, error)
Exec starts an interactive shell terminal in VM
func (*MachineConfig) GetAccel ¶
func (c *MachineConfig) GetAccel() string
GetAccel Returns platform-appropriate accelerator
func (*MachineConfig) GetIPAddressByMac ¶ added in v1.0.5
func (c *MachineConfig) GetIPAddressByMac() string
AssignIP obtains machine IP address from bootpd.plist. Only applicale to machines created on VMNet
func (*MachineConfig) GetInstancePID ¶ added in v1.0.4
func (c *MachineConfig) GetInstancePID() (int, error)
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.