Sei sulla pagina 1di 12

VMware vSphere 5.

0: Install, Configure, Manage Lab Addendum Lab 9: Using Templates and Clones
Document Version: 2011-11-30

Please note that the sequence of the lab addenda differs slightly from the sequence of the VMware vSphere Install, Configure, Manage 5.0 labs. This is necessary in order to provide compatibility with NETLAB+. The labs should be performed in the order of the lab addenda.

Copyright Network Development Group, Inc. www.netdevgroup.com NETLAB Academy Edition, NETLAB Professional Edition, and NETLAB+ are registered trademarks of Network Development Group, Inc. VMware is a registered trademark of VMware, Inc. Cisco, IOS, Cisco IOS, Networking Academy, CCNA, and CCNP are registered trademarks of Cisco Systems, Inc.

Lab 9 Using Templates and Clones

www.netdevgroup.com

1 Introduction ................................................................................................................ 3 2 Objective: Deploy a virtual machine from a template and clone a virtual machine .. 3 3 Pod Topology .............................................................................................................. 4 Task 1 Create a template................................................................................................. 5 Task 2 Copy Sysprep files to the vCenter Server appliance ............................................ 7 Task 3 Create Customization Specifications .................................................................... 9 Task 4 Deploy a virtual machine from a template ........................................................ 10 Task 5 Clone a virtual machine that is powered on ...................................................... 11

11/30/2011

Page 2 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

Introduction

This addendum provides detailed guidance on performing Lab 10, Using Templates and Clones of the VMware vSphere 5.0 Install, Configure, Manage course, using a NETLAB+ system.

Objective: Deploy a virtual machine from a template and clone a virtual machine

In this lab, you will be using the vclient machine to complete your objectives. You will be performing the following tasks: 1. 2. 3. 4. 5. Create a template. Copy Sysprep files to the vCenter Server appliance. Create Customization Specifications Deploy a virtual machine from a template. Clone a virtual machine that is powered on.

11/30/2011

Page 3 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

Pod Topology

11/30/2011

Page 4 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

Task 1

Create a template

In this task, you will create a template by cloning a virtual machine to a template. 1. Click on the vclient graphic in the topology to launch the virtual machine. 2. Double-click the vSphere Client icon. 3. At the vSphere Client login screen, set host name as vcenter-1, then enter the username root and the password, vmware. Click Login. 4. Using the navigation bar, go to the VMs and Templates inventory view.

5. Expand your LabVMs folder. In this folder, you have a virtual machine named <your_name>-1 (i.e. John-1). Verify this VM is powered off. 6. Right-click the virtual machine and select Template > Clone to Template. The Clone Virtual Machine to Template Wizard appears.

7. On the Name and Location page, set the Template Name to your first name followed by the word Template (i.e. JohnTemplate). Set the Template Inventory Location to Training. Click Next. 8. On the Host/Cluster page, select your ESXi host. 9. On the Datastore page, make sure Same format as source is visible in the Select a virtual disk format dropdown box.

11/30/2011

Page 5 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

10. On the Datastore page, select VMFS-1 from the list of available datastores. Click Next. 11. On the Ready to Complete page, click Finish. 12. Monitor the progress of the cloning task in the Recent Tasks pane at the bottom of the vSphere Client.

13. When the clone-to-template operation is finished, notice how the icon of the template differs from a virtual machine icon.

14. Right-click the Training datacenter and select New Folder. 15. Name the new folder TemplateVMs. 16. Drag the <your name>Template to the TemplateVMs folder.

11/30/2011

Page 6 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

Task 2

Copy Sysprep files to the vCenter Server appliance

In this task, you will configure guest operating system customization on your vCenter Server system. 1. The Windows Sysprep CAB file is located on the desktop and is named DEPLOY.CAB. 2. Right-click the Windows sysprep CAB file DEPLOY.CAB and select Open. 3. Highlight all of the files, right-click on the highlighted files, and click Extract. Note: Some of the files in the image below may or may not be present.

4. 5. 6. 7.

Highlight the Desktop entry and click the Make New Folder button. Name the folder Sysprep and click Extract. Close the DEPLOY.CAB folder. Double-click the WinSCP icon on the desktop.

8. Enter the following information in the dialog boxes: a. Host name: vcenter b. User name: root c. Password: vmware 9. Click Login. 10. When presented with a security warning window, click Yes. 11. Click Continue on the Authentication Banner window. 12. Within the WinSCP interface, you will see two drop down boxes. The dropdown box on the left is for the host machine. Change the dropdown box to Desktop and double-click the Sysprep folder. 13. The dropdown box on the right is for the vCenter Server appliance. Change the dropdown box to /<root>. 14. Double-click the etc folder.
11/30/2011 Page 7 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

15. Double-click the vmware-vpx folder. 16. Double-click the sysprep folder. 17. Double-click the appropriate folder representing the operating system that you installed on your <your name>-1 VM. 18. In the left pane, select all of the sysprep files, drag them to the right pane, and click Copy when the Copy dialog box opens. 19. When the copy operation completes, click F10 Quit at the bottom of the window and OK to close the WinSCP application.

