Documentation ¶
Index ¶
- Constants
- func NewDriver(config *config) (vmwcommon.Driver, error)
- type Artifact
- type Builder
- type ESX5Driver
- func (d *ESX5Driver) Clone(dst, src string) error
- func (d *ESX5Driver) CompactDisk(diskPathLocal string) error
- func (d *ESX5Driver) CreateDisk(diskPathLocal string, size string, typeId string) error
- func (d *ESX5Driver) DhcpLeasesPath(string) string
- func (d *ESX5Driver) DirExists() (bool, error)
- func (d *ESX5Driver) HostIP() (string, error)
- func (d *ESX5Driver) IsRunning(vmxPathLocal string) (bool, error)
- func (d *ESX5Driver) ListFiles() ([]string, error)
- func (d *ESX5Driver) MkdirAll() error
- func (d *ESX5Driver) Register(vmxPathLocal string) error
- func (d *ESX5Driver) Remove(path string) error
- func (d *ESX5Driver) RemoveAll() error
- func (d *ESX5Driver) SSHAddress(state multistep.StateBag) (string, error)
- func (d *ESX5Driver) SetOutputDir(path string)
- func (d *ESX5Driver) Start(vmxPathLocal string, headless bool) error
- func (d *ESX5Driver) Stop(vmxPathLocal string) error
- func (d *ESX5Driver) String() string
- func (d *ESX5Driver) SuppressMessages(vmxPath string) error
- func (d *ESX5Driver) ToolsIsoPath(string) string
- func (d *ESX5Driver) Unregister(vmxPathLocal string) error
- func (d *ESX5Driver) UploadISO(localPath string) (string, error)
- func (d *ESX5Driver) VNCAddress(portMin, portMax uint) (string, uint)
- func (d *ESX5Driver) Verify() error
- type HostIPFinder
- type IfconfigIPFinder
- type OutputDir
- type RemoteDriver
- type RemoteDriverMock
- type StepRegister
- type VMnetNatConfIPFinder
- type VNCAddressFinder
Constants ¶
const BuilderIdESX = "mitchellh.vmware-esx"
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 ¶
This section is empty.
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 ESX5Driver ¶
type ESX5Driver struct { Host string Port uint Username string Password string Datastore string // contains filtered or unexported fields }
ESX5 driver talks to an ESXi5 hypervisor remotely over SSH to build virtual machines. This driver can only manage one machine at a time.
func (*ESX5Driver) Clone ¶
func (d *ESX5Driver) Clone(dst, src string) error
func (*ESX5Driver) CompactDisk ¶
func (d *ESX5Driver) CompactDisk(diskPathLocal string) error
func (*ESX5Driver) CreateDisk ¶
func (d *ESX5Driver) CreateDisk(diskPathLocal string, size string, typeId string) error
func (*ESX5Driver) DhcpLeasesPath ¶
func (d *ESX5Driver) DhcpLeasesPath(string) string
func (*ESX5Driver) DirExists ¶
func (d *ESX5Driver) DirExists() (bool, error)
func (*ESX5Driver) HostIP ¶
func (d *ESX5Driver) HostIP() (string, error)
func (*ESX5Driver) ListFiles ¶
func (d *ESX5Driver) ListFiles() ([]string, error)
func (*ESX5Driver) MkdirAll ¶
func (d *ESX5Driver) MkdirAll() error
func (*ESX5Driver) Register ¶
func (d *ESX5Driver) Register(vmxPathLocal string) error
func (*ESX5Driver) Remove ¶
func (d *ESX5Driver) Remove(path string) error
func (*ESX5Driver) RemoveAll ¶
func (d *ESX5Driver) RemoveAll() error
func (*ESX5Driver) SSHAddress ¶
func (d *ESX5Driver) SSHAddress(state multistep.StateBag) (string, error)
func (*ESX5Driver) SetOutputDir ¶
func (d *ESX5Driver) SetOutputDir(path string)
func (*ESX5Driver) Stop ¶
func (d *ESX5Driver) Stop(vmxPathLocal string) error
func (*ESX5Driver) String ¶ added in v0.5.1
func (d *ESX5Driver) String() string
func (*ESX5Driver) SuppressMessages ¶
func (d *ESX5Driver) SuppressMessages(vmxPath string) error
func (*ESX5Driver) ToolsIsoPath ¶
func (d *ESX5Driver) ToolsIsoPath(string) string
func (*ESX5Driver) Unregister ¶
func (d *ESX5Driver) Unregister(vmxPathLocal string) error
func (*ESX5Driver) VNCAddress ¶
func (d *ESX5Driver) VNCAddress(portMin, portMax uint) (string, uint)
func (*ESX5Driver) Verify ¶
func (d *ESX5Driver) Verify() error
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)
type OutputDir ¶
type OutputDir interface { DirExists() (bool, error) ListFiles() ([]string, error) MkdirAll() error Remove(string) error RemoveAll() error SetOutputDir(string) }
OutputDir is an interface type that abstracts the creation and handling of the output directory for VMware-based products. The abstraction is made so that the output directory can be properly made on remote (ESXi) based VMware products as well as local.
type RemoteDriver ¶
type RemoteDriver interface { vmwcommon.Driver // UploadISO uploads a local ISO to the remote side and returns the // new path that should be used in the VMX along with an error if it // exists. UploadISO(string) (string, error) // Adds a VM to inventory specified by the path to the VMX given. Register(string) error // Removes a VM from inventory specified by the path to the VMX given. Unregister(string) error }
type RemoteDriverMock ¶
type RemoteDriverMock struct { vmwcommon.DriverMock UploadISOCalled bool UploadISOPath string UploadISOResult string UploadISOErr error RegisterCalled bool RegisterPath string RegisterErr error UnregisterCalled bool UnregisterPath string UnregisterErr error }
func (*RemoteDriverMock) Register ¶
func (d *RemoteDriverMock) Register(path string) error
func (*RemoteDriverMock) Unregister ¶
func (d *RemoteDriverMock) Unregister(path string) error
type StepRegister ¶
type StepRegister struct {
// contains filtered or unexported fields
}
func (*StepRegister) Cleanup ¶
func (s *StepRegister) Cleanup(state multistep.StateBag)
func (*StepRegister) Run ¶
func (s *StepRegister) Run(state multistep.StateBag) multistep.StepAction
type VMnetNatConfIPFinder ¶
type VMnetNatConfIPFinder struct{}
VMnetNatConfIPFinder finds the IP address of the host machine by retrieving the IP from the vmnetnat.conf. This isn't a full proof technique but so far it has not failed.
func (*VMnetNatConfIPFinder) HostIP ¶
func (*VMnetNatConfIPFinder) HostIP() (string, error)
Source Files ¶
- artifact.go
- builder.go
- driver.go
- driver_esx5.go
- host_ip.go
- host_ip_ifconfig.go
- host_ip_vmnetnatconf.go
- output_dir.go
- remote_driver.go
- remote_driver_mock.go
- step_configure_vnc.go
- step_create_disk.go
- step_create_vmx.go
- step_http_server.go
- step_prepare_tools.go
- step_register.go
- step_remote_upload.go
- step_type_boot_command.go
- step_upload_tools.go