Guide to setting up a private cloud using VMware vCloud Director Introduction: The goal of this guide is to help you setup a private cloud computing environment using a product by VMware called, vCloud Director. vCloud uses virtualization to allow easy setup and expandability of the cloud. vCloud is a recent product developed by VMware and is becoming more popular. The goal of this lab is to give you some hands on experience with several VMware products, but more specifically, vCloud and ESXi server. For simplicity reason and the lack of enough powerful equipment, this entire guide can be completed on a single machine running VMware Workstation. For those who aren’t familiar with VMware Workstation, it is a virtual machine software suite developed my VMware. The software allows you to setup multiple virtual computers and to use one or more of these virtual machines simultaneously with the hosting operating system. VMware Workstation can run virtually any modern operating system. For the purposes of this lab, we will be installing Microsoft Server 2008, CentOS, and ESXi Server. Section 1 of this guide will go over the process of installing the host operating system, installation of VMware Workstation and then the setup of the four virtual machines. Section 2 of this guide will go over the process of installing and setting up HvDC. Section 3 of this guide will go over the process of installing and setting up HvCenter. Section 4 of this guide will go over the process of installing and setting up RedWood01(CentOS). Section 5 of this guide will go over the process of installing and setting up HvESX01(ESXi Server). Lab Overview: As you can see in the diagram below, the host opering system will be running Windows Server 2008 with VMware Workstation 7 installed. As stated above, we will be using four VMs. Referring to the diagram below, HvDC will be running Server 2008, Active Directory(AD) and DNS. HvCenter will be running Server 2008, vCenter 4.1 Server, and Oracle 11G. Redwood01 will be running CentOS, VMware vCloud Director. HvESX01 will be running ESXi Server. In addition to the four base VMs, there will also be nested VM on HvESX01. Refer to the diagram below for more information. Figure 1 Requirements for completing this guide: VMware vCloud Director – [200MB] vShield Manager – [500MB] CentOS 64bit DVD ISO – [3.9GB] Oracle 11G 64bit Enterprise – [2.1GB] Java Development Kit – [78MB] vSphere 4.1 Enterprise-Plus (vCenter & ESXi) – [2.5GB] VMware Workstation 7.1 – [568MB] After Downloading all the above burn the CentOS and ESXi to separate discs for installation. Note – CentOS is 8 cd’s Please download all the above before starting this lab. You will need to apply with each different organization for trials licenses to download their product. To use the Itec server provided by Dr. Lee you must have the Sever 2008 preloaded onto you team machine to start this lab because the mapping from your computers cd drive through the VMware has a few problems. Otherwise Skip this step and install VMware Workstation 7.1 on your home computer. Section 1 – Installing the Host OS(Server 2008) The process of installing Server 2008 is very similar to the installation process that you followed in the ITEC 350 lab. Listed below is the overall process of installing Server 2008. Please download all the above before starting this lab. You will need to apply with each different organization for trials licenses to download their product. To use the Itec server provided by Dr. Lee you must have the Sever 2008 preloaded onto you team machine to start this lab because the mapping from your computers cd drive through the VMware has a few problems. Otherwise Skip this step and install VMware Workstation 7.1 on your home computer. Place the Windows Server 2008 DVD in the DVD drive. You should see a prompt instructing you to press any key to boot from the DVD. Press a key. Note: If you don’t see this prompt, then you will have to change the boot order in the BIOS. Press Next at the Language window Press Install now button Select Windows Server 2008 R2 Enterprise (Full Installation) and press Next. Accept the terms and press Next. Select the Custom (advanced) installation option. Press Drive options (advanced) Remove any previous partitions and create five partitions; one for the host OS, and each base VM. Divide the partitions evenly. Press Next The system will reboot a couple of time during the installation. You will eventually be prompted to change you password. Press OK to change the password. Set it to Radford24142 The next step is to activate windows. A window called Initial Configuration Tasks will be displayed after you change your password. Follow the setups below to activate windows. Press Active Windows link. Type in the product key located on the sleeve that the DVD was in. Click Next. Recommended: Install all available Microsoft Windows updates. You can access Windows Update from the control panel. Section 1.1 – Installing VMware Workstation on the host OS. The following setups below will guide you through the installation and setup of VMware Workstation. Note - VMware Workstation 7.1 must be used. Any later version has removed the team environment Start the setup by launching the latest 64bit version. Press Next when the wizard launches Select Typical and press Next Press Next at the shortcuts window Press Continue to begin the installation process Enter you Serial Number if you have one or press Skip Press Restart Now Section 1.2 – Configuring WMware Workstation In this section, I will go over how to create a “Team” of virtual machines. The term “Team” is used to describe a group of virtual machines. Our “Team” will be consisting of four VM. You can refer to Figure 1 for more information. The following steps will guide you through the process of setting up a “Team consisting of four VMs. Launch VMware Workstation. You will be prompted to accept the licensing agreement, select I Agree and press Okay. Press New Team. Press Next when the wizard launches Give the team a name -> Cloud Press Next Press the drop-down arrow next to add and select New Virtual Machine Select Typical and press Next Select “I will install this operating system later” and press Next. Select “Microsoft Windows” and then set the version to Windows Server 2008 R2 x64 and then press Next Name this machine HvDC Change the location to one of the partitions that you created earlier and then press Next Leave the defaults and press Next at “Specify Disk Capacity” window. Press Finish You will be returned to the Team Wizard, press Add and select New Virtual Machine. Select Typical and press Next Select “I will install this operating system later” and press Next. Select “Microsoft Windows” and then set the version to Windows Server 2008 R2 x64 and then press Next Name this machine HvCenter Change the location to one of the partitions that you created earlier and then press Next Set the disk capacity to 80GB and press Next Select Customize Hardware and set the memory to 4GB if on the network server otherwise 1GB for personal computers. Press Finish You will be returned to the Team Wizard, press Add and select New Virtual Machine. Select Typical and press Next Select “I will install this operating system later” and press Next. Select “Linux” and then set the version to CentOS x64 and then press Next Name this machine Redwood01 Change the location to one of the partitions that you created earlier and then press Next Leave the defaults and press Next at “Specify Disk Capacity” window. Select Customize Hardware and set the memory to 1GB, and add a second NIC by selecting pressing Add and then selecting Network adapter Finish. Press Okay Press Finish You will be returned to the Team Wizard, press Add and select New Virtual Machine. Select Typical and press Next Select “I will install this operating system later” and press Next. Select “VMware ESX” and then set the version to ESX Server 4.0 and then press Next Name this machine HvESX01 Change the location to one of the partitions that you created earlier and then press Next Leave the defaults and press Next at “Specify Disk Capacity” window. Select Customize Hardware and set the memory to 6GB if on the network server otherwise 1GB for personal computers. Press Finish You will be returned to the Team Wizard, press Next Press Next at the Lan Segment window Press Finish Your new “Team” named Cloud should now appear under Favorites on the left hand side in the Sidebar. Your VMware Workstation should be very similar to Figure 1.2. Figure 1.2 – The team Cloud has been created with four VMs In this section, I will guide you through the process of installing the VM and setting up all of the necessary components on HvDC. HvDC will act as the Domain Controller and the DNS server for the lab. Section 2.1 – Installing the VM In this section, I will guide you through the process of installing the OS on HvDC. We will be installing Windows Server 2008 R2 64Bit Enterprise. The process of installing the OS is simpler and faster than the installation process that I used to install the Host operating system. Open VMware Workstation and select the team you just created Cloud Verify that you have the OS disk in the driver and then power on HvDC. Right-Click HvDC from Virtual Machines and LAN Segments and press Power ON – It may take the system up to 30sec to recognize the disk. Select English for Language to install Select English(United States) for Time and currency format Select US for input method then press Next. Press Install Now Select Windows Server 2008 Enterprise R2 Sever Enterprise with Service Pack 1 and press next. Accept EULA and press Next. Select Custom Installation and then press Next. The install should take around 30min Click ok Set password to Radford123 Install all available Microsoft Windows updates. Configure IP address. i.e. 192.168.164.12 Section 2.2 – Configuring HvDC Section 2.2.1 – Setting up Domain Controller/AD Open Server Manager Select Roles from the column on the left. Press Add Role Press Next Tick Active Directory Domain Services. Press Add Selected Features if prompted. Press Next Read the information provided and press Next. Press Install Press Close Select Roles Active Directory Domain Services. Select Run the Active Directory Domain Services Installation Wizard. Press Next Read over the information and press Next. Select Create a new domain in a new forest and press Next. Enter a domain name. i.e. “Cloud.local” and press Next. Press Next Press Next Tick the option to install DNS Press Next Accept the defaults and press Next. Enter a restore mode password – Radford123 and press next. Press Next Press Finish and then reboot the machine. Section 2.2.3 – Setting up DNS This section covers adding the DNS entries to the Forward Lookup Zones for the domain that was just created. I’m assuming that you selected to install DNS during the DC setup in the previous section. Open DNS management under administrative tools. Start Menu -> Control Panel -> Administrative Tools –> DNS. Expand WIN-FL 13R3SOFAR by clicking on the ‘+’ Expand forward lookup zones by clicking on the ‘+’ Right click on the Zones (domain name) _msdcs.Cloud.local and click on new host (A or AAAA). Type in the name of the record. i.e. HvCenter, HvDC, ESX01, etc… then select Add Host Type in the IP address that you assigned or will assign to the machine. Remember to add an entry for all four machines. Section 3 – Setting up HvCenter In this section, I will guide you through the process of installing the OS on HvCenter. We will be installing Windows Server 2008 R2 64Bit Enterprise. The process of installing the OS is simpler and faster than the installation process that I used to install the Host operating system. The OS installation is identical to the OS installation in section 2. Open VMware Workstation and select the team you just created Cloud Verify that you have the OS disk in the driver and then power on HvCenter . Right-Click HvCenter from Virtual Machines and LAN Segments and press Power ON – It may take the system up to 30sec to recognize the disk. Select English and then press Next. Press Install Now Select Windows Server 2008 Enterprise R2 (Full Installation) and press next. Accept EULA and press Next. Select Custom Installation and then press Next. Set password to Radford24142 Install all available Microsoft Windows updates. Configure IP address. i.e. 192.168.164.11 Join to the domain that you just created. Section 3.1 – Installing Oracle Oracle is a very popular enterprise database system that is available. I have chosen to use it for this project because several of the applications and systems that we will be setting up will need to have a database backend. Oracle is free to download and use for personal use. For this task, just download the latest version of Oracle and extract the contents of the two zip files to a directory on HvCenter. The following steps goes over the process of installing and configuring Oracle. Note – Oracle 11g comes in two zip files. You must take the components from the second file and put them in the component file of the first for a successful installation. You start the setup by executing Setup.exe Check the Create Starter Database Set the global database name to “Cloud” and press Next. Input new Password Radford123 and press Next After Prerequisite Checks hit Next Oracle Configuration Manager is not needed hit Next Press install Press next after installation Enter your email address and press Next. Select the option to Create and Configure a Database and press Next. Select Server Class and press Next. Select Single Instance Database Installation and press Next. Select Advance Install and press Next Press Next at the Language options screen. Select Enterprise Edition and press Next. Accept the defaults for the storage directories and press Next. Select General Purpose and press Next. Accept the defaults for the memory configuration and press Next. Accept the defaults and press Next. Accept the defaults and press Next. Accept the defaults and press Next. Tick the option to use the same password for all accounts. Set the password to Radford24142 and press Next. Review the configuration screen and then press Exit Press Close when the installation has been completed. – This step may take a significant time to complete. Section 3.1.1 – Configuring Oracle This section is going to go over how to setup a user account that will be used for this project. The username will be cloud and the password will be Radford24142 Also note that you will have to be logged in as administrator or a user account that has administrative privileges. Login as administrator and open a command window. You will login to the database cloud using the credentials that you setup in the previous section. sqlplus system/Radford24142@localhost/cloud The next command creates a new user by the name of cloud and assigns a password to that user. The password is Radford24142 create user cloud identified by Radford24142; The next command grants or allows the user that we just created access to the database. grant "RESOURCE", "DBA", "CONNECT" to cloud; Section 3.2 – Installing VMware vSphere Server This section will go over the installation process of VMware vCenter Server and Client. Launch the VMware vCenter Installer Select vCenter Server Press OK Press Next Press Next Accept the EULA and press Next. Enter your license key and press Next. Press Next Press Next Press Next Select Standalone Setup and press Next. WRITE DOWN ALL OF THE PORT NUMBERS and then press Next. Select Small and then press Next. Press Install Reboot the machine when the installation has completed. The next step is to install the vCenter Client. This can be accomplished by running the VMware vCenter Installer and then selecting vCenter Client. Remember to reboot the machine upon completion of the installation of the client. Section 4 – Installing and setting up HvESX01 Server The steps listed below go over the process of setting up ESXi Server in a virtualized environment. On the host operating system, open VMware workstation and open the setting for HvESX01. Select CD/DVD from the column on the left. Select Use ISO Image and then specify the image file for ESXi that you should have already downloaded. Press OK Power on HvESX01. Select Install ESX in Graphical Mode and press Enter. Press Next Accept the EULA and press Next. Select English and press Next. Press Next at the custom drivers screen. Press Yes Press Next Enter your serial number and press Next. Press Next at the interface screen. Select Static IP address and then test the configuration. Select Standard Setup and press Next. Press Next Press OK Select your time zone and press Next. Set the date and press Next. Set the root password to Radford24142 Also add an additional user: cloud/Radford24142 Press Next to start the installation process. Reboot You should now be able to access the web-based UI from either HvDC or HvCenter using the IP address that you specified during the installation process. Section 5 – Creating a cluster and adding hosts This section will cover how to setup a new cluster and how to add virtual hosts to the cluster. This task needs to be completed using the vCenter Client that was installed in section 3. Open the vCenter Client on HvCenter. The hostname should be localhost:443 Login with username of admin and a password of Radford24142 Right click on New Datacenter located in the left column Select Rename, set the name to myDatacenter Right click on myDatacenter and select New Cluster Set the name to myCluster Press Next. Press Next. Press Next. Press Finish. Select the name of the cluster you just created from the column on the left. Select Add a Host – We are adding HvESX01. Enter the IP address of HvESX01 Enter the root password – this should be root/Radford24142 Select yes to confirm the certificate. Press Next. Press Next and then Finish You are now ready to create and import virtual machines into you cluster. Section 6 – Installing and Configuring Security using VMware vShield. This section will go over the process of setting up vShield as a virtualized app running on the cloud. To complete this task, you need to be logged into vCenter Server using the client that was installed in section 3. Once you are logged in select Deploy OVF Template from the File menu. Select the vShield Manager OVA file that you should have already downloaded. Press Next. Review the information and press Next. Accept the EULA and press Next. Accept the default name and select myDatacenter and then press Next. Press Next. Press Finish. The default username and password is admin and default respectfully. Execute the command enable and enter the password: “default” The above command puts you into a more privileged mode. This is similar to the process on Cisco routers and switches. Execute the command setup to start the configuration process. Enter the IP address: i.e. 192.168.164.20 Enter the Subnet mask: i.e. 255.255.255.0 Enter the address of the gateway: i.e. 192.168.164.2 Enter the DNS address: Address of HvDC: i.e. 192.168.164.12 Skip the second DNS address <press return> Enter you domain name when prompted for Domain name search list. i.e. cloud.local Save the settings. Login to enable mode and execute the command reboot to restart vShield manager. You can now access vShield using the IP address of the machine. i.e. 192.168.164.20. Section 7.a - Installing CentOS If need be delete the current Redwood1 and click on VM-> Add new Virtual Mechine. Click on installer disc Then Click Next Enter Name Username and password ( keep note of the password for further use) Click Next Rename Virtual Mechine to Redwood1 Click Next Click Next Click Finish Right Click on Redwood1 from the VMwork Station and power on the Virtual Machine This will cause the Linux Machine to begin installing the CentOS operating system. Keep watch on the progress, it will prompt you to insert all 8 discs at different times to install properly. Section 7.b – Installing and configuring VMware Cloud Director on CentOS. This section will go over the process of installing VMware Cloud Director on CentOS(Redwood01). The first part will go over the creation of the security certificates and the second part will go over the installation of VMware Cloud Director. Section 7.1 – Creating the security certificates. I will use the Java SDK for the creation of the certificates. I will be doing this on a windows machine that has the latest version of the Java SDK installed. Open a Command Window. Execute: keytool -keystore c:\certificates.ks -storetype JCEKS –storepass Radford24142 -genkey -keyalg RSA -alias http Execute: keytool -keystore c:\certificates.ks -storetype JCEKS –storepass Radford24142 -genkey -keyalg RSA -alias consoleproxy You should now have a file on the root of the C drive called certificates.ks. Section 7.2 Installing VMware Cloud Director Before we begin the installation, we need to get the VMware Cloud Director BIN file and the certificates that we just created over to Redwood01. We are going to accomplish this taks using the Shared Folder feature in VMware Workstation. To enable shared folders, follow the instructions below. If Redwood01 is running, then shut it down. Open the setting window for Redwood01 in VMware Workstation. Click on the Options tab. Select Shared Folders Select the Always Enabled option from the options on the right. We are now going to add the folder that contains our certificates and bin files. I created a fold on the root of the C drive named Data and then copied everything I need to C:\data Click Add to start the process of adding a shared folder. Press Next. The Host Path is the directory that you want to share. i.e. C:\Data Finally, Specify a name for the shared folder. i.e. Data Press Next. Press Finish Press OK We now need to install VMware Tools on Redwood. To this right click on Redwood01 in VMware Workstation and select Install VMware tools. We are now ready to begin the installation process. The setup below will guide you through the installation process of VMware Cloud Director. Remember to power Redwood back on before starting the installation process. The shared folder will be located at /mnt/hgfs in CentOS. My data folder was located at /mnt/hgfs/Data. I then copied over the certificates and the bin file to a directory located at /tmp/VCD. VCD is the name of the directory that I created. Logon to Redwood01 and open a terminal window Change to the directory that your certerficates and bin files are located. i.e. cd /tmp/VCD Login as root before continuing. SU root <return> then enter password. Ignore the warning message and press Y to continue. NOTE: You my get an error message stating that the setup will not continue because you are missing compat-libcom_err wasn’t found. If this happens, then open Add/Remove Software from the applications menu. Click the open to search and type in compat-libcom_err. Select the 64Bit version and press Apply. Execute ./vmware-cloud-director-1.0.0-285979.bin to start the setup. Select Yes, when prompted to run the script. Select the first network interface. i.e. 192.168.164.133 Type in the path for the certificates. i.e.. /tmp/VCD/certificate.ks Enter the Key Store Password. i.e. Radford24142 Press return to skip the logging options. Enter the ip address of the oracle server. i.e 192.168.164.11 Accept the default port of 1521. Type in the name of the database. i.e. cloud Type in the username: cloud Password: Radford24142 Note: you my have to disable the firewall on the machine that oracle is running on in order to get it to connect. Will be continued… References http://www.hypervizor.com/2010/09/video-guide-taking-vmware-vcloud-director-for-a-spin-and-on-the-go/