11/30/2011

Page 8 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

Task 3

Create Customization Specifications

In this task, you will create a customization specification for template deployment. 1. In the vSphere Client, click Home in the address bar and select Customization Specifications Manager under the Management subheading. 2. Click New in the upper left corner. 3. Verify that the Target Virtual Machine OS is listed as Windows. 4. In the Name text box, type <your-name>-CustomSpec (i.e. John-CustomSpec). 5. Click Next. 6. Enter VMware Student as the Name and VMware as the organization. Click Next. 7. Choose the radio button next to Use the virtual machine name on the NetBIOS Name window and click Next. 8. Enter the product key and click Next. Please refer to your instructor for information regarding the product key. Depending on the operating system being used, it may be possible to continue without a product key. However, this will cause you to be prompted for the key during the customization process and will require you to skip entering the key in order to continue. 9. Leave the Administrator account passwords blank and click Next. 10. When the warning window opens, click Yes. 11. Select your time zone and click Next. 12. In the Run Once window leave the default and click Next. 13. In the Network window leave the default and click Next. 14. In the Workgroup or Domain window leave the default and click Next. 15. In the Operating System Options window leave the default and click Next. 16. Review the information in the Ready to Complete window and click Finish. 17. The <your-name>-CustomSpec should appear in the window. 18. Click on Home in the address bar and select VMs and Templates under the Inventory subheading.

11/30/2011

Page 9 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

Task 4

Deploy a virtual machine from a template

In this task, you deploy a virtual machine from your template and allow vCenter Server to customize the guest operating system. 1. Right-click <your-name>Template and select Deploy Virtual Machine from this Template. The Deploy Template wizard appears. 2. On the Name and Location page, set the name to your first name, followed by -2 (i.e. John-2). Under Inventory Location, select the LabVMs folder. Click Next. 3. On the Host/Cluster page, select your ESXi host. Click Next. 4. On the Storage page, verify that Same format as source is displayed in the Select a virtual disk format dropdown box. 5. On the Storage page, select VMFS-1 as the destination for the virtual machine files. Click Next. 6. On the Guest Customization page, select the check box next to Power on this virtual machine after creation. 7. On the Guest Customization page, select Customize using an existing customization specification. 8. Select <your-name>-CustomSpec and click Next. 9. Click Finish. 10. Repeat steps 1-9 to create <your_name>-3 (i.e. John-3). 11. In the Recent Tasks pane at the bottom of the vSphere Client, monitor the progress of the cloning and customization. 12. When the task completes, open a virtual machine console to your new virtual machine. 13. Verify that the virtual machine was created properly. a. The virtual machine booted up successfully. Wait at least two minutes for Sysprep to complete its tasks, which includes a reboot of the system. You may have to send the Ctrl+Alt+del command before the restart will begin. b. You can log in to the guest operating system as Administrator with no password. You might get a prompt for an unexpected shutdown due to the nature of how the template was created. Choose an appropriate option and continue. c. VMware Tools is installed with time synchronization configured. d. The cpubusy.vbs file is on the desktop.

14. Close the virtual machine consoles. 15. Shut down the <your name>-2 VM. 16. The only powered on VM should be <your_name>-3 (i.e. John-3) for the next task.
11/30/2011 Page 10 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

Task 5

Clone a virtual machine that is powered on

In this task, you will clone a running virtual machine. 1. In the LabVMs folder, right-click the <your_name>-3 (i.e. John-3) virtual machine and select Clone. The Clone Virtual Machine wizard appears.

2. On the Name and Location page, set the Name to your HotClone-1. Under Inventory Location, select LabVMs. Click Next. 3. On the Host/Cluster page, select your ESXi host and click Next. 4. On the Datastore page, select VMFS-1 and click Next. 5. On the Disk Format page, leave the default setting and click Next. 6. On the Guest Customization page, select the check box next to Power on this virtual machine after creation. 7. On the Guest Customization page, select Customize using an existing customization specification. 8. Select <your-name>-CustomSpec and click Next.

11/30/2011

Page 11 of 12

Lab 9 Using Templates and Clones

www.netdevgroup.com

9. On the Ready to Complete page click Finish. 10. Monitor the task in the Recent Tasks pane. The task may take a few minutes to complete. If this is the last lab you are completing during this lab reservation, it is important to manually shutdown your esxi-1 virtual machine. Click on the esxi-1 VM in the topology, press F12 to Shutdown/Restart, enter the root password, and press F2 to Shutdown. Wait until vCenter acknowledges the host has been shutdown. The host will gray out and be listed as not responding. You may now end the lab reservation. Note: In a real vSphere deployment, you would not power down your ESXi servers after making configuration changes. In the NETLAB+ environment, all virtual machines are powered off at the end of every reservation to conserve resources. NETLAB+ is unable to gracefully shutdown the ESXi server VMs like the other VMs. Performing a manual shutdown of the ESXi servers will prevent a non-graceful shutdown, which may cause configuration errors during the next lab reservation. 11. Exit the vSphere Client. 12. Close the vclient window.

11/30/2011

Page 12 of 12

Potrebbero piacerti anche