cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2091
Views
3
Helpful
0
Comments
tuanngu4
Cisco Employee
Cisco Employee

Summary:


One of the administrative tasks required for bringing CloudCenter to an operational state is to either create new Windows virtual machine templates or to install the CloudCenter tools onto an existing template. Regardless of the IaaS platform (AWS, GCE, OpenStack, VMware, etc) the process to prepare the operating system to be deployed by CloudCenter remains largely similar. While it is conceivable to create one master template and use vendor provided utilities to perform the import or the form factor conversion of the template, considerations must be made for vendor specific software tools and drivers and for IaaS platforms which support cloud-init and native metadata services. The goal of this document is not to outline the tasks to prepare the OS to be used as a CloudCenter “Master” image - there is already a great resource for that purpose; the goal of this document is to outline the sysprep process and the steps to uninstall and reinstall the CloudCenter tools.

Set up:


To summarize the document, these are the instructions as stated in the document:

  1. Obtain the cliqr_installer.exe installer package
  2. Provision a new Windows virtual machine or deploy one from a template
  3. Navigate the Control Panel, set “View by: Small Icons,” and select User Accounts
    1. Select Change User Account Control Settings
    2. Set the option to Never Notify by moving the slide to the bottommost position
    3. Click the OK button to save the setting
    4. Reboot the server after this configuration
      1. At the “Command Prompt” type C:Windows\System32> shutdown -r -t 0
  4. Start Windows PowerShell (CloudCenter supports at minimum PowerShell 4.0)
    1. Type PS C:\> $PSVersionTable.PSVersion
    2. If the “Major” value is not at least 4, install an updated version of PowerShell
      1. A good option to PowerShell is the Windows Management Framework
  5. While in the PowerShell environment, configure PowerShell to bypass the execution policy
    1. Type PS C:\> Set-ExecutionPolicy -ExecutionPolicy Bypass
  6. Verify that the C:\PROGRA~1 path is resolvable to C:\Program Files
    1. Type PS C:\> dir C:\PROGRA~1
    2. If the result is not a listing of the C:\Program Files directory, create the link
      1. Type PS C:\> mklink /J "C:\PROGRA~1" "C:\Program Files
  7. Perform the CloudCenter installation
    1. While in the PowerShell environment, type PS C:\Users\Administrator\Downloads> .\cliqr_installer.exe /CLOUDTYPE=vmware /CLOUDREGION=default
      1. This example suits the example of a Windows image for a VMware environment, the following are a list of the syntax options:
        1. amazon, azure, azurepack, google, openstack, opsource, softlayer, vcd, vmware
      2. Only select the IIS option if you intend to install IIS onto your “Master” image
  8. Set the CloudCenter services to start manually
    1. While in the PowerShell environment, type PS C:\> services.msc
    2. Find the CliQr Startup Service and the JettyService, enter the properties of each and set the Startup Type to Manual
    • NOTE: At next boot the OS will enter the sysprep process. If these services are set to “Automatic", they will enter into a race condition with the sysprep stream and possibly become corrupt. If they are set to “Manual” they will not conflict with sysprep. These services will be configured to start automatically during the last step of the sysprep process by the SetupComplete.cmd script. 
  9. Create a file for the unattended installation process
    1. Place the file in the C:\Windows\System32\Sysprep directory
      1. Both the name of the file and the directory are insignificant, but naming the file unattend.xml and placing it into the Sysprep folder is an acceptable practice
  10. Create a script to set the CloudCenter services to start automatically
    1. Name the file SetupComplete.cmd and place it into the C:\Windows\Setup\Scripts directory
  11. Configure the sysprep utility for next boot
    1. At the “Command Prompt” type C:Windows\System32\Sysprep> sysprep.exe /oobe /generalize /shutdown /unattend:c:\Windows\System32\Sysprep\unattend.xml

Validation:


Once the virtual machine has shutdown, do not power it on. If the VM is powered on it will complete the sysprep process - this suits the purpose of validating the completion of the unattended installation, but testing should be performed against a clone of this VM. There are different options available based on the cloud provider - 1) create a snapshot of the instance, 2) create an AMI of the instance, 3) convert the VM to become a template and deploy a VM from that template, etc. The goal is to ensure that the VM boots successfully, that there are no prompts for user input during the boot process and that the CloudCenter services are set to “Automatic” and their status is “Running.”

Uninstall:


To uninstall the CloudCenter, perform the following tasks:

  1. At the “Command Prompt” type C:Windows\System32> appwiz.cpl
  2. Select the Cliqr Installer and click Uninstall
  3. Enter the Services console and stop both CloudCenter services
  4. Enter Windows Explorer and delete the following directories:
    1. C:\opt
    2. C:\Temp
    3. C:\Program Files\osmosix

