Topic
  • 1 reply
  • Latest Post - ‏2012-09-26T14:22:37Z by SystemAdmin
SystemAdmin
SystemAdmin
3 Posts

Pinned topic ISDM provisioning issue with Windows 2008 Server R2

‏2012-08-15T23:32:48Z |
Hi all,
Hope you can help me. Firstly, I'm a newbie to ISDM and TSAM/TPM.

ISDM Version is v7.2.2

ISDM is fully installed with Virtual Centre Discovery and Image template discovery successful. I'm using the PMRDPCAUSR account on the Self-Service GUI.

I am trying to provision a Windows 2008 R2 virtual machine to a VMWare infrastructure. I thought this would be much easier than its turning out to be :-). The provisioning gets so far then fails with the following error (which i've now been looking at for 3 days):

execution-log workflow-name="RP$ClusterProvision" id="47100" date="Aug 14, 2012 4:06:25 PM" position="37602" call-stack-level="0" log-text="Error during Cluster.Addserver: COPCOM123E A shell command error occurred: Exit code=-1, Error stream="The account already exists. More help is available by typing NET HELPMSG 2224. ", Output stream="". <tpm_returncode>-1</tpm_returncode> <tpm_returnerrorstring>The account already exists. More help is available by typing NET HELPMSG 2224. </tpm_returnerrorstring> <tpm_returnresult></tpm_returnresult>" />
- <execution-log workflow-name="Get_DCM_Property" id="47101" date="Aug 14, 2012 4:06:25 PM" position="37603" call-stack-level="1" log-text="Start workflow: &apos;Get_DCM_Property&apos;">

The Windows template which is used has been configured as per the documentation with cygwin pre-installed. I can see the VM provisioning occur within virtual centre. The customization is applied successfully and the vm is powered up. I can see that the SSH service is successfully installed by TPM (I quickly look at the windows services and net users of the newly provisioned system) but the failure occurs soon after and the vm is powered down and deleted. I think that the error is being generated by the script "cloud_cygwin_ssh_config.sh" but can't explain why this is failure is occuring? The error is being returned by the Cluster.AddServer workflow so it may not be this script that is causing this issue but i'm at a loss where else to look? It seems to me that TPM is trying to set up SSH a second time? I've tested manually running the script within cygwin and do see the "Account already exists" error. As a test, I modified the script slightly to remove the sshd windows account and was able to past the error. The script execution in cygwin reported the command completed successfully.

I then tested another VM provision using the self service GUI. I recieved the same error COPCOM123E, but this time the error was as follows:

Cluster.Addserver: COPCOM123E A shell command error occurred: Exit code=-1, Error stream="", Output stream="The command completed successfully. The command completed successfully.". <tpm_returncode>-1</tpm_returncode>

I'm attaching the full export of the ClusterProvision report. Really stuck on this one and i'm sure i'm probably missing something basic but i can't see it? Are there any other log files that i can check on the TSAM server which may contain more information? Really appreciate any input anyone may have.

Thanks in advance,
P
Updated on 2012-09-26T14:22:37Z at 2012-09-26T14:22:37Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    3 Posts

    Re: ISDM provisioning issue with Windows 2008 Server R2

    ‏2012-09-26T14:22:37Z  
    Hi,

    I have same problem with winsrv2003 R2 SP2 also. May be it happens due to new version of cygwin utilities.

    Root cause
    Provisioning mechanism clones new virtual machine and make some customizations. After that it installs cygwin using 'sysprep' utility on deploying Windows virtual machine to be able to run other management scripts and operations through SSH.

    Sysprep utility starts 'postAfterInstall.bat' script, which makes following actions:
    * install cygwin (for 2003 only, for 2008 it can be preinstalled)
    * reconfigure sshd service, using "cloud_cygwin_ssh_config.sh" script.
    * start sshd
    When it reconfigures sshd service it creates user 'sshd'.

    Then provisioning mechanism uses workflow Cloud_Windows_Reconfigure_SSHD_Service to configure SSH with new generated password.
    It runs "cloud_cygwin_ssh_config.sh" also, but this script can not handle recreation of users. See funny comments from this script:
    
    #TODO. Handle 
    
    if the user already exists #Create user 
    
    if [ 
    "${USER}" != 
    "SYSTEM" ]; then net user $
    {USER
    } 
    "${PASSWORD}" /add 
    "/homedir:c:\\cygwin\\var\\empty" /yes
    


    Workaround
    You can use my patched script "cloud_cygwin_ssh_config.sh" instead of default script.
    It checks if users already exist, then just changes passwords, but does not recreate users.

    Solution
    It solves this issue, but then I run into the problem when sshd process crashes.
    I set a sleep between SSHD reconfiguration and starting of SSHD services - and problem goes off.