For virtual machines running Windows as the guest operating system, VMware has included a component within the template processes that eliminates the need for administrators to perform tasks that force uniqueness on the virtual machine upon which the template is created. The catch is that the component must extract sysprep and its associated files to a directory on the VirtualCenter server that was created during the installation. If these files are not extracted before you deploy a virtual machine, the guest customization page of the Deploy Template Wizard will be unavailable. Figure 6.33 shows the Guest Customization page of the Deploy Template Wizard on a VirtualCenter that has not had the sysprep files extracted.</p> <img src=#i_236.png" > <p> <strong>Figure 6.31</strong>Templates should have meaningful names that describe the pristine environment provided by the template.</p> <empty-line > <img src=#i_237.png" > <p> <strong>Figure 6.32</strong>Templates can be stored in a format that supports quicker provisioning or that provides greater portability.</p> <empty-line > <p>Perform these steps to allow guest operating system customization of Windows guest operating system templates:</p> <p>1. Insert the Windows Server 2003 CD into the disk drive of the VirtualCenter server.</p> <p>2. Navigate to the ../support/tools/deploy.cab directory on the Windows Server 2003 CD.</p> <img src=#i_238.png" > <p> <strong>Figure 6.33</strong>If the sysprep files are not extracted and stored on the VirtualCenter server, you won't be able to customize the guest operating system when you deploy from a template.</p> <empty-line > <p>3. Copy the sysprep.exe and setupcl.exe files to this directory:</p> <p> <code>C:\Documents and Settings\All Users\Application Data\VMware\VMware Virtual Center\svr2003</code> </p> <p>As shown in Figure 6.34.</p> <img src=#i_239.png" > <p> <strong>Figure 6.34</strong>Customizing the Windows guest operating system requires the extraction of the sysprep.exe and setupcl.exe files to an existing directory on the VirtualCenter server.</p> <empty-line > <p>Follow these steps to deploy a virtual machine from a template:</p> <p>1. Use the VI Client to connect to a VirtualCenter server.</p> <p>2. Locate the template object to be used as the virtual machine baseline.</p> <p>3. Right-click the template object and select Deploy Virtual Machine from This Template.</p> <p>4. As shown in Figure 6.35, type a name for the new virtual machine in the Virtual Machine Name text box, select a location in the inventory to store the virtual machine, and then click Next. Click the Advanced button if you want to specify an alternate storage location for virtual machine disk files.</p> <img src=#i_240.png" > <p> <strong>Figure 6.35</strong>The virtual machine's display name is the friendly name reflected in the VirtualCenter inventory and should match the guest operating system's hostname.</p> <empty-line > <p>5. Select a host on which the virtual machine should run and then click Next.</p> <p>6. Select a datastore location for the virtual machine files, as shown in Figure 6.36.</p> <img src=#i_241.png" > <p> <strong>Figure 6.36</strong>Select a datastore for a new virtual machine based on the VMotion, DRS, and HA constraints of your organization.</p> <empty-line > <p>7. For first-time template deployments, as shown in Figure 6.37, select the Customize Using the Customization Wizard option to create a new XML-based answer file, and then click Next.</p> <img src=#i_242.png" > <p> <strong>Figure 6.37</strong>The Guest Customization Wizard allows you to create an answer file that provides zero-touch installs of a guest operating system. The answer file data is stored in the Virtual-Center database.</p> <empty-line > <p>8. Provide a name and organization to be used for virtual machines built from the customization file.</p> <p>9. For simplicity and consistency, as shown in Figure 6.37, select the Use the Virtual Machine Name option to specify that the guest operating system hostname be the same as the display name, and then click Next.</p> <p>10. Enter a valid Windows product key, configure the licensing mode, and click Next.</p> <p>11. Enter an administrator password and click Next.</p> <p>12. Enter the appropriate time zone for the new virtual machine and click Next.</p> <p>13. Enter any commands that should run one time at the end of setup and click Next.</p> <p>14. Configure the Network Interface Settings for DHCP obtained addressing (Typical) or static addressing (Custom) and then click Next.</p> <p>15. Specify the workgroup or domain membership of the new guest operating system and click Next.</p> <p>16. For mass virtual machine deployments, ensure that the Generate New Security ID (SID) checkbox is selected. Select the Delete All User Accounts checkbox as needed to clear the local security accounts manager (SAM) of the new guest operating system to allow for a change to the administrator password. Click Next.</p> <p>17. As shown in Figure 6.38, ensure the Save This Customization Specification for Later Use checkbox is selected, provide a name for the customization file, enter a description as needed, and then click Next.</p> <img src=#i_243.png" > <p> <strong>Figure 6.38</strong>Customizations can be saved for zero-touch deployments of new guest operating systems.</p> <empty-line > <p>18. Review the customization information and then click Finish.</p> <p>19. Review the template deployment information, select the Power On the New Virtual Machine After Creation option as needed, and then click Finish.</p> <cite> <div class="title">Virtual Machine Cloning</div> <p>While templates might be the most common means of deploying a new virtual machine, it is possible to clone any virtual machine in a powered-off state. The right-click menu of a powered-off virtual machine provides a Clone option that allows you to make a copy without first converting to a template. The Clone to New Virtual Machine option from the Commands list on a virtual machine summary page accomplishes the same task. The wizard that initiates this will provide similar options to the wizard you use when cloning from a template. Keep in mind that unless you customize the guest operating system, an exact copy of the original virtual machine will be made. This could be especially useful when you're looking to create a test environment that mirrors a live production environment. </p> </cite> <div class="title"> <p>The Bottom Line </p> </div> <p>While company policy should ultimately drive virtual machine creation, there are best practices that can be followed to ensure performance and ease management. Virtual machines should always start as single virtual CPU systems with a minimum of two hard drives for separating the operating system from the user data.</p> <p> <strong>Install a guest operating system. </strong>Installing a guest operating system on a set of virtual machine hardware is similar to an installation on physical hardware and requires the same licensing considerations.</p> <p> <strong>Install the VMware Tools. </strong>The VMware Tools provide valuable additions to virtual machines and, although they are not installed by default, they should not be treated as an optional component.
Читать дальше
Конец ознакомительного отрывка
Купить книгу