Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeVMX(contents map[string]string) string
- func ParseVMX(contents string) map[string]string
- func WriteVMX(path string, data map[string]string) (err error)
- type Artifact
- type Builder
- type DHCPLeaseGuestLookup
- type Driver
- type Fusion5Driver
- func (d *Fusion5Driver) CreateDisk(output string, size string) error
- func (d *Fusion5Driver) IsRunning(vmxPath string) (bool, error)
- func (d *Fusion5Driver) Start(vmxPath string) error
- func (d *Fusion5Driver) Stop(vmxPath string) error
- func (d *Fusion5Driver) ToolsIsoPath(k string) string
- func (d *Fusion5Driver) Verify() error
- type GuestIPFinder
- type HostIPFinder
- type IfconfigIPFinder
Constants ¶
const BuilderId = "mitchellh.vmware"
const DefaultVMXTemplate = `` /* 2131-byte string literal not displayed */
This is the default VMX template used if no other template is given. This is hardcoded here. If you wish to use a custom template please do so by specifying in the builder configuration.
const KeyLeftShift uint32 = 0xFFE1
Variables ¶
var KeepFileExtensions = []string{".nvram", ".vmdk", ".vmsd", ".vmx", ".vmxf"}
These are the extensions of files that are important for the function of a VMware virtual machine. Any other file is discarded as part of the build.
Functions ¶
Types ¶
type Artifact ¶
type Artifact struct {
// contains filtered or unexported fields
}
Artifact is the result of running the VMware builder, namely a set of files associated with the resulting machine.
type DHCPLeaseGuestLookup ¶
type DHCPLeaseGuestLookup struct { // Device that the guest is connected to. Device string // MAC address of the guest. MACAddress string }
DHCPLeaseGuestLookup looks up the IP address of a guest using DHCP lease information from the VMware network devices.
func (*DHCPLeaseGuestLookup) GuestIP ¶
func (f *DHCPLeaseGuestLookup) GuestIP() (string, error)
type Driver ¶
type Driver interface { // CreateDisk creates a virtual disk with the given size. CreateDisk(string, string) error // Checks if the VMX file at the given path is running. IsRunning(string) (bool, error) // Start starts a VM specified by the path to the VMX given. Start(string) error // Stop stops a VM specified by the path to the VMX given. Stop(string) error // Get the path to the VMware ISO for the given flavor. ToolsIsoPath(string) string // Verify checks to make sure that this driver should function // properly. This should check that all the files it will use // appear to exist and so on. If everything is okay, this doesn't // return an error. Otherwise, this returns an error. Verify() error }
A driver is able to talk to VMware, control virtual machines, etc.
type Fusion5Driver ¶
type Fusion5Driver struct { // This is the path to the "VMware Fusion.app" AppPath string }
Fusion5Driver is a driver that can run VMWare Fusion 5.
func (*Fusion5Driver) CreateDisk ¶
func (d *Fusion5Driver) CreateDisk(output string, size string) error
func (*Fusion5Driver) Start ¶
func (d *Fusion5Driver) Start(vmxPath string) error
func (*Fusion5Driver) Stop ¶
func (d *Fusion5Driver) Stop(vmxPath string) error
func (*Fusion5Driver) ToolsIsoPath ¶ added in v0.1.3
func (d *Fusion5Driver) ToolsIsoPath(k string) string
func (*Fusion5Driver) Verify ¶
func (d *Fusion5Driver) Verify() error
type GuestIPFinder ¶
Interface to help find the IP address of a running virtual machine.
type HostIPFinder ¶
Interface to help find the host IP that is available from within the VMware virtual machines.
type IfconfigIPFinder ¶
type IfconfigIPFinder struct {
Device string
}
IfconfigIPFinder finds the host IP based on the output of `ifconfig`.
func (*IfconfigIPFinder) HostIP ¶
func (f *IfconfigIPFinder) HostIP() (string, error)
Source Files ¶
- artifact.go
- builder.go
- driver.go
- guest_ip.go
- host_ip.go
- step_clean_files.go
- step_configure_vnc.go
- step_create_disk.go
- step_create_vmx.go
- step_download_iso.go
- step_http_server.go
- step_prepare_output_dir.go
- step_prepare_tools.go
- step_provision.go
- step_run.go
- step_shutdown.go
- step_type_boot_command.go
- step_upload_tools.go
- step_wait_for_ssh.go
- vmx.go