Category Archives: VCB

We'll Miss You VI:OPS of Yore

VI:OPS is was a VMware Forum that dedicates dedicated itself to providing information related to operations surrounding a VMware Infrastructure. The “Proven Practice” documents are were submitted and reviewed by moderators before they are published. The published documents allow for peers to comment on the documents.

I made it point to meet Stevie Chambers because he used to be the driving force behind VI:OPS. When he took his helmet with the big red plume and his sword and armored kilt over to Cisco, everything seemed to just freeze at VI:OPS. It took a week to have my last post approved. PMs were not returned quickly. It just died. No gladiator to defend it.

This morning, I was trying to answer a VCB question on the forums. The person posting had a simple question about the operation of VCB with BackupExec. I have not been very active on the communities lately, but I still scan through them and try to post answers when I can. Most of the time, my response to VCB questions include a reference to a “Proven Practice Guide that I posted on the VI:OPS communities:

VIOPS: Proven Practices for Deploying and Managing VMware: Proven Practice: Setting Up VMware Consolidated Backup for any Backup Software

Its GONE! I suspected something was up when someone posted that they could not find the Visio stencils that were on VI:OPS. What happened? Stwike them woughly centurions!

I hastily posted the PDF here for the forum response because I was trying to hurry out the door. I am working to update the doc and will post it soon. Check out the posted copy and use the comments section or DM me on twitter with any corrections.

Setting Up VCB for any Backup Software – Revisited

Since VI:OPS seems to have died and the content was gobbled up and reindexed my the main VMware communities site (They miss you Stevie!), I am posting my VCB proven practice here. It is dated, since its last version covered ESX 3.5, but most of it still applies in ESX4. If you have comments or changes that you wish to see, please comment here.

You can get it here -> http://www.dailyhypervisor.com/?file_id=8

What Would You Like to See Changed in the VMware VM Backup Guide?

As you already know, I posted a generic VCB Proven Practice Guide on VI:OPS. I refer people to this doc frequently.

A recent community discussion regarding the VCB Documentation was visited by a VMware employee or two and the question was posed: “Could you suggest areas of improvement for this guide.”I posted a lengthy response this morning. This might be your chance to comment on the VCB documentation. I am posting the link in hopes of you responding to the question. Hopefully, the comments are considered.

Go over to the VI:OPS site and suggest changes to my doc as well!

Fixed: VMware Tools status shows as not running after running VMware Consolidated Backup

A while back I mentioned that VMware Tools would appear to change to a not running status after a VCB Snapshot was taken. Vmware said a fix would be forthcoming in ESX U4. VMegalodon posted on the communities this morning that he is running VC 2.5U3 and ESX 3.5 U4 (Which is probably a bad combination…) and the VMware Tools issue appears to be corrected.

So, what are you waiting for?? Get to upgrading!

Thanks VMegalodon!

Script to Restart VMware Tools Remotely

I was “forced” to learn how Powershell and the VI Toolkit works for an engagement a few months ago. Once you learn how powershell works and how the VI Toolkit integrates with Powershell, you will love it. This is coming from a linux guy who sees some of the VBScript stuff and just goes “HUH?!?” If you like VB SCripts, check out this post on Jase’s Place. Back in the day, I knew DOS scripting pretty well and I have learned rudimentary bash and perl scripting. To be frank, Powershell was easy for a knucklehead like me to pick up. I use it frequently to automate tasks in VI3 and the winders VMs it manages.

In my last post, I mentioned that VCB snapshots will cause VMware Tools to appear to go off line, even though they are still running. The fixes were to restart the management services on the host or login/logout of the guest. Restarting the management services on the host could cause issues if someone set up to automatically start VMs on boot. Logging in to the VMs is fine unless you have hundreds of VMs.

A third option is to restart the VMware Tools service. This is something that can easily be scripted as long as you have admin access to the guest via RPC services. There are a few methods to script the restart of services on a server remotely. The first is using the sc.exe utility. The syntax of the script looks like this:

