hyperv

package
v2.39.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPowerShellNotFound = errors.New("Powershell was not found in the path")
	ErrNotAdministrator   = errors.New("Hyper-v commands have to be run as an Administrator")
	ErrNotInstalled       = errors.New("Hyper-V PowerShell Module is not available")
)

Functions

This section is empty.

Types

type Driver

type Driver struct {
	*drivers.VMDriver
	VirtualSwitch        string
	MacAddress           string
	DisableDynamicMemory bool
}

func NewDriver

func NewDriver(hostName, storePath string) *Driver

NewDriver creates a new Hyper-v driver with default settings.

func (*Driver) Create

func (d *Driver) Create() error

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the name of the driver

func (*Driver) GetIP

func (d *Driver) GetIP() (string, error)

func (*Driver) GetSharedDirs

func (d *Driver) GetSharedDirs() ([]drivers.SharedDir, error)

func (*Driver) GetState

func (d *Driver) GetState() (state.State, error)

func (*Driver) Kill

func (d *Driver) Kill() error

Kill force stops an host

func (*Driver) PreCreateCheck

func (d *Driver) PreCreateCheck() error

PreCreateCheck checks that the machine creation process can be started safely.

func (*Driver) Remove

func (d *Driver) Remove() error

Remove removes an host

func (*Driver) Start

func (d *Driver) Start() error

Start starts an host

func (*Driver) Stop

func (d *Driver) Stop() error

Stop stops an host

func (*Driver) UpdateConfigRaw

func (d *Driver) UpdateConfigRaw(rawConfig []byte) error

Jump to

Keyboard shortcuts

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