Documentation
¶
Rendered for windows/amd64
Index ¶
- Variables
- func GetVMFromMC(mc *vmconfigs.MachineConfig) (*hypervctl.VirtualMachineManager, *hypervctl.VirtualMachine, error)
- func HasHyperVAdminRights() bool
- func HasHyperVPermissions() bool
- type HyperVStubber
- func (h HyperVStubber) CreateVM(_ define.CreateVMOpts, mc *vmconfigs.MachineConfig, ...) error
- func (h HyperVStubber) Exists(name string) (bool, error)
- func (h HyperVStubber) GetRosetta(_ *vmconfigs.MachineConfig) (bool, error)
- func (h HyperVStubber) MountType() vmconfigs.VolumeMountType
- func (h HyperVStubber) MountVolumesToVM(_ *vmconfigs.MachineConfig, _ bool) error
- func (h HyperVStubber) PostStartNetworking(mc *vmconfigs.MachineConfig, _ bool) error
- func (h HyperVStubber) PrepareIgnition(mc *vmconfigs.MachineConfig, _ *ignition.IgnitionBuilder) (*ignition.ReadyUnitOpts, error)
- func (h HyperVStubber) Remove(mc *vmconfigs.MachineConfig) ([]string, func() error, error)
- func (h HyperVStubber) RemoveAndCleanMachines(_ *define.MachineDirs) error
- func (h HyperVStubber) RequireExclusiveActive() bool
- func (h HyperVStubber) SetProviderAttrs(mc *vmconfigs.MachineConfig, opts define.SetOptions) error
- func (h HyperVStubber) StartNetworking(mc *vmconfigs.MachineConfig, cmd *gvproxy.GvproxyCommand) error
- func (h HyperVStubber) StartVM(mc *vmconfigs.MachineConfig) (func() error, func() error, error)
- func (h HyperVStubber) State(mc *vmconfigs.MachineConfig, _ bool) (define.Status, error)
- func (h HyperVStubber) StopHostNetworking(mc *vmconfigs.MachineConfig, vmType define.VMType) error
- func (h HyperVStubber) StopVM(mc *vmconfigs.MachineConfig, hardStop bool) error
- func (h HyperVStubber) UpdateSSHPort(_ *vmconfigs.MachineConfig, _ int) error
- func (h HyperVStubber) UseProviderNetworkSetup() bool
- func (h HyperVStubber) UserModeNetworkEnabled(_ *vmconfigs.MachineConfig) bool
- func (h HyperVStubber) VMType() define.VMType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHypervUserNotInAdminGroup = errors.New("Hyper-V machines require Hyper-V admin rights to be managed. Please add the current user to the Hyper-V Administrators group or run Podman as an administrator") ErrHypervRegistryInitRequiresElevation = errors.New("the first time Podman initializes a Hyper-V machine, it requires admin rights. Please run Podman as an administrator") ErrHypervRegistryRemoveRequiresElevation = errors.New("removing this Hyper-V machine requires admin rights to clean up the Windows Registry. Please run Podman as an administrator") ErrHypervRegistryUpdateRequiresElevation = errors.New("this machine's configuration requires additional Hyper-V networking (hvsock) entries in the Windows Registry. Please run Podman as an administrator") ErrHypervLegacyMachineRequiresElevation = errors.New("starting or stopping Hyper-V machines created with Podman 5.x or earlier requires admin rights. Please run Podman as an administrator") )
Functions ¶
func GetVMFromMC ¶
func GetVMFromMC(mc *vmconfigs.MachineConfig) (*hypervctl.VirtualMachineManager, *hypervctl.VirtualMachine, error)
func HasHyperVAdminRights ¶
func HasHyperVAdminRights() bool
func HasHyperVPermissions ¶
func HasHyperVPermissions() bool
HasHyperVPermissions checks if the user has either admin rights or Hyper-V admin rights.
Types ¶
type HyperVStubber ¶
type HyperVStubber struct {
vmconfigs.HyperVConfig
}
func (HyperVStubber) CreateVM ¶
func (h HyperVStubber) CreateVM(_ define.CreateVMOpts, mc *vmconfigs.MachineConfig, builder *ignition.IgnitionBuilder) error
func (HyperVStubber) GetRosetta ¶
func (h HyperVStubber) GetRosetta(_ *vmconfigs.MachineConfig) (bool, error)
func (HyperVStubber) MountType ¶
func (h HyperVStubber) MountType() vmconfigs.VolumeMountType
func (HyperVStubber) MountVolumesToVM ¶
func (h HyperVStubber) MountVolumesToVM(_ *vmconfigs.MachineConfig, _ bool) error
func (HyperVStubber) PostStartNetworking ¶
func (h HyperVStubber) PostStartNetworking(mc *vmconfigs.MachineConfig, _ bool) error
func (HyperVStubber) PrepareIgnition ¶
func (h HyperVStubber) PrepareIgnition(mc *vmconfigs.MachineConfig, _ *ignition.IgnitionBuilder) (*ignition.ReadyUnitOpts, error)
func (HyperVStubber) Remove ¶
func (h HyperVStubber) Remove(mc *vmconfigs.MachineConfig) ([]string, func() error, error)
func (HyperVStubber) RemoveAndCleanMachines ¶
func (h HyperVStubber) RemoveAndCleanMachines(_ *define.MachineDirs) error
func (HyperVStubber) RequireExclusiveActive ¶
func (h HyperVStubber) RequireExclusiveActive() bool
func (HyperVStubber) SetProviderAttrs ¶
func (h HyperVStubber) SetProviderAttrs(mc *vmconfigs.MachineConfig, opts define.SetOptions) error
func (HyperVStubber) StartNetworking ¶
func (h HyperVStubber) StartNetworking(mc *vmconfigs.MachineConfig, cmd *gvproxy.GvproxyCommand) error
func (HyperVStubber) StartVM ¶
func (h HyperVStubber) StartVM(mc *vmconfigs.MachineConfig) (func() error, func() error, error)
func (HyperVStubber) State ¶
func (h HyperVStubber) State(mc *vmconfigs.MachineConfig, _ bool) (define.Status, error)
State is returns the state as a define.status. for hyperv, state differs from others because state is determined by the VM itself. normally this can be done with vm.State() and a conversion but doing here as well. this requires a little more interaction with the hypervisor
func (HyperVStubber) StopHostNetworking ¶
func (h HyperVStubber) StopHostNetworking(mc *vmconfigs.MachineConfig, vmType define.VMType) error
TODO should this be plumbed higher into the code stack?
func (HyperVStubber) StopVM ¶
func (h HyperVStubber) StopVM(mc *vmconfigs.MachineConfig, hardStop bool) error
func (HyperVStubber) UpdateSSHPort ¶
func (h HyperVStubber) UpdateSSHPort(_ *vmconfigs.MachineConfig, _ int) error
func (HyperVStubber) UseProviderNetworkSetup ¶
func (h HyperVStubber) UseProviderNetworkSetup() bool
func (HyperVStubber) UserModeNetworkEnabled ¶
func (h HyperVStubber) UserModeNetworkEnabled(_ *vmconfigs.MachineConfig) bool
func (HyperVStubber) VMType ¶
func (h HyperVStubber) VMType() define.VMType
Click to show internal directories.
Click to hide internal directories.