VMware {code} Community
DaveP
Commander
Commander
Jump to solution

Modifying built-in VNC server configuration

I am experimenting with some code where I want to switch on the VNC server inside Workstation 7.1.2 via the VIX API by writing to runtime configuration variables. At the moment just using vmrun to do this but does not seem to work. So the commands being used are:

vmrun writeVariable runtimeConfig RemoteDisplay.vnc.port 5900

Reading these back via the readVariable command shows that they have been set correctly. However then using VNC viewer to connect to the localhost:5900 port fails. By contrast if I enable it in the running guest via the Settings dialog I am able to successfully connect to the guest via VNC.

Is this a bug, wrong commands or just not supported?

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Hi DaveP,

I think this is going to fall under "not supported" for now.

I believe the VNC server component of the process running the virtual machine reads these configuration values only when the process starts up (so when you power on or resume the virtual machine) and then configures itself appropriately. It will not change its state based on these being set through vmrun (the values are basically just being put into an in-memory database; there is nothing there to tell the component re-check the values once you make these calls).

Basically, the VNC server cannot be configured (or enabled or disabled) at runtime. You will have to power off the virtual machine, edit the configuration file, and then power it back on.

OK, that last paragraph isn't really true, since you can configure it at runtime through the UI. But, it is true then it comes to vmrun or VIX. So, the main answer is the same: "not supported".

Message was edited by: mattrich

View solution in original post

0 Kudos
2 Replies
admin
Immortal
Immortal
Jump to solution

Hi DaveP,

I think this is going to fall under "not supported" for now.

I believe the VNC server component of the process running the virtual machine reads these configuration values only when the process starts up (so when you power on or resume the virtual machine) and then configures itself appropriately. It will not change its state based on these being set through vmrun (the values are basically just being put into an in-memory database; there is nothing there to tell the component re-check the values once you make these calls).

Basically, the VNC server cannot be configured (or enabled or disabled) at runtime. You will have to power off the virtual machine, edit the configuration file, and then power it back on.

OK, that last paragraph isn't really true, since you can configure it at runtime through the UI. But, it is true then it comes to vmrun or VIX. So, the main answer is the same: "not supported".

Message was edited by: mattrich

0 Kudos
DaveP
Commander
Commander
Jump to solution

Suspected as much. Thanks for confirming it. As a follow-up are there any settings in the runtime configuration that do affect the guest?

0 Kudos