hyperv

package
v6.0.0-...-432687d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Rendered for windows/amd64

Index

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 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 (HyperVStubber) Exists

func (h HyperVStubber) Exists(name string) (bool, 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 (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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL