vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.31k stars 911 forks source link

guest_id.go needs to be updated #3140

Closed Alvis-pixel closed 1 year ago

Alvis-pixel commented 1 year ago

We need more modern guest OS IDs like VirtualMachineGuestOsIdentifierWindows2019srv_64Guest.

github-actions[bot] commented 1 year ago

Howdy 🖐   Alvis-pixel ! 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.

Alvis-pixel commented 1 year ago

I thought this would resolve missing guest IDs, but when I try the following command:

"govc vm.change -g windows2019srv_64Guest -vm DC0_H0_VM0"

I still get the result:

"govc: *types.InvalidArgument"

Using guest ids that was present earlier works.

dougm commented 1 year ago

-g windows2019srv_64Guest works for me using your change:

% govc about | grep govmomi
FullName:     VMware vCenter Server 6.5.0 build-5973321 (govmomi simulator)

% govc vm.option.info -vm DC0_H0_VM0 | grep 2019
windows2019srv_64Guest      
windows2019srvNext_64Guest  

% govc object.collect -s vm/DC0_H0_VM0 config.guestId
otherGuest

% govc vm.change -trace -g windows2019srv_64Guest -vm DC0_H0_VM0

% govc object.collect -s vm/DC0_H0_VM0 config.guestId
windows2019srv_64Guest
Alvis-pixel commented 1 year ago

Ok, I see where I was misstaken now. I'll have to wait for the new version, my docker image installs the latest go modules;

"go install github.com/vmware/govmomi/vcsim@latest"