vcp lab

download vcp lab

of 67

Transcript of vcp lab

  • 7/28/2019 vcp lab

    1/67

    Building the Ultimate vSphere Lab Part 1: The Story

    In my search of the ultimate affordable Lab setup for VMware VCAP/VCP/ exams, i wentthrough a lot of possible set ups.

    In the end, i started to build a powerful desktop pc in which i intend to virtualize my vSphereenvironment. The reasons that made me chose a desktop PC running Windows 7 with VMwareWorkstation 8 to do this:

    - Everybody has a pc. So why not buy a lightning fast pc which makes your daily application workat light speed (email/surfing/office tasks) and gives you a perfect lab!

    - While i enjoy playing around with servers, i dont like them at home they are loud, theygenerate heat similar to a woodstove, they consume electricity like hell and they are always in theway of things Plus you have to interconnect them using 5000 miles of cable. Bottom line: menot like!

    - Every VMware Admin knows the benefits of virtualization So why not virtualize your lab? Itmakes it very flexible (play with # NICs, snapshots, clones, ).

    - Since quite some people are already VCP, you can finally put some good use to that VMwareWorkstation license you got

    - Its very easy to suspend all your work (suspend all the VMs aka your whole vSphereenvironment), shutdown your pc, go to sleep/work/kids/fun and continue the day after. Noelectricity wasted, no annoying noises,

    - Since a lot of vSphere features originally were introduced in VMware Workstation, its alwaysnice to play around with it.

    - With the coming of VMware Workstation 8, you can finally expose VT-x to the VMs, making itpossible to run x86 & x64 VMs on your virtual vSphere environment. This includes VDR, vShield,

    - Finally, its cheaper that a hardware setup (maybe not as powerful in terms of performance but itwill only host a Lab environment so no big deal for me).

    So that are my reasons to go for a virtual Lab setup. On the next post, Ill discuss the hardware youneed for this desktop pc

    Building the Ultimate vSphere Lab Part 2: The Hardware

    Several factors are important to make a powerful desktop pc able to host all the VMs we will need:

    CPUYou need a CPU with at least 4 cores. Its nice to have Hyperthreading as it will give you morelogical CPUs and more vCPUs to hand out to the VMs.

    Secondly, you need Virtualization Technology features enabled on the CPU.

  • 7/28/2019 vcp lab

    2/67

    Lets start by looking at Intel.

    Intel

    Intel Core i3 systems are no use since they only have 2 cores and no VT-x support. Update: assomeone pointed out in the comments section: recent Core i3 do have VT-x support! So if you can

    live with the 2 cores limit, Core i3 is a valid option!

    Intel Core i5 is good if you are on a budget. Pick a CPU with 4 cores (some i5 CPUs only have 2cores). You wont have HyperThreading as thats only available on the i7.

    The Core i7 CPU systems are best suitable for our setup. Make sure you have 4 cores(someeditions only have 2). Hyperthreading is enabled by default on Core i7 so thats a good thing. Youneed to have Intel VT-x features as well but to my knowledge, all Core i7 CPUs come with thosefeatures.

    AMD

    Im not following ADM brands but basically the same things apply. At least 4 cores, and AMD-V/RVI support. To my knowledge, all Athlon 2, Phenom 2 and FX CPUs have those. The newestFX series are nice looking and affordable.

    MotherboardA stable and decent motherboard is what counts here. If you want all kinds of fancy features and

    bling bling, you can easily spend 500 $ on a motherboard. As there are tons of brands and models,let me list the most important things:

    - Pick a CPU Socket that matches your CPU (i know, it sound silly but it would be a shame if your

    expensive cpu doesnt fit in that small socket )

    - Make sure you have at least 4 memorybanks.

    - Onboard Video is nice if you dont play games.

    Thats it besides the usual stuff (SATA, USB, ATX format, )

    MemoryYou will need 16 GB at minimum! Using 4 GB DIMMs (affordable, 8 GB DIMMs are tooexpensive) you will need 4 memory banks in your Motherboard. If you have 6 banks, you can gofor 24 GB easily.

    Memory speed matters, but look at the price. Amount of memory is more important than speed.Better go for 24 GB slower memory than 16 GB of faster memory.

    Hard DiskYou need at minimum one decent SSD of 40 GB minimum. I have an Intel X-25 SSD, but any fast

    SSD will do. Buy one of the latest generations since the evolve pretty fast when it boils down toperformance. Personally, i prefer Intel. The bigger the SSD, the more VMs you can store on SSDand the faster they will respond. 120 GB is affordable these days.

  • 7/28/2019 vcp lab

    3/67

    We will use VMware Workstation technologies (Linked Clones) to put multiple VMs on only 10 to20 GB of SSD storage, so you dont really need that much storage but then again, the more the

    better isnt it?

    You will also need a big traditional Hard Disk for other storage (ISO files, less used VMs, ).Any SATA 3.5 HDD will do. Look for 500 GB or more.

    OthersThe other components (Case, DVD, ) are not that important. Pick whatever suits you best.

    Install the system with Windows 7 64-bit (because of the high amount of memory, you will need64-bit OS). Linux should do as well, but i use Windows at home so Ill focus on that one.

    On the next post, we will look at the Installation of VMware Workstation and its configuration.

    Building the Ultimate vSphere Lab Part 3: VMware

    Workstation 8Once we have our desktop installed with Windows 7 x64, its time to install VMware Workstation 8.

    Download the latest binaries from VMware website and start the setup:

    Pick a Typical installation.

    The default installation location is fine as it is.

    I recommend to check for product updates on each startup.

    http://boerlowie.files.wordpress.com/2011/12/image1.pnghttp://boerlowie.files.wordpress.com/2011/12/image.png
  • 7/28/2019 vcp lab

    4/67

    If youre in a generous mood and willing to help VMware, tick the check box

    Continue the installation finish it.

    When the installation is finished, start VMware Workstation with Administrative Privileges(Right-click and select Run as administrator).

    ClickHelp Enter License Key to unlock VMware Workstation.

    Lets start by Configuring VMware Workstation by opening Edit Preferences

    http://boerlowie.files.wordpress.com/2011/12/image4.pnghttp://boerlowie.files.wordpress.com/2011/12/image3.pnghttp://boerlowie.files.wordpress.com/2011/12/image2.png
  • 7/28/2019 vcp lab

    5/67

    The first option we will change is the Default location for Virtual Machines.

    Create a Folder VM on your SSD drive and on the HDD drive. The default location will point tothe HDD drive. This way, all VMs are placed on HDD (where we have plenty of space) and onlyour precious VMs will be placed on SSD manually.

    My HDD is E: and my SSD is C: (I only have 1 80GB SSD which has my OS installed as well.This leaves me about 25 GB free for VMs on the SSD).

    Next click the Updates item in the inventory window and click the Download All ComponentsNow button. This will download all VMware Tools versions. This can be skipped but VMwareWorkstation will prompt you to download this on the first OS installation of each type. As i find

    that quite annoying, I prefer to download them all at once in advance.

    http://boerlowie.files.wordpress.com/2011/12/image6.pnghttp://boerlowie.files.wordpress.com/2011/12/image5.png
  • 7/28/2019 vcp lab

    6/67

    Next, click the Memory item. Change the memory slider until you have a little bit more that 2 GBleft for the OS. (my Windows 7 with the default things running like AV consumes 2.04 GB). Ifyour OS has not enough RAM available, it will start swapping and performance degrades. (puttingyou SWAP file on the SSD will partially boost performance but still, not an ideal solution).

    ClickOKto save the preferences.

    Now its time to set up ourVirtual Networking environment. Open the Virtual Network Editor.

    Basically, you have three options for a network:

    - Bridged: The VM will get an IP analog to your desktop PC. Required if the VM need internetaccess or access to other devices in your home network (NAS, )

    - NAT: VMware Workstation will act as a router. Not really needed for our setup.

    - Host-only: Compare this to an Internal switch on vSphere. VMs can communicate with eachother, but not to the outside world.

    Some networks are created by default.

    http://boerlowie.files.wordpress.com/2011/12/image9.pnghttp://boerlowie.files.wordpress.com/2011/12/image8.pnghttp://boerlowie.files.wordpress.com/2011/12/image7.png
  • 7/28/2019 vcp lab

    7/67

    The default VMnet0 network will be used temporary to set up the first VMs so well need that.

    Next, well create a new Internal network for our LAN communication (vSphere hosts, vCenter,SQL, ). Hit the Add Network button to create one:

    PickVMnet2

    The network must be Host-Only. Deselect the options Connect a host virtual adapter to thisnetworkand Use local DHCP service to distribute IP address to VMs .

    Change the Subnet IP to 10.0.0.0 with a subnet mask of255.0.0.0. This will give us quite some IPsto play with.

    We will create additional iSCSI/NFS network later on, but this will do for now.

    So this will give us two Virtual Networks to use: VMnet0 (with Internet connectivity) and VMnet2(Internal network only).

    http://boerlowie.files.wordpress.com/2011/12/image10.pnghttp://boerlowie.files.wordpress.com/2011/12/image13.pnghttp://boerlowie.files.wordpress.com/2011/12/image12.pnghttp://boerlowie.files.wordpress.com/2011/12/image11.pnghttp://boerlowie.files.wordpress.com/2011/12/image10.png
  • 7/28/2019 vcp lab

    8/67

    ClickOKto save these settings.

    Thats it for this post! Next, we will start creating our Infrastructure VMs (DC, SQL, vCenter, )

    Building the Ultimate vSphere Lab: Part 4 Base Template

    Now its time to start building our Virtual Infrastructure services. This will consist of a bunch of

    VMs hosting Active Directory, SQL Server, vCenter, So were talking about 3 to 5 VMs here.

    We will use Windows 2008 R2 as the base OS for these VMs. We will be using Linked Clonestechnology of VMware Workstation to put those VMs in the smallest space possible.

    To make it a short story, well install one Base VM with Windows 2008 R2 including all thepatches/service packs. Then, we will create a linked clone for each of our VMs. This linked clonecontains only the differences between the Base VM and the linked clone. In most cases, this is lessthan 5 GB per VM.

    So lets start for the Base VM. ClickCreate a New Virtual Machine to create your first VM.

    PickCustom (advanced).

    The Hardware Compatibility must be Workstation 8.0 (default).

    http://boerlowie.files.wordpress.com/2011/12/image16.pnghttp://boerlowie.files.wordpress.com/2011/12/image15.pnghttp://boerlowie.files.wordpress.com/2011/12/image14.png
  • 7/28/2019 vcp lab

    9/67

    Select I will install the operation system later.

    PickWindows Server 2008 R2 x64 as the OS Type.

    http://boerlowie.files.wordpress.com/2011/12/image18.pnghttp://boerlowie.files.wordpress.com/2011/12/image17.png
  • 7/28/2019 vcp lab

    10/67

    Name it Windows2008R2_Base and store it under the VM folder on yourSSD drive. DO NOTSTORE IT ON YOUR HDD!!! This Base VM will get A LOT of Read IO. If you put it on your

    HDD, smoke will probably arise from it

    Since my SSD is the C: drive, I store it under C:\VM

    One CPU/Core will be sufficient.

    http://boerlowie.files.wordpress.com/2011/12/image20.pnghttp://boerlowie.files.wordpress.com/2011/12/image19.png
  • 7/28/2019 vcp lab

    11/67

    Memory size of1024 MB.

    Set the Network Type to Do not use a network connection.

    http://boerlowie.files.wordpress.com/2011/12/image22.pnghttp://boerlowie.files.wordpress.com/2011/12/image21.png
  • 7/28/2019 vcp lab

    12/67

    LSI Logic SAS Controller.

    Create a new virtual disk.

    http://boerlowie.files.wordpress.com/2011/12/image24.pnghttp://boerlowie.files.wordpress.com/2011/12/image23.png
  • 7/28/2019 vcp lab

    13/67

    Type is SCSI.

    Select Store virtual disk as a single file. These days everybody uses NTFS on Windows 7 so there

    are no issues with big files.40 GB disk size is fine. They are thin provisioned (since we do not select theAllocate all disk

    space now) so only used space will be allocated.

    http://boerlowie.files.wordpress.com/2011/12/image26.pnghttp://boerlowie.files.wordpress.com/2011/12/image25.png
  • 7/28/2019 vcp lab

    14/67

    Accept the default Disk File.

    ClickFinish to create the VM.

    It will appear in your VMware Workstation console now.

    http://boerlowie.files.wordpress.com/2011/12/image28.pnghttp://boerlowie.files.wordpress.com/2011/12/image27.png
  • 7/28/2019 vcp lab

    15/67

    Edit the virtual machine settings.First, remove the Floppy, USB Controller, Sound Card & Printer devices. We wont need themand they only consume unnecessary resources.

    Next, click the Add button and add a Network Adapter.

    Select Custom VMnet0 as the network connection. This will give the VM internet access.

    http://boerlowie.files.wordpress.com/2011/12/image31.pnghttp://boerlowie.files.wordpress.com/2011/12/image30.pnghttp://boerlowie.files.wordpress.com/2011/12/image29.png
  • 7/28/2019 vcp lab

    16/67

    Click the CD-DVD (IDE) drive and attach the Windows 2008 R2 ISO file to it. This ISO file isbest stored on the HDD as you need it only once.

    ClickPower on this virtual machine.

    If you get a warning about your Memory Configuration, just tickDo not show this message againand continue.

    The VM will boot from DVD and the installation of Windows begins. Pick the correct regionalsettings and install it.

    Every Full Installation edition of Windows besides Web Server will do. Since i will run a trialedition, i use the Datacenter edition Not that we will be using any of those features, but it just

    shows up nice

    http://boerlowie.files.wordpress.com/2011/12/image33.pnghttp://boerlowie.files.wordpress.com/2011/12/image32.png
  • 7/28/2019 vcp lab

    17/67

    Pick a Custom Installation and install it on the 40 GB drive. Now is a good time to look at thefiles in the VM directory on your desktop. The VMDKfile which actually contains all the data willgrow now as data is been copied from the ISO to the VM.

    After installation, about 7 GB will be consumed. Nice.

    Back to the VM, change the password to something strong (capital letters + small letters +number). We will reuse this password for all accounts. After all its only a lab so no sensitiveinformation will be found, but we need to have a password since blanks are not accepted.

    http://boerlowie.files.wordpress.com/2011/12/image36.pnghttp://boerlowie.files.wordpress.com/2011/12/image35.pnghttp://boerlowie.files.wordpress.com/2011/12/image34.png
  • 7/28/2019 vcp lab

    18/67

    Your mousepointer will be choppy, so lets solve that first.

    First, we start by installing VMware Tools on it (VM Install VMware Tools).

    An AutoPlay popup will appear in the VM. ClickRun setup64.exe and perform a TypicalInstallation. Reboot the VM.

    Performance of the VM is okay now, as well as the graphics performance.

    Before updating the VM, we will install .NET Framework first. Open Server Manager and clickthe Features item. Click the Add Features link.

    Select the .NET Framework 3.5.1 Features item.

    Some additional roles need to be installed. Do so by clicking Add Required Role Services.

    http://boerlowie.files.wordpress.com/2011/12/image39.pnghttp://boerlowie.files.wordpress.com/2011/12/image38.pnghttp://boerlowie.files.wordpress.com/2011/12/image37.png
  • 7/28/2019 vcp lab

    19/67

    ClickNext, Next, Install to install it.

    Next, we will turn on Windows Update to bring the VM up-to-date. You can go ahead and installall the updates, but its easier to apply the latest service pack first. Download it from the Microsoftwebsite and then apply all Windows Updates patches afterwards.

    TIP: Disable IE ESC in Server Manager. Makes surfing a bit easier on the VM.

    Now that our system is up-to-date, its time to clean it up. When looking at the VMDK file size, wehave grown to 17 GB already! Yikes!

    Well start by removing the SP1 installation files. In a command prompt, run dism /online/cleanup-image /spsuperseded.

    http://boerlowie.files.wordpress.com/2011/12/image42.pnghttp://boerlowie.files.wordpress.com/2011/12/image41.pnghttp://boerlowie.files.wordpress.com/2011/12/image40.png
  • 7/28/2019 vcp lab

    20/67

    After that, we are going to remove all Windows Update backup files. Stop the Windows Updateservice and delete the C:\Windows\SoftwareDistribution folder.

    After deletion, Start the Windows Update service.

    Next up the hibernation file: open a command prompt as Administrator. Type powercfg.exe/hibernate off

    After all these step, the VM is consuming less than 10 GB.

    Open up VMware Tools, go to the Shrinktab. Click the Prepare to shrinkbutton.

    Itll take some time

    http://boerlowie.files.wordpress.com/2011/12/image47.pnghttp://boerlowie.files.wordpress.com/2011/12/image46.pnghttp://boerlowie.files.wordpress.com/2011/12/image45.pnghttp://boerlowie.files.wordpress.com/2011/12/image44.pnghttp://boerlowie.files.wordpress.com/2011/12/image43.png
  • 7/28/2019 vcp lab

    21/67

    After it has completed, look at the VMDK file size:

    9 GB! Thats more like it!

    Now the VM is ready to be used as a Template. Runc:\windows\system32\sysprep\sysprep.exe in the VM.

    Select the OOBE option and checkGeneralize. Select Shutdown and clickOK.

    http://boerlowie.files.wordpress.com/2011/12/image51.pnghttp://boerlowie.files.wordpress.com/2011/12/image50.pnghttp://boerlowie.files.wordpress.com/2011/12/image49.pnghttp://boerlowie.files.wordpress.com/2011/12/image48.png
  • 7/28/2019 vcp lab

    22/67

    The VM will shutdown automatically and is ready to be templatized (i just invented a new word).

    Thats it for now! On the next episode we will start deploying our first VM which will be the

    Domain Controller.

    Building the Ultimate vSphere Lab: Part 5 Prepare

    the Template

    First, we will need to protect our parent VM and make it a template. This ensure we dont delete itor power it on. Select the Windows2008R2_Base VM and clickEdit virtual machine settings.

    Select the Options tab, go to the Advanced item and check the Enable Template mode checkbox.

    http://boerlowie.files.wordpress.com/2011/12/image54.pnghttp://boerlowie.files.wordpress.com/2011/12/image53.pnghttp://boerlowie.files.wordpress.com/2011/12/image52.png
  • 7/28/2019 vcp lab

    23/67

    Next up, we need to snapshot the Base VM. All ourlinked clones will be based on this snapshot.

    Right-clickthe VM and Snapshot it!

    Give it a name like Version 1.0 and provide a good description of it.

    Thats it! Now we are ready to start deploying the first VMs!

    http://boerlowie.files.wordpress.com/2011/12/image57.pnghttp://boerlowie.files.wordpress.com/2011/12/image56.pnghttp://boerlowie.files.wordpress.com/2011/12/image55.png
  • 7/28/2019 vcp lab

    24/67

    Building the Ultimate vSphere Lab Part 6:

    Domain Controller

    The first VM we will deploy is our Domain Controller.

    Right-click the Windows2008R2_Base VM and select Manage Clone.

    Base the clone on an Existing Snapshot named Version 1.0 (or whatever you called it before).

    Create a Linked Clone.

    http://boerlowie.files.wordpress.com/2011/12/image59.pnghttp://boerlowie.files.wordpress.com/2011/12/image58.png
  • 7/28/2019 vcp lab

    25/67

    Store it on the SSD drive and name it DC.

    Power On the DC!

    It will boot and will run through the Mini Setup.

    Windows will ask you forRegional Settings and a Password. It will boot afterwards.

    You may notice that display performance is a bit sluggish. Just Reinstall VMware Tools andRepair it and youre set.

    http://boerlowie.files.wordpress.com/2011/12/image62.pnghttp://boerlowie.files.wordpress.com/2011/12/image61.pnghttp://boerlowie.files.wordpress.com/2011/12/image60.png
  • 7/28/2019 vcp lab

    26/67

    Okay, the first thing we will do is to put the network of this DC to the Internal we created earlier.

    Edit the settings of the VM and change Network Adapter to VMnet2. The DC is now isolatedfrom your home network. It can only communicate with other VMs on VMnet2 (but there arentany for now).

    Fill in the IP4 Settings like in the screen below (mind the subnet! Its a /24!).

    Next, Rename the VM to DC and reboot.

    http://boerlowie.files.wordpress.com/2011/12/image64.pnghttp://boerlowie.files.wordpress.com/2011/12/image63.png
  • 7/28/2019 vcp lab

    27/67

    After the reboot, get back into the Computer Rename dialog box and press the More button.

    Fill in a valid DNS Suffix for your new domain we will create. Mine will be named labo.local.This means my DC will be DC.labo.local. Reboot afterwards.

    Next up, open Server Manager and click the Add Roles link. Select DHCP Server & DNSServer.

    http://boerlowie.files.wordpress.com/2011/12/image66.pnghttp://boerlowie.files.wordpress.com/2011/12/image65.png
  • 7/28/2019 vcp lab

    28/67

    ClickNext a couple of times until you reach the IPv4 DNS Settings. Fill in labo.local in theParent domain field.

    Continue clicking Next until the DHCP Scopes screen. ClickAdd and add a scope ranging from10.0.0.100 until 10.0.0.200.

    ClickNext until the DHCPv6 Stateless Mode and disable it.

    Install the goodies!

    Open the DNS Console and create a Forward Lookup Zone with the following settings:

    Type Primary zoneZone name labo.local

    Create a new file labo.local.dns

    http://boerlowie.files.wordpress.com/2011/12/image69.pnghttp://boerlowie.files.wordpress.com/2011/12/image68.pnghttp://boerlowie.files.wordpress.com/2011/12/image67.png
  • 7/28/2019 vcp lab

    29/67

    Dynamic Updates Allow both unsecure andsecure dynamic updates

    Then, create a Reverse Lookup Zone with the following settings:

    Type Primary zone

    IP IPv4 Reverse Lookup Zone

    Network ID 10Create a new file 10.in-addr.arpa.dns

    Dynamic Updates Allow both unsecure andsecure dynamic updates

    Now perform an ipconfig /registerdns (or reboot your server) and ensure it is listed in the Forwardand Reverse lookup zone.

    Now its time to perform a DC Promotion. Enter the dcpromo command. The AD binaries will beinstalled. Create a new domain in a new forest.

    Fill in labo.local (or your own domain name) as the forest name.

    Set the Forest functional level to Windows Server 2008 R2.

    On the DNS Delegation, selection the option to no create the DNS delegation.

    Accept the default file locations for AD binaries. You could change them (as a best practice) toseperate disks, but since this is only a small LAB AD, i wont bother with that.

    Fill in a valid Directory Services Restore Mode password and clickNext a couple of times toinstall AD.

    http://boerlowie.files.wordpress.com/2011/12/image73.pnghttp://boerlowie.files.wordpress.com/2011/12/image72.pnghttp://boerlowie.files.wordpress.com/2011/12/image71.pnghttp://boerlowie.files.wordpress.com/2011/12/image70.png
  • 7/28/2019 vcp lab

    30/67

    You will get a warning about the DNS Zone. Just skip it.

    After the reboot, open Server Manager and go to Roles DHCP Server. Right-click your DHCPserver and select Authorize. This will make both IPv4 and IPv6 green".

    If you want, you can change the Forward and Reverse Lookup zone in DNS to AD Integrated, butits not really necessary for our lab.

    Thats it for our Domain Controller!

    Next up will be the SQL Server!

    Building the Ultimate vSphere Lab Part 7: SQL ServerCreate a new linked clone based on the Windows2008R2_Base template just like you did with theDomain Controller. Name the machine SQL.

    Again, store it on SSD storage. Run through the OS Setup like you did with the Domain Controller.

    Change the Network Adapter to VMnet2 to it can reach the DC.

    If all goes well, you should get a DHCP address.

    Give it a valid IP address and point the DNS Server to the DC.

    http://boerlowie.files.wordpress.com/2011/12/image77.pnghttp://boerlowie.files.wordpress.com/2011/12/image76.pnghttp://boerlowie.files.wordpress.com/2011/12/image75.pnghttp://boerlowie.files.wordpress.com/2011/12/image74.png
  • 7/28/2019 vcp lab

    31/67

    Rename the Guest OS and make it a member of the labo.local domain.

    Create a useraccount SQLAdmin in Active Directory (set the password to never expire). Add thisaccount to the Local Administrators group on the SQL VM.

    http://boerlowie.files.wordpress.com/2011/12/image79.pnghttp://boerlowie.files.wordpress.com/2011/12/image78.png
  • 7/28/2019 vcp lab

    32/67

    Log on with this account to the SQL VM.

    Before starting the installation of SQL Server, well add an additional HD to the VM first. Wellthrow all SQL binaries on that disk.

    Right-clickthe SQL VM and select Settings. Click the Add button and pickHard Disk.

    Create a new virtual hard diskof40 GB. Store the virtual disk as a single file.

    http://boerlowie.files.wordpress.com/2011/12/image81.pnghttp://boerlowie.files.wordpress.com/2011/12/image80.png
  • 7/28/2019 vcp lab

    33/67

    Rename the VMDK to something like SQL_Data.vmdk. This makes it easier to locate the correctvmdk if ever needed.

    Get back into the VM and format the disk.

    In order to reach the SQL binaries (which are stored on the Windows 7 desktop VM), i use theShared Folders feature of VMware Workstation. This allows you to share a single folder betweenthe hosts and the guest VMs.

    http://boerlowie.files.wordpress.com/2011/12/image84.pnghttp://boerlowie.files.wordpress.com/2011/12/image83.pnghttp://boerlowie.files.wordpress.com/2011/12/image82.png
  • 7/28/2019 vcp lab

    34/67

    Start the Setup ofSQL Server 2008 R2. Select Installation and pickNew installation or add

    features to an existing installation.

    I will run SQL in Evaluation mode, but if you have valid licenses, feel free to add them here

    Some Setup Support Files will be installed.

    http://boerlowie.files.wordpress.com/2011/12/image88.pnghttp://boerlowie.files.wordpress.com/2011/12/image87.pnghttp://boerlowie.files.wordpress.com/2011/12/image86.pnghttp://boerlowie.files.wordpress.com/2011/12/image85.png
  • 7/28/2019 vcp lab

    35/67

    You will get two warnings: one because you cannot access the Internet and a second because theWindows Firewall is enabled.

    Select a SQL Server Feature Installation.

    Install the Database Engine Services and the Management Tools Basic. Change the directories

    to you SQL Data drive (in my case E:)

    Install a Default Instance but again, change the drive to the SQL Data drive.

    http://boerlowie.files.wordpress.com/2011/12/image91.pnghttp://boerlowie.files.wordpress.com/2011/12/image90.pnghttp://boerlowie.files.wordpress.com/2011/12/image89.png
  • 7/28/2019 vcp lab

    36/67

    Set the useraccounts for the services to LABO\SQLAdmin and change all services to Automatic.

    Set the authentication to Windows and add the Current User to the SQL Administrators.

    Finish setup.

    Thats the basic setup forSQL Server.

    Building the Ultimate vSphere Lab Part 8: vCenter

    And now finally we come to the point where we are going to install a VMware product

    Create yet anotherlinked clone based upon the Windows2008R2_Base VM and name it VC. Thismust be stored on SSD as well.

    The Virtual Network must be VMnet2. Add it to the domain labo.local.

    Create a userVCAdmin in AD and make this a member of the Local Administrators group on theVC. Log on with that user.

    First we need to install SQL Native Client. This is located on the SQL ISO (the one you installedSQL Server on @ SQL VM). It can be found in folder1033_enu_lp\x64\setup\x64 and is calledsqlncli.msi.

    http://boerlowie.files.wordpress.com/2011/12/image94.pnghttp://boerlowie.files.wordpress.com/2011/12/image93.pnghttp://boerlowie.files.wordpress.com/2011/12/image92.png
  • 7/28/2019 vcp lab

    37/67

    The installation is just a matter of Next, Next, Next, Finish

    Now, hop on to the SQL VM and open SQL Management Studio.

    ClickSecurity Logins New Login.

    The login name must be LABO\VCAdmin.

    Right clickDatabases and select New Database.

    Name it vCenter, set the owner to LABO\VCAdmin and size the MDF file to 100 MB.

    On the Options tab, change the Recovery Model to Simple.

    http://boerlowie.files.wordpress.com/2011/12/image98.pnghttp://boerlowie.files.wordpress.com/2011/12/image97.pnghttp://boerlowie.files.wordpress.com/2011/12/image96.pnghttp://boerlowie.files.wordpress.com/2011/12/image95.png
  • 7/28/2019 vcp lab

    38/67

    Get back into Security Logins and open the properties of your LABO\VCAdmin account. Go tothe User Mapping tab. Give the account do_owner permissions on both the msdb and thevCenter database! (the vCenter database should already be okay normally).

    Okay, now head back to the VC VM.

    Open up Administrative Tools and select Data Sources (ODBC). Create a new System DSN.Select SQL Server Native Client.

    Name it vCenter and point to the SQL server.

    http://boerlowie.files.wordpress.com/2011/12/image101.pnghttp://boerlowie.files.wordpress.com/2011/12/image100.pnghttp://boerlowie.files.wordpress.com/2011/12/image99.png
  • 7/28/2019 vcp lab

    39/67

    ClickNext on the following screen and uh oh

    Go back to the SQL Serverand open SQL Server Configuration Manager and EnableTCP/IP.Restart the SQL Server Service.

    After that, open Windows Firewall and select Allow a program or feature through WindowsFirewall. ClickAllow another program. Browse for it and go to E:\Program Files\MicrosoftSQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe.

    http://boerlowie.files.wordpress.com/2011/12/image104.pnghttp://boerlowie.files.wordpress.com/2011/12/image103.pnghttp://boerlowie.files.wordpress.com/2011/12/image102.png
  • 7/28/2019 vcp lab

    40/67

    Go back to the VC and try again it should proceed now.

    Change the default database to vCenter.

    Finish the wizard.

    Now that we have the SQL stuff covered, its time to install vCenter! Start autorun from thevCenter binaries.

    Select vCenter Server (duh!)

    Setup will complain that IIS is installed (got installed with the .NET installation routine).Therefore, disable the World Wide Web Publishing service on the VC server.

    http://boerlowie.files.wordpress.com/2011/12/image106.pnghttp://boerlowie.files.wordpress.com/2011/12/image105.png
  • 7/28/2019 vcp lab

    41/67

    The following screens are quite easy to understand. Select use an existing supported databaseand select the vCenter ODBC source you created above.

    It will detect that Windows Authentication will be used. Fill in the password for the vCenter service(VCAdmin, the account we gave dbo permissions on the databases). This will also mean that thevCenter service will be started with this VCAdmin account!

    Accept the default installation paths. Create a standalone VMware vCenter Server instance.

    Set the JVM Inventory Size to Small.

    http://boerlowie.files.wordpress.com/2011/12/image110.pnghttp://boerlowie.files.wordpress.com/2011/12/image109.pnghttp://boerlowie.files.wordpress.com/2011/12/image108.pnghttp://boerlowie.files.wordpress.com/2011/12/image107.png
  • 7/28/2019 vcp lab

    42/67

    Finally, clickInstall to start the installation.

    To finalize, install vSphere Client.

    Start vSphere Client, install the certificate and you should connect flawlessly to our brand new

    vCenter environment!

    http://boerlowie.files.wordpress.com/2011/12/image113.pnghttp://boerlowie.files.wordpress.com/2011/12/image112.pnghttp://boerlowie.files.wordpress.com/2011/12/image111.png
  • 7/28/2019 vcp lab

    43/67

    And in case you were wondering, all our 3 VMs together consume about 20 GB. Not bad

    Thats it for now! Next up, well start installing our ESXi hosts.

    Building the Ultimate vSphere Lab Part 9: ESXi

    Now that we have our vCenter running, its time to deploy our ESXi hosts.Depending on the amount of memory you have, you can deploy as many ESXi hosts as you want.Personally (I have 16 GB), i will install 2 of them.

    Start by creating a new Virtual Machine. Take Custom for the type of configuration.

    Hardware Compatibility is Workstation 8.0.

    http://boerlowie.files.wordpress.com/2011/12/image115.pnghttp://boerlowie.files.wordpress.com/2011/12/image114.png
  • 7/28/2019 vcp lab

    44/67

    Attach the ISO of VMware ESXi 5.0. The wizard will detect ESXi automatically for you!

    Call it ESXi1 and place it on HDD storage. There is no use on putting it on SSD storage sinceESXi has no real important data to store which is important from a performance point of view.

    You can play around with the CPUs/Cores, but i give it a Dual Dual-Core (so cores in total). Givesyou some more cores to play with if you want to dive into the CPU scheduler details.

    http://boerlowie.files.wordpress.com/2011/12/image117.pnghttp://boerlowie.files.wordpress.com/2011/12/image116.png
  • 7/28/2019 vcp lab

    45/67

    Give the ESXi host 4GB of memory.

    Select Do not use a network connection as we will add it later on.

    http://boerlowie.files.wordpress.com/2011/12/image119.pnghttp://boerlowie.files.wordpress.com/2011/12/image118.png
  • 7/28/2019 vcp lab

    46/67

    Accept the standard LSI Logic SCSI controller.

    Create a new virtual diskand pickSCSI as the type.

    Use a 40GB disk and store it in a Single File.

    Complete the wizard and clickFinish.

    Edit the settings of you newly created VM. Remove the Floppy and USB Controller.

    ClickAdd and add a Network Adapter. Attach it to the VMnet2 network.

    Repeat the procedure and add a second Network Adapter to the VMnet2 network. This will giveyou a screen like this:

    http://boerlowie.files.wordpress.com/2011/12/image121.pnghttp://boerlowie.files.wordpress.com/2011/12/image120.png
  • 7/28/2019 vcp lab

    47/67

    Select the Processor item, and select Virtualizae Intel VT-x/EPT or AMD-V/RVI. This allowsyou to run x64 guests on these ESXi hosts.

    Now before starting and installing ESXi, take a Full Clone of this VM and name it ESXi2. You cancreate a fresh VM as well, but cloning it will go faster.

    http://boerlowie.files.wordpress.com/2011/12/image124.pnghttp://boerlowie.files.wordpress.com/2011/12/image123.pnghttp://boerlowie.files.wordpress.com/2011/12/image122.png
  • 7/28/2019 vcp lab

    48/67

    Now, Power On you ESXi1 host.

    The ESXi Installer will boot.

    Follow the wizard and install ESXi on your40GB local disk.

    Use the same root password as you always do.

    The installer will wipe your hard disk Let him do so by clicking F11.

    After the installation, the host will reboot. Press F2 to customize it. You will need to login with

    root.

    Select Configure Management Network. First, go into Network Adapters and add vmnic1 to thelist.

    http://boerlowie.files.wordpress.com/2011/12/image127.pnghttp://boerlowie.files.wordpress.com/2011/12/image126.pnghttp://boerlowie.files.wordpress.com/2011/12/image125.png
  • 7/28/2019 vcp lab

    49/67

    Give it IP 10.0.0.10/24 and set the default gateway to 10.0.0.1 (DC).

    Get into DNS Configuration and set the DNS server (should already be set through DHCP butverify) and change the hostname to esxi1.labo.local. Do not use capital letters here!

    Exit the screens and enterY to restart the Management Network.

    Thats it for the basic ESXi installation Quite easy eh?

    Now repeat this part forESXi2 (IP = 10.0.0.20).After the two ESXi hosts have been installed, log on to the DC and open Server Manager Roles

    DNS Server DNS DC Forward Lookup Zones labo.local. Create a A Record for both

    http://boerlowie.files.wordpress.com/2011/12/image131.pnghttp://boerlowie.files.wordpress.com/2011/12/image130.pnghttp://boerlowie.files.wordpress.com/2011/12/image129.pnghttp://boerlowie.files.wordpress.com/2011/12/image128.png
  • 7/28/2019 vcp lab

    50/67

    ESXi hosts.

    Create a PTR Record as well!

    You DNS should like like this:

    Move over to the vCenter server. You must be able to ping both machines using their FQDN now!

    Open up vSphere Client.

    First, create a new Datacenter and below it, create a new Cluster.

    Turn on HA & DRS.

    http://boerlowie.files.wordpress.com/2011/12/image134.pnghttp://boerlowie.files.wordpress.com/2011/12/image133.pnghttp://boerlowie.files.wordpress.com/2011/12/image132.png
  • 7/28/2019 vcp lab

    51/67

    Leave all other settings to default and complete the wizard.

    Now, add the two ESXi hosts to the cluster:

    That will give this cluster layout in vSphere:

    Both hosts will have errors (HA related, but its no big deal as well solve them later on).

    If you ESXi hosts disconnect continually, checkAdministration vCenter Server Settings Runtime Settings and fill in the IP of vCenter.

    http://boerlowie.files.wordpress.com/2011/12/image137.pnghttp://boerlowie.files.wordpress.com/2011/12/image136.pnghttp://boerlowie.files.wordpress.com/2011/12/image135.png
  • 7/28/2019 vcp lab

    52/67

    Building the Ultimate vSphere Lab Part 10: Storage

    We now have a cluster, but still not a usable because we dont have Shared Storage yet. So let us

    add some

    We will go for an iSCSI solution. This makes perfect sense since this can be virtualized perfectly.Many iSCSI appliances exist on the market today. Lefthand, UberVSA, OpenFiler, I willhowever go with the easiest solution: installing a Software iSCSI Targeton Windows Server.

    Again, various flavors exist, but what most people dont realize is that Microsoft has its own freeiSCSI Target. I has all the basic functionality you need (CHAP, Snapshots, ). No replication orother advanced stuff is supported, but we dont really need that for now.

    Lets start by downloading the goodies: http://www.microsoft.com/download/en/details.aspx?id=19867

    Extract it and put it on the Shared Folder to the VMs can access it.

    Now, before we install the iSCSI Software, we need to change our VM to support it. We will useourvCenter Server for Storage. If you have the resources on your PC, a dedicated VM would be

    better (but then, i would go for a dedicated iSCSI appliance like Lefthand, OpenFiler, ).

    Give your vCenter VM a second Hard Diskof500GB and put it on HDD storage.

    http://www.microsoft.com/download/en/details.aspx?id=19867http://www.microsoft.com/download/en/details.aspx?id=19867http://boerlowie.files.wordpress.com/2011/12/image138.pnghttp://www.microsoft.com/download/en/details.aspx?id=19867http://www.microsoft.com/download/en/details.aspx?id=19867
  • 7/28/2019 vcp lab

    53/67

    Initialize it in Windows. That will become ourE: drive on the vCenter:

    Now, we want our iSCSI to be a seperate network. So open the Virtual Network Editor inVMware Workstation.

    Create VMnet3 for IP range 10.0.1.0/24.

    http://boerlowie.files.wordpress.com/2011/12/image141.pnghttp://boerlowie.files.wordpress.com/2011/12/image140.pnghttp://boerlowie.files.wordpress.com/2011/12/image139.png
  • 7/28/2019 vcp lab

    54/67

    Give the vCenter VM a Second Network Adapter connected to this newly created network.

    On the vCenter, rename the connection to iSCSI.

    Give it IP 10.0.1.3/24.

    Go to the Microsoft iSCSI Software Target folder and start x64\iscsitarget_public.msi.The installation is a matter of Next, Next, Finish.

    http://boerlowie.files.wordpress.com/2011/12/image144.pnghttp://boerlowie.files.wordpress.com/2011/12/image143.pnghttp://boerlowie.files.wordpress.com/2011/12/image142.png
  • 7/28/2019 vcp lab

    55/67

    Now, open the Microsoft iSCSI Software Target console.

    On the root item, clickProperties. Enable only IP 10.0.1.3 to listen for iSCSI sessions. Thisensures we only use the dedicated iSCSI network (VMnet3).

    Right-clickDevices and select Create Virtual Disk.

    http://boerlowie.files.wordpress.com/2011/12/image147.pnghttp://boerlowie.files.wordpress.com/2011/12/image146.pnghttp://boerlowie.files.wordpress.com/2011/12/image145.png
  • 7/28/2019 vcp lab

    56/67

    Point it to E:\iSCSI\Datastore1.vhd.

    Set it to 200GB (200000 MB) or something in that neighborhood. Pay attention as the input

    fields are in MB (Megabytes). We wont assign any targets yet.

    Create a second Virtual Disk called Datastore2 in the same folder. Make the size different, so itseasier to differentiate the two datastores.

    Now that we have our storage ready, lets prep the ESXi hosts for it.

    Remeber that we put the iSCSI traffic on a seperate VMnet3 network. Our ESXi hosts currentlyhave 2 NICs in the VMnet2 network, so no iSCSI traffic will be possible.

    Shutdown the ESXi hosts, go into Settings and Add 2 Network Adapters both connected toVMnet3.

    Power On the ESXi hosts. Select a host and go into Configuration Networking. Your currentconfig will look like this:

    ClickAdd Networking to add a new vSwitch.

    Select VMkernel as the type. Use the newly added vmnic2 & vmnic3.

    Name the Portgroup iSCSI_1 and dont select any other options.

    Use IP 10.0.1.10 for ESXi1 and 10.0.1.20 for ESXi2.

    http://boerlowie.files.wordpress.com/2011/12/image152.pnghttp://boerlowie.files.wordpress.com/2011/12/image151.pnghttp://boerlowie.files.wordpress.com/2011/12/image150.pnghttp://boerlowie.files.wordpress.com/2011/12/image149.pnghttp://boerlowie.files.wordpress.com/2011/12/image148.png
  • 7/28/2019 vcp lab

    57/67

    Open the Properties of vSwitch1 and select Add to add another VMkernel interface. This willbecome iSCSI2 with IP 10.0.1.11 for ESXi1 and IP 10.0.1.21 for ESXi2.

    Change the NIC Teaming Failover order of both iSCSI_1 & iSCSI_2. Set vmnic2 active foriSCSI_1 where vmnic3 becomes unused. Change it the other way around foriSCSI_2.

    The Network Layout looks like this now:

    http://boerlowie.files.wordpress.com/2011/12/image154.pnghttp://boerlowie.files.wordpress.com/2011/12/image153.png
  • 7/28/2019 vcp lab

    58/67

    Now get into Configuration Storage Adapters and clickAdd.

    Select the newly added iSCSI HBA (vmhba33) and clickProperties.

    Copy the iSCSI Name (you can change this name to something more readable if you want)

    http://boerlowie.files.wordpress.com/2011/12/image158.pnghttp://boerlowie.files.wordpress.com/2011/12/image157.pnghttp://boerlowie.files.wordpress.com/2011/12/image156.pnghttp://boerlowie.files.wordpress.com/2011/12/image155.png
  • 7/28/2019 vcp lab

    59/67

    Get back into the Microsoft iSCSI Software Target console and select iSCSI Targets CreateiSCSI Target.

    Fill in the hostname as the iSCSI target name:

    Paste the iSCSI Name from vCenter into the IQN Identifier field.

    Now that the Target is created, lets assign our two LUNs to it. Right-Clickit and select Add

    Existing Virtual Disk to iSCSI Target.

    Select both disks.

    Back in vCenter, open Network Configuration on the iSCSI Initiator Properties.

    http://boerlowie.files.wordpress.com/2011/12/image163.pnghttp://boerlowie.files.wordpress.com/2011/12/image162.pnghttp://boerlowie.files.wordpress.com/2011/12/image161.pnghttp://boerlowie.files.wordpress.com/2011/12/image160.pnghttp://boerlowie.files.wordpress.com/2011/12/image159.png
  • 7/28/2019 vcp lab

    60/67

    Add both iSCSI_1 and iSCSI_2 to it.

    Move on to the Dynamic Discovery and add 10.0.1.3 as a new iSCSI Target.

    Close the Window and Rescan the vmhba33 adapter.

    Your 2 LUNs will become visible. Note that we have 4 paths meaning 2 per LUN (= loadbalancing & failover possibilities).

    http://boerlowie.files.wordpress.com/2011/12/image166.pnghttp://boerlowie.files.wordpress.com/2011/12/image165.pnghttp://boerlowie.files.wordpress.com/2011/12/image164.png
  • 7/28/2019 vcp lab

    61/67

    Repeat the same procedure forESXi2.

    After that go to Configuration Storage and create 2 new datastores on these LUNs.

    Open the Properties of your Cluster and enable vSphere HA.

    It should be enabled without errors (you will receive warnings if you dont have Shared Storage,thats why we enable it now and not during Cluster creation).

    Thats it for now! Next, we will create our vMotion interface!

    Building the Ultimate vSphere Lab Part 11: vMotion &

    Fault Tolerance

    Next up is the creation of ourvMotion interface.

    Lets take a look at vSwitch0 first:

    Open Properties and remove the VM Networkportgroup. Then, open the properties of the

    vSwitch and put both vmnic adapters as active.

    http://boerlowie.files.wordpress.com/2011/12/image170.pnghttp://boerlowie.files.wordpress.com/2011/12/image169.pnghttp://boerlowie.files.wordpress.com/2011/12/image168.pnghttp://boerlowie.files.wordpress.com/2011/12/image167.png
  • 7/28/2019 vcp lab

    62/67

    Now open the properties of the Management Networkand set vmnic0 as active and vmnic1 asstandby.

    Now, add a new VMkernel interface on vSwitch0. Name it vMotion and enable it for vMotion.

    Use IP 10.0.0.11/24 for ESXi1 and 10.0.0.21/24 for ESXi2.

    Finish the wizard, open the Properties of the vMotion Portgroup and set the NIC order so vmnic1is active and vmnic0 is standby.

    Repeat this procedure forESXi2.

    http://boerlowie.files.wordpress.com/2011/12/image175.pnghttp://boerlowie.files.wordpress.com/2011/12/image174.pnghttp://boerlowie.files.wordpress.com/2011/12/image173.pnghttp://boerlowie.files.wordpress.com/2011/12/image172.pnghttp://boerlowie.files.wordpress.com/2011/12/image171.png
  • 7/28/2019 vcp lab

    63/67

    Thats it for vMotion. Not really rocket science

    Now its time to activate Fault Tolerance. Thats right, Fault Tolerance running on vSphere inVMware Workstation!

    Power Down your two ESXi hosts.

    Open the Virtual Network Editor and create a VMnet4 network in the 10.0.2.0/24 range.

    Give each ESXi host 2 new Network Adapters in this VMnet4 network.

    Power On the hosts and get into Configuration Networking.

    ClickAdd Networking to add a new vSwitch. Select VMkernel and use vmnic4 and vmnic5.

    http://boerlowie.files.wordpress.com/2011/12/image177.pnghttp://boerlowie.files.wordpress.com/2011/12/image176.png
  • 7/28/2019 vcp lab

    64/67

    Name it Fault Tolerance and enable it!

    IP will be 10.0.2.10/24 for ESXi1 and 10.0.2.20/24 for ESXi2.

    This gives you the following Networking Layout.

    http://boerlowie.files.wordpress.com/2011/12/image181.pnghttp://boerlowie.files.wordpress.com/2011/12/image180.pnghttp://boerlowie.files.wordpress.com/2011/12/image179.pnghttp://boerlowie.files.wordpress.com/2011/12/image178.png
  • 7/28/2019 vcp lab

    65/67

    Now, before you enable FT on a VM, you need to set the following Advanced ConfigurationParameters on EACH VM you want to protect with FT.

    replay.allowBTOnly = true

    replay.allowFT = true

    replay.supported = true

    Now you can run Fault Tolerance enabled VMs on your virtual vSphere 5 ESXi hosts! How cool isthat? One exception though, the VM you enable for FT can be 32-bit only!

    I personally like to play around with some DOS appliance which has some games installed. It issmall enough to run smoothly on these virtual environments.

    Building the Ultimate vSphere Lab Part 12: Finalizing

    the Lab

    Our basic setup is almost ready. We just need to give our VMs some networks to connect to.

    Lets create a new VMnet5 network in the Virtual Network Editor. Use range10.0.3.0/255.255.255.0 and enable the Use local DHCP service to distribute IP address to VM .

    Change the DHCP Settings and fill in a valid start and end address.

    http://boerlowie.files.wordpress.com/2011/12/image183.pnghttp://boerlowie.files.wordpress.com/2011/12/image182.png
  • 7/28/2019 vcp lab

    66/67

    Power Offthe ESXi hosts and give them two extra vNICs attached to VMnet5.

    Create a new Virtual Machineportgroup/vSwitch on vmnic6 & vmnic7 and youre set:

    http://boerlowie.files.wordpress.com/2011/12/image185.pnghttp://boerlowie.files.wordpress.com/2011/12/image184.png
  • 7/28/2019 vcp lab

    67/67

    Now you can start creating your VMs, vMotion them around, play with Fault Tolerance, create

    dvSwitches, install VDR, experiment with vShield Zones, you get the picture

    With this we can finalize this series. You now have a fully functional environment which is veryflexible and you can start playing with all the features in vSphere 5!

    Happy playing in your Virtual Lab Environment!

    http://boerlowie.files.wordpress.com/2011/12/image186.png