From 25c3deda838b4a7757759236229d9a1028dc1d06 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Mon, 31 Aug 2020 05:31:28 -0400 Subject: [PATCH] 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. --- cmd/osbuild-image-tests/vmwaretest/vmware.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/osbuild-image-tests/vmwaretest/vmware.go b/cmd/osbuild-image-tests/vmwaretest/vmware.go index 1ebd0f471..945f76427 100644 --- a/cmd/osbuild-image-tests/vmwaretest/vmware.go +++ b/cmd/osbuild-image-tests/vmwaretest/vmware.go @@ -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),