I'm looking for a way to change the Guest OS from the command line, since I can't access the GUI from a particular machine.
I couldn't find a way through vim-cmd, but I might have overlooked something. In this particular case I would like to change the Guest OS from Windows 8 to Windows Server 2016.
Do you want change guest OS within virtual machine or guest OS on configuration?
Both are possible via different way but you need to unattended installation if you want to change guest OS within virtual machine.
This Windows machine should be Windows Server 2016, when I power it down I can't access VMWare any longer from the GUI. I can connect a monitor/keyboard to the machine and make changes from the CLI. Is it possible to change this from within the CLI and change it? I hope it could be as easy as upgrading the VM compatibility (vim-cmd vmsvc/upgrade {VMID} vmx-{HW-version}).
I think that you can not upgrade hardware compatibility when virtual machine is powered-on and also may be you can't change OS version on settings.
If you can not power-off VM, so leave the settings without any change. You select Windows!.
Please consider that HW version is not related to OS family and version.
Using putty and winscp ....
1. power off VM
2. unregister VM with esxcli / putty
3. edit vmx with embedded editor of winscp
4. register VM again with esxcli / putty
5. start VM
Ulli