November 21st, 2014 by JFrappier

Jonathan Frappier Virtxpert

In order to use vSphere templates in vRealize Automation / vCloud Automation Center and Application Services / Application Director there is a bit of preparation you need to do, especially if you want to use Application Services.  There are guest agents for both vRealize Automation and Application Services so lets get started.  A quick assumption here, you already have a linux virtual machine installed with VMware Tools.  I am going to cheat a bit here and use the e1000 NIC, if you want to use the VMXNET3 adapter see my post on how to install VMware Tools…which needs Perl…which needs network access…which needs Perl!  Let’s get started with the specifics on configuring your Linux VM; I have a CentOS virtual machine called vxprt-centos-tmp that is powered on and ready to configure.  Log in via the VMRC or SSH to get started:

Note that as of Application Services 6.1, you cannot use CentOS7 – at the very least the guest agent will not install, I have not tested beyond the agent installation so certain functionality may work.  The support matrix has more details on supported operating systems.

  • For linux, this is bundled into an installer
  • Logged in as root run wget http://192.168.6.22/tools/preparevCACTemplate.sh – replace with your server name as necessary (I’ve not configured all network settings for this VM)
    • If wget is not installed, run yum install wget
  • Type ls – notice preparevCACTemplate.sh is grey
  • Now run chmod +x ./preparevCACTemplate.sh
  • Type ls again, notice now its green; +x added execute permission on the script
  • Now run the script;  ./preparevCACTemplate.sh – the vCloud Automation Center Agent Installer will start
VMware vCloud Automation Center / vRealize Automation Application Services linux agent installer

VMware vCloud Automation Center / vRealize Automation Application Services linux agent installer

  • Enter the following information in the wizard:
    • vCloud Automation Center Manager Service Server:  192.168.6.20
    • vCloud Automation Center IaaS Server:  192.168.6.21
    • Application Services Server:  192.168.6.22
    • Check certificates:  n
    • Download timeout:  Just press enter
    • Download and install Java:  y
    • When prompted click Y to install

The installer will download all of the necessary components and place them in the correct location; a nice step forward from vCloud Automation Center and Application Director 6.0.   You should receive a message that the Installation Complete Successfully and Ready to capture as a template… however there is still one more step we actually need to do – remove the 70-persistent-net.rules file.  This file keeps track of MAC addresses and it will change every time we clone the template.  By removing it, it will recreate the file on first boot.

  • Type cd /etc/udev/rules.d
  • Type rm 70-persistent-net.rules
  • Type y
  • Type shutdown now -h to shutdown the virtual machine
  • Return to the vSphere Web Client
  • Right click on the powered off virtual machine and select All vCenter Actions >> Convert to Template

We should now be ready to add the vSphere template as a Blueprint in vRealize Automation Center

Preparing vSphere Templates – vRealize Automation Series Part 13

Posted in Tech Tagged with: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

November 15th, 2014 by JFrappier

Jonathan Frappier Virtxpert

I was going to do a post on NFS versus iSCSI, to be honest that is such old hat in my opinion it doesn’t really matter.  Whether you use iSCSI or NFS is up to you, your application and business requirements along with any constraints in your infrastructure that may force you to lean one way or another.  Since I am an NFS networking ninja, clearly I am going to go the NFS route.  Let’s get started on setting up NFS, if you are not already log into your Synology DSM.

  • Click on the main menu button on the upper left and open Control Panel
  • Click on the File Services icon
  • I have no need for CIFS or AFP at this time so I am going to disable those; expand the Windows File Service section and uncheck Enable Windows File Service; repeat for Mac File Service
  • Expand NFS service and check enable NFS
  • Click the Apply button
  • In the left navigation window click on Shared Folder
  • Click the create button
  • Provide the necessary details for your folder I am naming my folder vxprt-silver01-ds01 which will be on the SATA drives; click OK
  • Click on the NFS permissions tab and click the Create button
  • In the hostname/IP field enter the range for your ESXi hosts, in my case its all the same network so 192.168.0.0/16
  • Click OK twice
  • Make note of the mount path value, we’ll need that later
  • Repeat for the folder on the SSD volume, I am naming htis folder vxprt-gold01-ds01
  • You should now have two folders created
Synology NFS shares created in DSM

Synology NFS shares created in DSM

