Summary
Just got another bug, an error message:
esxi-native:index:VirtualMachine (photonos-01):
warning: One or more imported inputs failed to validate. This is almost certainly a bug in the `esxi-native` provider. The import will still proceed, but you will need to edit the generated code after copying it into your program.
warning: esxi-native:index:VirtualMachine resource 'photonos-01': property esxi-native:index:VirtualMachine.os value {<nil>} has a problem: The property 'os' is invalid! The value should be from here: https://github.com/josenk/vagrant-vmware-esxi/wiki/VMware-ESXi-6.5-guestOS-types
The problem is the following function in validation.go
// validateVirtualMachineOsType checks if the OS type is valid.
func validateVirtualMachineOsType(os string) bool {
// All valid Guest OS's
allGuestOSs := [...]string{
... skipped ...
"vmwarephoton",
... skipped ...
}
os = fmt.Sprintf("%s\n", strings.ToLower(os))
for i := 0; i < len(allGuestOSs); i++ {
if strings.Contains(os, allGuestOSs[i]) {
return true
}
}
return false
}
Since it is an exisiting VM, the VM that is up and running, the actual OS type is vmware-photon-64, not vmwarephoton, therefore string.Contains can't find a match and returns false.
Diagnostics
What version of the provider are you running?
The plugin version is 1.0.0
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
Summary
Just got another bug, an error message:
The problem is the following function in
validation.goSince it is an exisiting VM, the VM that is up and running, the actual OS type is
vmware-photon-64, notvmwarephoton, thereforestring.Containscan't find a match and returnsfalse.Diagnostics
What version of the provider are you running?
The plugin version is 1.0.0
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.