PowerCLI

 View Only
  • 1.  VM guestos windows new password lockout

    Posted Oct 11, 2013 05:42 PM

    I am currently working on a series of scripts that creates vm's from a csv file and then configure a number of options and setting all from a single source csv file.

    The problem i am having is that when you create a VM from template or cloning the guest os (windows server 2008R2 and 2003 in this case) locks out and will not allow a log in till the password  is changed.

    This causes a major hiccup as most of my scripts depend on invokevmscript and when they try to log in with credentials they bounce back with incorrect credentials error.

    If I manually log in and change the password to the exact same password, then all the scripts will run fine.

    I have the problem narrowed down but i can't see a solution other than not using OScustomizationspec in the creation which is not an option for our production environment.

    Possible ideas I have had include applying the OScustomizationspec after the scripts, or having a change password script run before the rest of the scripts but I haven't been able to develop anything like that.

    Any help, tips or trick appreciated!



  • 2.  RE: VM guestos windows new password lockout

    Posted Oct 11, 2013 06:39 PM

    Do you mean that the account is locked ?

    Or that the credentials do not work ?



  • 3.  RE: VM guestos windows new password lockout

    Posted Oct 11, 2013 09:39 PM

    After VM Creation, I launched the console and am met by the warning "The User's password must be changed before logging on the first time"

    After clicking okay I am prompted to change the password and given no other options.

    When a script tries to run powercli returns guest os credentials could not be authorized type return.

    My thinking is the invokeVM script is hitting the same password change wall I am.

    This problem only happens when i use a OScustomizationSpec that was pre-existing during the powercli Vm creation.

    The same problem happens when i do it manually.

    Thanks for the help again lucD!



  • 4.  RE: VM guestos windows new password lockout

    Posted Oct 12, 2013 08:52 AM

    I suspect that in your template, from which you clone, the password was entered with the option "User needs to change the password at the next logon".

    Can you check, and change ?



  • 5.  RE: VM guestos windows new password lockout
    Best Answer

    Posted Oct 15, 2013 06:39 PM

    It turns out when you first create the VM's you need to let them sit for about 60-90 seconds after first start-up, Then they apply the guestOS customizationSpec after which login works fine.

    Just add a 120sec sleep timer to the script from first start to configuration.