Sample files:

  • Unattend.xml for Windows Server 2008 R2


<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
            <UserData>
                <AcceptEula>true</AcceptEula>
            </UserData>
        </component>
        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SetupUILanguage>
                <UILanguage>en-US</UILanguage>
            </SetupUILanguage>
            <InputLocale>0409:00000409</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UserLocale>en-US</UserLocale>
        </component>
    </settings>   
    <settings pass="specialize">
        <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
            <Identification>
                <JoinWorkgroup>WORKGROUP</JoinWorkgroup>
            </Identification>
        </component>
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
            <RegisteredOrganization>PoV Systems</RegisteredOrganization>
            <RegisteredOwner>PoV Administrator</RegisteredOwner>
            <TimeZone>Pacific Standard Time</TimeZone>
            <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
        </component>
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>0409:00000409</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UserLocale>en-US</UserLocale>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
            <UserAccounts>
                <AdministratorPassword>
                    <Value>p@ssw0rd</Value>
                    <PlainText>true</PlainText>
                </AdministratorPassword>
                <LocalAccounts>
                    <LocalAccount wcm:action="add">
                        <Name>PoV Administrator</Name>
                        <Description>PoV Administrator</Description>
                        <DisplayName>PoV Administrator</DisplayName>
                        <Group>Administrators</Group>
                    </LocalAccount>
                </LocalAccounts>
            </UserAccounts>
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>1</ProtectYourPC>
            </OOBE>
            <RegisteredOrganization>PoV Systems</RegisteredOrganization>
            <RegisteredOwner>PoV Administrator</RegisteredOwner>
            <TimeZone>Pacific Standard Time</TimeZone>
        </component>
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>0409:00000409</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UserLocale>en-US</UserLocale>
        </component>
    </settings>
</unattend>


  • Unattend.xml for Windows Server 2012 R2 Standard (product key set as KMS compatible)

<?xml version="1.0" encoding="utf-8"?>

<unattend xmlns="urn:schemas-microsoft-com:unattend">

    <settings pass="windowsPE">

        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

            <SetupUILanguage>

                <UILanguage>en-US</UILanguage>

                <WillShowUI>Never</WillShowUI>

            </SetupUILanguage>

            <InputLocale>en-US</InputLocale>

            <SystemLocale>nl-NL</SystemLocale>

            <UILanguage>en-US</UILanguage>

            <UserLocale>nl-NL</UserLocale>

            <UILanguageFallback>en-US</UILanguageFallback>

        </component>

        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

            <UserData>

                <ProductKey>

                    <Key>D2N9P-3P6X9-2R39C-7RTCD-MDVJX</Key>

                    <WillShowUI>OnError</WillShowUI>

                </ProductKey>

                <AcceptEula>true</AcceptEula>

                <FullName>PoV Administrator</FullName>

                <Organization>PoV Systems</Organization>

            </UserData>

        </component>

    </settings>

    <settings pass="specialize">

        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

            <TimeZone>pacific standard time</TimeZone>

            <ProductKey>D2N9P-3P6X9-2R39C-7RTCD-MDVJX</ProductKey>

            <RegisteredOwner>PoV Administrator</RegisteredOwner>

            <RegisteredOrganization>PoV Systems</RegisteredOrganization>

        </component>

    </settings>

    <settings pass="oobeSystem">

        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

            <UserAccounts>

                <AdministratorPassword>

                    <Value>p@ssw0rd</Value>

                    <PlainText>true</PlainText>

                </AdministratorPassword>

            </UserAccounts>

            <RegisteredOwner>PoV Administrator</RegisteredOwner>

            <RegisteredOrganization>PoV Administrator</RegisteredOrganization>

            <TimeZone>pacific standard time</TimeZone>

            <OOBE>

                <HideEULAPage>true</HideEULAPage>

                <HideLocalAccountScreen>true</HideLocalAccountScreen>

                <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>

                <HideOnlineAccountScreens>true</HideOnlineAccountScreens>

                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>

                <NetworkLocation>Work</NetworkLocation>

                <SkipMachineOOBE>true</SkipMachineOOBE>

                <SkipUserOOBE>true</SkipUserOOBE>

            </OOBE>

        </component>

    </settings>

</unattend>

  • SetupComplete.cmd (assumes the unattend.xml file is in the C:\Windows\System32\Sysprep directory)
sc config CliQrStartupService start= auto
sc config JettyService start= auto

sc start CliQrStartupService
sc start JettyService

del /q /f C:\Windows\System32\Sysprep\Unattend.xml
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: