Open jhg03a opened 2 months ago
Howdy 🖐 jhg03a ! Thank you for your interest in this project. We value your feedback and will respond soon.
If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION
guidelines.
Hmm, is there a doc that says you can use extraConfig to set these? I think we need to flags to set in the spec like so:
govc vm.change -vm $vm -ft-encryption-mode ftEncryptionRequired -migrate-encryption required
Can open a PR later, but patch below if you want to try it out.
diff --git a/govc/vm/change.go b/govc/vm/change.go
index a5a73b53..9bccb3fc 100644
--- a/govc/vm/change.go
+++ b/govc/vm/change.go
@@ -174,6 +174,9 @@ func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) {
f.Var(flags.NewOptionalBool(&cmd.Flags.VvtdEnabled), "iommu-enabled", "Enable IOMMU")
f.StringVar(&cmd.hwUpgradePolicy, "scheduled-hw-upgrade-policy", "", fmt.Sprintf("Schedule hardware upgrade policy (%s)", strings.Join(hwUpgradePolicies, "|")))
+
+ f.StringVar(&cmd.FtEncryptionMode, "ft-encryption-mode", "", "Encrypted fault tolerance mode")
+ f.StringVar(&cmd.MigrateEncryption, "migrate-encryption", "", "Encrypted vMotion mode")
}
func (cmd *change) Description() string {
It's when you set them via extraconfig as you should be able to do, that there's no change but also a success message. You can see in the example above I also set a Foo key in the same transaction and it's fine.
I'm new to the govmomi project, but unless the go bindings are trying to go way beyond what the normal vSphere SOAP bindings do, "extraConfig" isn't where you set anything that has formal properties.
The documentation states: "Configuration keys that would conflict with parameters that are explicitly configurable through other fields in the ConfigSpec object are silently ignored."
Describe the bug When attempting to set ftcpt.ftEncryptionMode or migrate.encryptionMode in VM extra config on vSphere 8.0U3, the modify task says it completed successfully, but those properties are missing if you query the extra config immediately afterwards. Other made up properties can be set fine.
To Reproduce Steps to reproduce the behavior:
govc vm.change -vm=/'DC West'/vm/vm.test.net -e ftcpt.ftEncryptionMode="ftEncryptionRequired" -e migrate.encryptionMode="required" -e foo="bar"
govc vm.info -e /'DC West'/vm/vm.test.net
Expected behavior I expect to either have those configs set ideally or an error thrown if it's not possible to set them
Affected version govc installed via brew on osx at latest available (0.38.0)
Screenshots/Debug Output
Additional context These properties are settable via PowerCLI as follows:
Separately I also noticed that it seems govc cannot deploy and OVF with these properties set as well which would have been ideal.