Next I need to connect to my NFS share from the ESXi hosts.  Typically I’d have NFS on its on VLAN, but sans a switch in my home lab to VLANs it will be riding with all my other network traffic.

  • Log into the vCenter Web Client
  • Click on vCenter >> Hosts and Clusters
  • Select your cluster, click on the Related Objects tab >> Datastores
  • Click the icon to add a new datastore, click Next
  • Select next NFS and click Next
  • Enter the datastore name, in my case vxprt-silver01-ds01
  • Enter the server IP address and the path you note in the previous section, in my case /volume1/vxprt-silver01-ds01 – click next
  • Select both/all hosts in the cluster you want to have access and click next then finish

The datastore should now be available on both hosts (Click on the host >> related objects >> datastores) as seen below.  Repeat for the gold datastore.

synology-nfs-datastore

Now that the datastores are created, I am going to create an “ISO” folder on the silver datastore to hold my linux ISOs and build virtual machines in vCenter.

Setting up NFS on the Synology Diskstation 1513+ for ESXi

Posted in Tech Tagged with: , , , , , , , , , , , , , , , , , , , , , , , , ,

November 13th, 2014 by JFrappier

Jonathan Frappier Virtxpert

That is a wrap on getting the basics of a home lab up and running in VMware Workstation.  Within Workstation we have a working Windows 2012 Domain Controller, two virtual ESXi hosts both capable of running nested 64-bit virtual machines thanks to the RVI support in the processor of the 8-core home lab system build and vCenter running.  In vCenter we have our datacenter and cluster created with both virtual ESXi hosts added.  The cluster has DRS enabled, a virtual distributed switch setup with both hosts attached and port group and VMkernel interface setup and running and demoed using vMotion to move a virtual machine from one host to another.  Not bad for 4 virtual machines barely consuming any memory on the host computer!

All that though, was leading up to this; setting up vRealize Automation and Application Services.  In my next series I will go over some of the basics of getting vRealize Automation setup in your home lab so you can start to get a feel for the various roles, requirements and setup.  Here is some handy reading in the interim (ignore anything that says vSphere SSO can’t be used)

Thank you for following along with the home lab series setup, I know there may be a few holes but again the goal was to get this setup to have an environment as the foundation to test other tools.

Workstation Home Lab Wrap-Up – On to vRealize Automation

Posted in Tech Tagged with: , , , , , , , , , , , , , , , , , , , , , ,

November 12th, 2014 by JFrappier

Jonathan Frappier Virtxpert

vCenter is built, now we can start doing some of the cooler things VMware vSphere has to offer; up first – Dynamic Resource Scheduler.  DRS can be run in either manual, partially automated or fully automated mode.  Partially automated will make initial placements of new virtual machines and virtual machines during power on operations and suggest how to rebalance the cluster.  Fully automated, well its fully automated.  It will balance cluster resources based on how aggressive you want it to be.  For a deeper dive into DRS, check out the Clustering Deep Dive book, basically the bible for all things HA and DRS.

To enable DRS, log into the vSphere web client and perform the following steps:

  • Click on vCenter >> Hosts and Clusters
  • Right click the cluster you created, in my case CL01 and select Settings
  • Click on vSphere DRS and click the Edit button
  • Click the Turn ON vSphere DRS checkbox
vSphere - Enable DRS

vSphere – Enable DRS

  • Give I have only two hosts, I have left DRS Automation to “Partially Automated” – in a real use case, there is little reason not to set it to “Fully Automated” – of course you need to understand your environment and its impact before making that decision
  • If you Click on DRS Automation you can see advanced features and further explanation on the various settings.
  • When finished, click OK.  The cluster will be reconfigured.

So enabling DRS – not to hard; understanding all of the settings and how it impacts your environment – well that is typically the harder part.  As for our home lab setup, we are ready to setup vMotion – a requirement for DRS to be fully automated!

Enable DRS – VMware Workstation Home Lab Setup Part 12

Posted in Tech Tagged with: , , , , , , , , , , , , , , , , , , , , ,

November 12th, 2014 by JFrappier

Jonathan Frappier Virtxpert

So you’ve got vCenter up and running and hosts added, it’s time to enable the cool things vCenter can do – namely vMotion, HA and DRS.  I’ve gone back and forth on how I wanted to present vMotion and networking in the home lab.  On one hand many existing deployments are likely running 1Gbps, though newer ones are likely to start with 10Gbps as prices have dropped.  After a quick Twitter chat I decided to move forward as I would if I had 10Gbps networking and not have separate physical interfaces in my host for different traffic types.

