builder/vmware: Path related fixes in esx5 driver
- Fix mkdir of packer_cache in ESX5Driver.UploadISO - Fix vmx path in ESX5Driver.IsRunning
This commit is contained in:
parent
9e333e03db
commit
2503f8a4ba
|
@ -42,7 +42,7 @@ func (d *ESX5Driver) CreateDisk(diskPathLocal string, size string, typeId string
|
|||
}
|
||||
|
||||
func (d *ESX5Driver) IsRunning(vmxPathLocal string) (bool, error) {
|
||||
vmxPath := d.datastorePath(vmxPathLocal)
|
||||
vmxPath := filepath.Join(d.outputDir, filepath.Base(vmxPathLocal))
|
||||
state, err := d.run(nil, "vim-cmd", "vmsvc/power.getstate", vmxPath)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
@ -84,11 +84,11 @@ func (d *ESX5Driver) UploadISO(localPath string) (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
if err := d.mkdir(filepath.Dir(targetFile)); err != nil {
|
||||
finalPath := d.datastorePath(targetFile)
|
||||
if err := d.mkdir(filepath.Dir(finalPath)); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
finalPath := d.datastorePath(targetFile)
|
||||
if err := d.upload(finalPath, localPath); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue