2

This is a vSphere 5.1. Windows 7 non-domain. All necessarily settings in guest Windows were changed to disable any auto-lock functionality. However, when I close VIClient (vSphere native client) Console session, it also lock my Windows session. When I open Console session again, I see login screen. When I kill VMware Tools, it becomes to normal. Any ideas on how to avoid that behaviour?

Dee
  • 81
  • 6

1 Answers1

2

The settings corresponds for that is tools.guest.desktop.autolock=false. This is under VM settings => Options => Advanced => General => Configuration Parameters.

In my particular case (using knife-vsphere) I was able to create cplugin:

require 'rbvmomi'

class KnifeVspherePlugin
  def reconfig_vm(target_vm)
    puts "Set ConfigSpec.GuestAutoLockEnabled = false"
    extraConfig = []
    extraConfig << { :key => "tools.guest.desktop.autolock", :value => "false" }
    target_vm.ReconfigVM_Task(:spec => RbVmomi::VIM.VirtualMachineConfigSpec(:extraConfig => extraConfig)).wait_for_completion
  end
end

Another way using PowerCLI would be:

GetVM -Name vm1 | New-AdvancedSetting -Name "tools.guest.desktop.autolock" -Value "false" -Confirm:$false -Force

Have fun!

Dee
  • 81
  • 6