When we setup our ESXi templates there was only a single NIC, let’s add a 2nd NIC to the VM’s.  For purposes of this labs (and maybe I’m still old like this) I will keep my management network on a standard switch and my VM network and vMotion traffic on a distributed switch.

  • Right click on your ESXi virtual machine and select settings
  • Click the Add… button and select Network Adapter
  • Select NAT, click Finish and click OK
  • Restart the host from vCenter (right click and select reboot) or from the DCUI (F12 >> root password >> F11)

Once the ESXi virtual machine has been restarted, you should see two interfaces in the vSphere Web Client.  Repeat for your 2nd host.

Virtual ESXi hosts with two nics

Virtual ESXi hosts with two nics

In the vSphere Web Client, click on the network tab in the navigator so we can create the VDS.

  • Right click on dc01 and select New Distributed Port Groups…
  • Name the port group vmotion and click next
  • Keep the defaults and click next, then finish, we’ll use this port group in a bit
  • Right click on dc01 and select New Distributed Switch
  • Name your switch, if you’ve not caught on yet I like short names so my VDS will be called vds0101 (Now wait I thought it was going to just be vds01…why 4 digits all of a sudden!  Easy, its VDS #1 (vds01) in datacenter 01 vds0101 :) )
  • Select your VDS version, I will go with 5.5
  • I’ll keep defaults the rest of the way here even though I only have 1 uplink right now available in my hosts, next, next finish.
  • Right click on the VDS and select Add and Manage Hosts
  • Select Add Hosts and click Next
  • Click the + New Hosts button
  • Select both hosts, click OK then click Next
  • Keep Manage Physical Adapters and Manage VMkernel adapters selected and click next
  • If you’ve followed along here, you should have vmnic1 not connected to any switch so far, that is what we will use for the VDS uplink.  Select vmnic1, click assign uplink
  • Assign to Uplink 1 and click OK; repeat for all hosts
VDS Assign Uplink

VDS Assign Uplink

  • With vmnic1 assigned to the VDS click next
  • On step 5, Manage VMKernel network adapters, you will see that we only have the existing VMkernel adapters that are currently used for management on the standard switch, no worries we can create a VMkernel interface from this page that we will assign vMotion traffic to
  • Select vxprt-esxi01 and click on + New Adapter
  • Click the browse button, select vmotion and click OK, then click next
  • Under enable services click the Enable vMotion Traffic checkbox and click Next
  • Assign an IP address from your IP space, typically you have a separate VLAN defined for vMotion traffic on your switch so you might have a management IP address of 192.168.6.11 for vxprt-esxi01, my vMotion IP might be 192.168.7.11 (I like my last octet to match so vxprt-esx01 would always have a last octet of .11 in any VLAN it is a part of).  In this case I am going to jump into the 192.168.6.24x space so I will assign 192.168.6.141 to this interface, 192.168.6.142 for vxprt-esx02 and so on.  Again in the lab I’m not likely to have more than a few ESXi hosts so I’m not to worried about going into the 250s
  • Repeat for vxprt-esxi02
  • Make sure vmk0 is set to Do not migrate and click Next
  • On the analyze impact it should be no impact, click next then finish

Your hosts will be added to the VDS and vMotion will be enabled on the newly created VMkernel adapter.  To test, I have created an empty virtual machine on vxprt-esxi02 in the silver datastore, I am going to vMotion and Storage vMotion that virtual machine to vxprt-esxi01.  Here you can see the screenshot

vm-esxi02-before-vmotion

vm-esxi02-before-vmotion

  • Now, right click on the virtual machine and select migrate
  • Select Change both the host and datastore (we don’t have shared storage setup yet)
  • Select the cluster and click next
  • Select vxprt-esxi01 and click next
  • Select vxprt-esxi01-silver-local and click next
  • Click finish

You can see the progress of the vMotion in the Running Tasks window.  After a few minutes you should now see your virtual machine on vxprt-esxi01

VM on new host after vMotion

VM on new host after vMotion

vMotion Setup – VMware Workstation Home Lab Setup Part 13

Posted in Tech Tagged with: , , , , , , , , , , , , , , , , , , , , , , , , , , , ,