tests: Use -pool when importing vmdk & booting a VM. Fixes #953
explicitly specify the cluster and the default resource pool when importing b/c the import process creates a temporary VM, which requires a ResourcePool to provision. Same thing when provisioning a VM.
This commit is contained in:
parent
d5ddcbc921
commit
25c3deda83
1 changed files with 2 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ func ImportImage(creds *AuthOptions, imagePath, imageName string) error {
|
|||
"import.vmdk",
|
||||
fmt.Sprintf("-u=%s:%s@%s", creds.Username, creds.Password, creds.Host),
|
||||
"-k=true",
|
||||
fmt.Sprintf("-pool=%s/Resources", creds.Cluster),
|
||||
fmt.Sprintf("-dc=%s", creds.Datacenter),
|
||||
fmt.Sprintf("-ds=%s", creds.Datastore),
|
||||
imagePath,
|
||||
|
|
@ -142,6 +143,7 @@ func WithBootedImage(creds *AuthOptions, imagePath, imageName, publicKey string,
|
|||
"vm.create",
|
||||
fmt.Sprintf("-u=%s:%s@%s", creds.Username, creds.Password, creds.Host),
|
||||
"-k=true",
|
||||
fmt.Sprintf("-pool=%s/Resources", creds.Cluster),
|
||||
fmt.Sprintf("-dc=%s", creds.Datacenter),
|
||||
fmt.Sprintf("-ds=%s", creds.Datastore),
|
||||
fmt.Sprintf("-folder=%s", creds.Folder),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue