Documentation ¶
Index ¶
- Constants
- Variables
- func GetVirtualizationProvider() machine.VirtProvider
- type MachineVM
- func (v *MachineVM) Init(opts machine.InitOptions) (bool, error)
- func (v *MachineVM) Inspect() (*machine.InspectInfo, error)
- func (v *MachineVM) Remove(_ string, opts machine.RemoveOptions) (string, func() error, error)
- func (v *MachineVM) SSH(_ string, opts machine.SSHOptions) error
- func (v *MachineVM) Set(_ string, opts machine.SetOptions) ([]error, error)
- func (v *MachineVM) Start(name string, opts machine.StartOptions) error
- func (v *MachineVM) State(bypass bool) (machine.Status, error)
- func (v *MachineVM) Stop(_ string, _ machine.StopOptions) error
- type MachineVMV1deprecated
- type Monitor
- type Monitorv1
- type Virtualization
- func (p *Virtualization) Artifact() machine.Artifact
- func (p *Virtualization) CheckExclusiveActiveVM() (bool, string, error)
- func (p *Virtualization) Compression() machine.ImageCompression
- func (p *Virtualization) Format() machine.ImageFormat
- func (p *Virtualization) IsValidVMName(name string) (bool, error)
- func (p *Virtualization) List(_ machine.ListOptions) ([]*machine.ListResponse, error)
- func (p *Virtualization) LoadVMByName(name string) (machine.VM, error)
- func (p *Virtualization) NewMachine(opts machine.InitOptions) (machine.VM, error)
- func (p *Virtualization) RemoveAndCleanMachines() error
- func (p *Virtualization) VMType() machine.VMType
Constants ¶
const ( VolumeTypeVirtfs = "virtfs" MountType9p = "9p" )
Variables ¶
var (
QemuCommand = "qemu-system-x86_64"
)
Functions ¶
func GetVirtualizationProvider ¶ added in v4.3.0
func GetVirtualizationProvider() machine.VirtProvider
Types ¶
type MachineVM ¶
type MachineVM struct { // ConfigPath is the path to the configuration file ConfigPath machine.VMFile // The command line representation of the qemu command CmdLine []string // HostUser contains info about host user machine.HostUser // ImageConfig describes the bootable image machine.ImageConfig // Mounts is the list of remote filesystems to mount Mounts []machine.Mount // Name of VM Name string // PidFilePath is the where the Proxy PID file lives PidFilePath machine.VMFile // VMPidFilePath is the where the VM PID file lives VMPidFilePath machine.VMFile // QMPMonitor is the qemu monitor object for sending commands QMPMonitor Monitor // ReadySocket tells host when vm is booted ReadySocket machine.VMFile // ResourceConfig is physical attrs of the VM machine.ResourceConfig // SSHConfig for accessing the remote vm machine.SSHConfig // Starting tells us whether the machine is running or if we have just dialed it to start it Starting bool // Created contains the original created time instead of querying the file mod time Created time.Time // LastUp contains the last recorded uptime LastUp time.Time }
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) Inspect ¶ added in v4.1.0
func (v *MachineVM) Inspect() (*machine.InspectInfo, error)
Inspect returns verbose detail about the machine
func (*MachineVM) Remove ¶
Remove deletes all the files associated with a machine including ssh keys, the image itself
func (*MachineVM) SSH ¶
func (v *MachineVM) SSH(_ 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
func (*MachineVM) Start ¶
func (v *MachineVM) Start(name string, opts machine.StartOptions) error
Start executes the qemu command line and forks it
type MachineVMV1
deprecated
added in
v4.1.0
type MachineVMV1 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 []machine.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 Monitorv1 // RemoteUsername of the vm user RemoteUsername string // Whether this machine should run in a rootful or rootless manner Rootful bool // UID is the numerical id of the user that called machine UID int }
Deprecated: MachineVMV1 is being deprecated in favor a more flexible and informative structure
type Monitor ¶
type Virtualization ¶ added in v4.5.0
type Virtualization struct {
// contains filtered or unexported fields
}
func (*Virtualization) Artifact ¶ added in v4.5.0
func (p *Virtualization) Artifact() machine.Artifact
func (*Virtualization) CheckExclusiveActiveVM ¶ added in v4.5.0
func (p *Virtualization) CheckExclusiveActiveVM() (bool, string, error)
CheckExclusiveActiveVM checks if there is a VM already running that does not allow other VMs to be running
func (*Virtualization) Compression ¶ added in v4.5.0
func (p *Virtualization) Compression() machine.ImageCompression
func (*Virtualization) Format ¶ added in v4.5.0
func (p *Virtualization) Format() machine.ImageFormat
func (*Virtualization) IsValidVMName ¶ added in v4.5.0
func (p *Virtualization) IsValidVMName(name string) (bool, error)
func (*Virtualization) List ¶ added in v4.5.0
func (p *Virtualization) List(_ machine.ListOptions) ([]*machine.ListResponse, error)
List lists all vm's that use qemu virtualization
func (*Virtualization) LoadVMByName ¶ added in v4.5.0
func (p *Virtualization) LoadVMByName(name string) (machine.VM, error)
LoadVMByName reads a json file that describes a known qemu vm and returns a vm instance
func (*Virtualization) NewMachine ¶ added in v4.5.0
func (p *Virtualization) NewMachine(opts machine.InitOptions) (machine.VM, error)
NewMachine initializes an instance of a virtual machine based on the qemu virtualization.
func (*Virtualization) RemoveAndCleanMachines ¶ added in v4.5.0
func (p *Virtualization) RemoveAndCleanMachines() error
RemoveAndCleanMachines removes all machine and cleans up any other files associated with podman machine
func (*Virtualization) VMType ¶ added in v4.5.0
func (p *Virtualization) VMType() machine.VMType