vmware

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: BSD-3-Clause, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fusion

type Fusion struct {
	// contains filtered or unexported fields
}

Fusion represents a VMware Fusion application.

func NewFusion

func NewFusion(vmx, username, password, encPassword string) *Fusion

NewFusion return the new Fusion.

func (*Fusion) AddSharedFolder

func (f *Fusion) AddSharedFolder(shareName, newHostPath string) error

AddSharedFolder add a Host-Guest shared folder.

func (*Fusion) CaptureScreen

func (f *Fusion) CaptureScreen(dst string) error

CaptureScreen capture the screen of the VM to a local file.

func (*Fusion) CopyFileFromGuestToHost

func (f *Fusion) CopyFileFromGuestToHost(guestFilepath, hostFilepath string) error

CopyFileFromGuestToHost copy a file from guest OS to host OS.

func (*Fusion) CopyFileFromHostToGuest

func (f *Fusion) CopyFileFromHostToGuest(hostFilepath, guestFilepath string) error

CopyFileFromHostToGuest copy a file from host OS to guest OS.

func (*Fusion) CreateTempfileInGuest

func (f *Fusion) CreateTempfileInGuest() (string, error)

CreateTempfileInGuest create a temporary file in Guest OS.

func (*Fusion) DeleteFileInGuest

func (f *Fusion) DeleteFileInGuest(filename string) error

DeleteFileInGuest delete a file in Guest OS.

func (*Fusion) DeleteSnapshot

func (f *Fusion) DeleteSnapshot(snapshotName string, deleteChildren bool) error

DeleteSnapshot remove a snapshot from a VM.

func (*Fusion) DirectoryExistsInGuest

func (f *Fusion) DirectoryExistsInGuest(dir string) bool

DirectoryExistsInGuest check if a directory exists in Guest OS.

func (*Fusion) DisableSharedFolders

func (f *Fusion) DisableSharedFolders(runtime bool) error

DisableSharedFolders disable shared folders in Guest.

func (*Fusion) EnableSharedFolders

func (f *Fusion) EnableSharedFolders(runtime bool) error

EnableSharedFolders enable shared folders in Guest.

func (*Fusion) FileExistsInGuest

func (f *Fusion) FileExistsInGuest(filename string) bool

FileExistsInGuest check if a file exists in Guest OS.

func (*Fusion) GetGuestIPAddress

func (f *Fusion) GetGuestIPAddress(wait bool) (string, error)

GetGuestIPAddress gets the IP address of the guest.

func (*Fusion) Halt

func (f *Fusion) Halt() error

Halt wrap of stop command with soft.

func (*Fusion) KillProcessInGuest

func (f *Fusion) KillProcessInGuest(pid int) error

KillProcessInGuest kill a process in Guest OS.

func (*Fusion) ListDirectoryInGuest

func (f *Fusion) ListDirectoryInGuest(dir string) ([]string, error)

ListDirectoryInGuest list a directory in Guest OS.

func (*Fusion) ListProcessesInGuest

func (f *Fusion) ListProcessesInGuest() ([]vmrun.ListProcessesInGuestInfo, error)

ListProcessesInGuest List running processes in Guest OS.

func (*Fusion) ListSnapshots

func (f *Fusion) ListSnapshots() ([]string, int, error)

ListSnapshots list all snapshots in a VM.

func (*Fusion) Pause

func (f *Fusion) Pause() error

Pause pause a VM.

func (*Fusion) ReadVariable

func (f *Fusion) ReadVariable(mode vmrun.VariableMode, env string) (string, error)

ReadVariable read a variable in the VM state.

func (*Fusion) RemoveSharedFolder

func (f *Fusion) RemoveSharedFolder(shareName string) error

RemoveSharedFolder remove a Host-Guest shared folder.

func (*Fusion) RenameFileInGuest

func (f *Fusion) RenameFileInGuest(src, dst string) error

RenameFileInGuest rename a file in Guest OS.

func (*Fusion) Reset

func (f *Fusion) Reset() error

Reset reset a VM or Team.

func (*Fusion) Restart

func (f *Fusion) Restart() error

Restart restart a VM uses wrap of reset command with soft.

func (*Fusion) RevertToSnapshot

func (f *Fusion) RevertToSnapshot(snapshotName string) error

RevertToSnapshot set VM state to a snapshot.

func (*Fusion) RunProgramInGuest

func (f *Fusion) RunProgramInGuest(config vmrun.RunInGuestConfig, cmdPath string, cmdArgs ...string) error

RunProgramInGuest run a program in Guest OS.

func (*Fusion) RunScriptInGuest

func (f *Fusion) RunScriptInGuest(config vmrun.RunInGuestConfig, interpreter, script string) error

RunScriptInGuest run a script in Guest OS.

func (*Fusion) SetSharedFolderState

func (f *Fusion) SetSharedFolderState(shareName, hostPath string, writable bool) error

SetSharedFolderState modify a Host-Guest shared folder.

func (*Fusion) ShutDown

func (f *Fusion) ShutDown() error

ShutDown wrap of stop command with hard.

func (*Fusion) Snapshot

func (f *Fusion) Snapshot(snapshotName string) error

Snapshot create a snapshot of a VM.

func (*Fusion) Start

func (f *Fusion) Start(gui bool) error

Start start a VM or Team.

func (*Fusion) Suspend

func (f *Fusion) Suspend(hard bool) error

Suspend Suspend a VM or Team.

func (*Fusion) Unpause

func (f *Fusion) Unpause() error

Unpause unpause a VM.

func (*Fusion) WriteVariable

func (f *Fusion) WriteVariable(mode vmrun.VariableMode, env, value string) error

WriteVariable write a variable in the VM state.

Jump to

Keyboard shortcuts

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