sc.exe \\guestname stop VMTools
sc.exe \\guestname start VMTools

This can be easily scripted using the good-old DOS for command. Create a text file (C:\scripts\serverlist.txt) with all of the servers that need to have the VMware Tools service restarted, one guest per line in the file so it looks like this:

guest1
guest2
guest3
guest4

Then run a command that looks like this:

For /F %%SERVER in C:\scripts\serverlist.txt do
sc.exe \\%SERVER stop VMTools
sleep 10
For /F %%SERVER in C:\scripts\serverlist.txt do
sc.exe \\%SERVER start VMTools

You can get the sleep utility in the Resource Kit Tools for Windows 2003. A 10 second pause seems to work pretty well to make sure the service actually stops.

Since I lost all of my DOS scripting chops, I only know how to automate this fully using the VI Toolkit and Powershell. The script below will use the VI Toolkit to automatically create a list of guests that report as not having VMware Tools running and pass that information to standard powershell commands to stop and start the services:

#Connect to the vCenter Server
Connect-ViServer <vCenter.FQDN>

#Get a list of guests where VMware Tools are not running
$servers = get-vm | where { $_.PowerState -eq “PoweredOn” } | Get-VMGuest | where { $_.State -ne “Running” } | select vmName, State

# Stop VMTools Service
foreach ($srv in $servers)
{

Write-Host “Stopping services on $srv”
# Get the VMTools Service
$Service = get-wmiobject -ComputerName $srv -query “select * from win32_service where name=’VMTools'”
if ($Service -ne $null)

#Stop the VMTools Service
{$Service.StopService()}

Sleep 10
Write-Host “Starting services on $srv”

#Start the VMTools Service
$Service.StartService()
}

Another thing I recently needed was a quick way to list the guests with snapshots as a quick method to make sure VCB exited properly. You can use this:

Get-VM | Get-Snapshot | Select VM, Name, Created, Description

Well, there you have it. Script your VMware Tools restart…
:o)

VMware Tools status shows as not running after running VMware Consolidated Backup

Yesterday, VMware posted a Knowledgebase Article about VMware Tools appearing to go off line after a VCB snapshot is taken. This issue occurs after applying the ESX350-200901401-SG hotfix. The KB Article also says it can occur “for some time after the initial snapshot” on unpatched hosts, but I have never seen it.

The work-arounds are simple:

  1. restart the mgmt-vmware service (Make sure you don’t have VMs set to auto start)
  2. Log In and log out of the VM, this will cause VMware Tools to kick itself in the pants.
  3. Use the name or UUID lookup method instead of the ipaddr method.

This was originally addressed here.

It is difficult sometimes to get your backup software to use the name lookup method if it does not use a VCB Integration Kit. If you ARE using an integration kit, you can set this in the config.js file:

VM_LOOKUP_METHOD=”name”;

Since most of the “majors” in backup software, like NetBackup, TSM and Networker were originally Unix based, you may be able to find a config file somewhere to set this option.

Using VCB with any backup software

I don’t know how many times I have helped with VCB issues in the past couple of years on the VMTN Forums. It usually falls down to someone not understanding the VM Backup Guide or how VCB works. Honestly, the guide leaves something to be desired. Because of this, I have published a “Proven Practice” guide on VI:OPS to try to clarify things.

<commercial>

VI:OPS is a VMware Forum that dedicates itself to providing information related to operations surrounding a VMware Infrastructure. The “Proven Practice” documents are submitted and reviewed by moderators before they are published. The published documents allow for peers to comment on the documents.

</commercial>

Although VMware provides integration kits for a few different brands of backup software, it does not cover all of the different brands versions. Some vendors have created their own integration kits as well. But not every brand or version is covered. Because of this, I have outlined a generic method for using VCB to back up and recover VMs. Some other things that really needed to be clarified were using VCB in hot-add mode and performing FullVM backups of selected disks. The doc includes screen shots and command sytax examples.  So head over and check out the doc -> Proven Practice: Setting Up VMware Consolidated Backup for any Backup Software.