Friday, October 28, 2011

Vyatta virtual router

Often times when setting up a test lab, I will use a Linux system as a router/firewall. While this works, it requires somewhat intimate knowledge of Linux setup and networking - something not everyone is going to have. I found the Vyatta platform is a nice hybrid between a Linux server and a network appliance. It allows for routing, firewalling, DHCP/DNS, VPN, and more.

The easiest method to get started is to download the latest OVF file from http://www.vyatta.com/downloads/vmware_ovf.php 

VCP5 - Perform an interactive installation of ESXi

Assuming your hardware meets the VMware HCL and minimum physical requirements, interactive installation is fairly simple. Things will get complicated if your host doesn't properly support the virtualization layer or if special drivers are needed

Installation Process:

  1. Insert the CD/DVD/ISO and boot the server
  2. On the ESXi Boot Menu, select ESXi-5.0.0-469512-standard Installer (version number may differ)
  3. On the Welcome to the VMware ESXi 5.0.0 Installation screen, hit Enter
  4. Accept the EULA and press F11
  5. Select the disk to install and press Enter
  6. Select the keyboard layout and press Enter
  7. Type and confirm the root password, press Enter
  8. Press F11 to confirm the installation
  9. When the installation is finished, remove the install media and press Enter to reboot

VCP5 - Determine use case for vSphere Client and Web Client

There are 3 client interfaces available for vSphere
vSphere Client

  • Primary method of managing vSphere
  • Must be installed on a Windows client
  • Provides all vSphere management functions

vSphere Web Client

  • Provides a subset of the vSphere management functions
  • Well suited for most day-to-day administration tasks
  • Accessible via most web browsers (requires Adobe Flash)

vSphere Command Line Interface

  • Uses the vSphere Power-CLI to manage most aspects of vSphere
  • Requires Microsoft PowerShell to function


More detail is available at: http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vsphere.vcenterhost.doc_50/GUID-E1D90120-73EB-4B00-9F89-8650EBE911F7.html

VCP5 - Determine availability requirements for a vCenter Server in a given vSphere implementation

The first question to ask when looking into the availability requirements for vCenter Server is: How much do I trust my infrastructure? I know this is kind of a silly question, but if you think your server is going to fail, then you shouldn't be using that server.

Probably the next few questions to ask are: How much data can I lose? How long can I be down? Where will I be recovering the system? These are basic (but critical) Business Continuance / Disaster Recovery (BCDR) questions that are likely a part of your larger server ecosystem. For instance, losing a single server is different than losing your entire datacenter. Additionally, taking 10 minutes or 10 hours to recover the system can majorly impact your ability to manage your virtual environment.

OK - Off the soap box

There are 2 primary components to protect with vCenter: the Database and the vCenter Server. The database is the brains of the operation - it knows where all your VMs are, what kind of licenses you have, all your perf data and so on. The vCenter Server is the brawn - it does all the lifting, organizing, and collecting. Ideally you would make both of these highly available, but if you can only have 1, go for the database.

Officially supported vCenter HA options:

  • Virtualize the vCenter Server and use VMware HA/DRS to maintain the system
  • Use VMware Heartbeat to maintain an active/passive configuration
  • Third Party Clustering such as MSCS
    • This provides an active/passive configuration similar in idea to VMware Heartbeat

Non-supported vCenter HA options:

  • Database replication such as log shipping or transactional replication
    • This copies the database to a second location. The vCenter Server could be pointed to the copy in case of an outage, or an offline vCenter instance could be preconfigured to use the copy and powered on during the outage
    • This can protect against server and site failure
  • Server Replication such as DoubleTake
    • This clones the entire vCenter Server and database to a second location and continually updates the copy with transactional changes (with some lag)
    • During a failure, the copy can be configured to automatically power on and manage the virtual infrastructure
    • This can protect against server and site failure

VMware KB describing the supported vCenter Server high availability options:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1024051

Thursday, October 27, 2011

VCP5 - Deploy the vCenter Appliance

vSphere 5 now provides you with an alternative to a Windows based vCenter Server known as the vCenter Server Appliance. Like its name implies, this is a VM appliance that provides many of the vCenter functions without requiring a Windows system, or the accompanying license.
NOTE: This is very helpful in many cases, and even provides additional features, but does not provide all the  functions a traditional vCenter Server can.

Installation process
Go to VMware.com
Click Support & Downloads | VMware vSphere
Click VMware vCenter Server 5.0 and Modules
Download the following 3 files
  • VMware vCenter Server 5.0 Appliance - OVF File
  • VMware vCenter Server 5.0 Appliance - System Disk
  • VMware vCenter Server 5.0 Appliance - Data Disk
Connect vSphere client to ESX host
File | Deploy OVF Template
Enter the OVF file location, Next
Walk through the wizard entering the location, datastore and network


Configuration process
Power on the appliance and open the console
Using the arrow keys, select Configure Network and setup the networking
Once networking is configured, open a browser to https://:5480
Login as root, password vmware
Accept the EULA and wait for services to start
Once the services are started, click the Network and Authentication tabs to further configure DNS and AD/NIS integration
Select vCenter Server | Database
Change Database Type to embedded and click Test Settings
When the test completes, click Save Settings
When the settings are committed, click System | Reboot

Connecting
Open the vSphere client and select the vCenter Server Appliance name/IP
Log in as root/vmware or the AD/NIS credentials configured previously
Or, open a browser to https://:9443/vsphere-client



Base documentation at http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vsphere.vcenterhost.doc_50/GUID-E1D90120-73EB-4B00-9F89-8650EBE911F7.html
http://vmwire.com/2011/07/15/vsphere-vcenter-server-linux-virtual-appliance-quick-start-guide/

VCP5 - License vCenter Server

Licensing is a simple task (assuming you have licenses) and almost isn't worth documenting.




  1. Open vCenter Server and go to Home | Administration | Licensing
  2. Click Manage vSphere Licenses
  3. Enter the license key(s) and click Add License Keys
  4. Click Next, assign the license to the ESX or vCenter Server(s)
  5. Click Next, Next, Finish



Wednesday, October 26, 2011

VCP5 - Install/Remove, Enable/Disable vSphere Client plug-ins

The vSphere Client can be extended by anyone with a need to do so. Extensions can be simple, such as reporting, or extensive, such as automation.

Installing plug-ins
To install VMware plug-ins

  1. Open the vSphere client and connect to a vCenter server
  2. On the menu bar, go to Plug-ins | Manage Plug-ins
  3. Under Available Plug-ins, select the plug-in of choice and select Download and Install


Third-party plugins traditionally are distributed as an executable, and any specific instructions are included with the executable file. Once installed, the plug-in can be enabled or additional confiugration can take place


Removing plug-ins
To remove plug-ins, use Add/Remove programs from the control panel. Example from a Windows 7 desktop

  1. Go to Start | Control Panel
  2. Select Programs and Features
    1. This list may take a while to fully populate
  3. Select the plug-in to remove and click Uninstall

Enable/Disable plug-ins
To enable or disable plug-ins

  1. Open the vSphere client and connect to a vCenter server
  2. On the menu bar, go to Plug-ins | Manage Plug-ins
  3. Under Installed Plug-ins, right-click the plug-in of choice and select Enable or Disable

Official directions can be found at: http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vsphere.vcenterhost.doc_50/GUID-E1D90120-73EB-4B00-9F89-8650EBE911F7.html

VCP5 - Install additional vCenter Server components

In addition to the vCenter Server, there are several additional components that can be installed. The good news is that all of these components are included in the VMware VIM Setup zip file.
Components:

  • vSphere Client
    • A Windows client used to connect to the vCenter server and stand-alone ESX hosts
    • Can be installed from the zip file, or downloaded by pointing a browser to the vCenter server
  • VMware vSphere Web Client
    • A web based version of the vSphere Client. Only provides a limited set of options
  • VMware vSphere Update Manager
    • Allows centralize patch and update management of all VMware components
  • VMware ESXi Dump Collector
    • Provides a centralized location for ESXi memory dumps in case of a system failure
  • VMware Syslog Collector
    • Provides a centralized logging service for ESXi servers
  • VMware Auto Deploy
    • Automates provisioning of ESXi hosts at boot time, requiring no disks in the ESXi servers
  • VMware vSphere Authentication Proxy
    • Enables ESXi hosts to join an AD domain without requiring AD credentials

Most of the setup for these components follows the traditional "next, next, next" installation process. Specific details can be found at http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vsphere.vcenterhost.doc_50/GUID-E1D90120-73EB-4B00-9F89-8650EBE911F7.html

VCP5 - Size the vCenter Server database

I looked through much of VMware's documentation and couldnt find any easy calculation on how to size your database (For 4.1 I did find http://www.vmware.com/support/vsphere4/doc/vsp_4x_db_calculator.xls, but didn't find anything similar for 5.0). Because of this, I can only assume they are more concerned with you knowing how to change the DB sizing than they are with how big the DB actually is.

There are 2 settings: Statistics Intervals and Database Retention, both of which are managed in the same method.

  1. Open Virtual Center and connect to a vCenter Server
  2. On the menu bar, select Administration | vCenter Server Settings
  3. In the left pane, select Statistics
    1. Here you can change the Statistics Levels and retention for performance data
    2. This also allows you to enter the number of hosts and VMs data will be collected from and provides you with an estimated database size
  4. In the left pane, select Database Retention Policy
    1. Configure the database to discard historical tasks and events as appropriate

More specifics about these settings can be found on pages 35 and 41 of http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-50-host-management-guide.pdf


VCP5 - Identify available vCenter Server editions

According to http://www.vmware.com/files/pdf/vsphere_pricing.pdf there are 3 vCenter Server editions: Essentials, Foundation, and Standard.

Excerpt from the doc:
vCenter Server Editions
VMware vCenter Server provides unified management for VMware vSphere environments and is a required component of a complete VMware vSphere deployment. One instance of vCenter Server is required to centrally manage virtual machines and their hosts and to enable all VMware vSphere features.
VMware vCenter Server is available in the following packages:
  • VMware vCenter Server for Essentials kits – Integrated management for VMware vSphere Essentials kits
  • VMware vCenter Server Foundation – Centralized management for up to three VMware vSphere hosts
  • VMware vCenter Server Standard – Highly scalable management with rapid provisioning, monitoring, orchestration and control of all virtual machines in a VMware vSphere environment
All editions of vCenter Server include the following components:
  • Management server –Acts as universal hub for provisioning, monitoring and configuring virtualized environments
  • Database server – Stores persistent configuration data and performance information
  • Search engine – Allows administrators to search the entire object inventory of multiple VMware vCenter Servers from one place
  • VMware vSphere Client – Provides administrators with a feature-rich console for accessing one or more VMware vCenter Servers simultaneously
  • VMware vCenter APIs and .NET Extension – Allows integration between vCenter Server and other tools, with support for customized plug-ins to the VMware vSphere Client
VMware vCenter Server Standard also includes the following additional features:
  • vCenter Orchestrator – Streamlines and automates key IT processes
  • vCenter Server Linked Mode – Enables a common inventory view across multiple instances of vCenter Server

Tuesday, October 25, 2011

VCP5 certification

Its Certification Time Again! This time I am upgrading my VCP4 to the VCP5 before the dreaded Mid-February date when we all have to re-take the class.
Below are the high-level sections and objectives according to VMware. My hope is to document my travels through these sections in order to better understand the technology.




Section 1 – Plan, Install, Configure and Upgrade vCenter Server and VMware ESXi

  • Install and Configure vCenter Server
  • Install and Configure VMware ESXi
  • Plan and Perform Upgrades of vCenter Server and VMware ESXi
  • Secure vCenter Server and ESXi
  • Identify vSphere Architecture and Solutions

Section 2 – Plan and Configure vSphere Networking

  • Configure vNetwork Standard Switches
  • Configure vNetwork Distributed Switches
  • Configure vSS and vDS Policies

Section 3 – Plan and Configure vSphere Storage

  • Configure Shared Storage for vSphere
  • Configure the Storage Virtual Appliance for vSphere
  • Create and Configure VMFS and NFS Datastores

Section 4 – Deploy and Administer Virtual Machines and vApps

  • Create and Deploy Virtual Machines
  • Create and Deploy vApps
  • Manage Virtual Machine Clones and Templates
  • Administer Virtual Machines and vApps

Section 5 – Establish and Maintain Service Levels

  • Create and Configure VMware Clusters
  • Plan and Implement VMware Fault Tolerance
  • Create and Administer Resource Pools
  • Migrate Virtual Machines
  • Backup and Restore Virtual Machines
  • Patch and Update ESXi and Virtual Machines

Section 6 – Perform Basic Troubleshooting

  • Perform Basic Troubleshooting for ESXi Hosts
  • Perform Basic vSphere Network Troubleshooting
  • Perform Basic vSphere Storage Troubleshooting
  • Perform Basic Troubleshooting for HA/DRS Clusters and vMotion/Storage vMotion

Section 7 – Monitor a vSphere Implementation and Manage vCenter Server Alarms

  • Monitor ESXi, vCenter Server and Virtual Machines


Monday, October 10, 2011

Finding deleted objects in AD

I recently had to troubleshoot why a DNS record disappeared. My first thought was DNS scavenging (even though it shouldn't delete active records). As a first step, I wanted to find the deleted record in AD since AD will tombstone records prior to actively deleting them, that should be doable.

A little research and this is what I found:

  1. Open LDP.exe
  2. Connect and Bind to your domain
  3. Select View | Tree and for BaseDN: enter CN=Deleted Objects,DC=Contoso,DC=com
  4. Browse at all the deleted objects

Tuesday, October 04, 2011

Downloading files via PowerShell

I have long used WGET to download files from the internet, it has tons of options and made downloading in the background easy, large files, lots of files, incremented names, and even entire websites.
I recently ran into a problem where WGET would download a file, and then hang without finishing. If I used CTRL+C, the download finished and the file was usable, but it was a pain so I started looking to see what else there may be. (NOTE: it turned out to be a version issue, downloading the latest build fixed it).

I came across a post of using PowerShell to download files, and it was easy and flexible:

$client = new-object System.Net.WebClient
$client.DownloadFile("http://www.xyz.net/file.txt","C:\tmp\file.txt")

Another requirement for me is to use a proxy when I'm at work, a little more searching and I found http://powershell.com/cs/media/p/802.aspx with the below example:

# .NET class 
$webClient = new-object System.Net.WebClient 
# specify your proxy address and port 
$proxy = new-object System.Net.WebProxy "proxy.MyDomain.com:8080"  
# replace your credential by your domain, username, and pasword 
$proxy.Credentials = New-Object System.Net.NetworkCredential ("Domain\UserName", "Password") 
$webclient.proxy=$proxy  
# specify an header if you want to check info in your logs on your proxy 
$webClient.Headers.Add("user-agent", "Windows Powershell WebClient Header") 
# File to download 
$url = "http://download.microsoft.com/download/4/7/1/47104ec6-410d-4492-890b-2a34900c9df2/Workshops-EN.zip" 
# file path on your local drive 
$localfilename = "c:\temp\Workshops-EN.zip" 
# action !!!!  
$Webclient.DownloadFile($url, $localfilename) 

Now I can download files through my proxy, and automate the process to allow me to download multiple files simultaneously.

Monday, October 03, 2011

Bulk importing CSV files into SQL

I am working on a way to import the NAR files from my EMC CX4s to a SQL database. I have been reviewing the performance data of several databases, and have realized that not all the LUNs need as much performance they were sized for. As such, I have been able to reclaim some disk, but this is a slow and tedious process.
So my thinking was - Import the NAR data into a SQL database and use simple queries to summarize the data. Eventually, I will create a SSRS report to automate all of it.

Inserting from SQL is surprisingly simple. Per http://sqlserver2000.databases.aspfaq.com/how-do-i-load-text-or-csv-file-data-into-sql-server.html, if you have the table pre-created, simply run:

BULK INSERT OrdersBulk 
    FROM 'c:\file.csv' 
    WITH 
    ( 
        FIRSTROW = 2
        FIELDTERMINATOR = ',', 
        ROWTERMINATOR = '\n' 
    )

Saturday, October 01, 2011

How do you tie your shoes?

I never realized there were so many ways to tie your shoes. Open the image full size to truly appreciate it.