motogobi

gobi, mobilized

Browsing Posts tagged Tech Tips

This completely saved my aching head this morning when we had to update the VLAN on some freshly-built ESX hosts:

Esxcfg command help

Thank you, Eric Siebert!

Ran into this error this morning, which of course took down one of our (1000+ VM) vCenter environments:

The vCenter Server’s vpxd logs contain entries similar to:

An unrecoverable problem has occurred, stopping the VMware VirtualCenter service. Check database connectivity before restarting. Error: Error[VdbODBCError] (-1) “ODBC error: (23000) – [Microsoft][SQL Native Client][SQL Server]Violation of PRIMARY KEY constraint ‘PK_VPX_GUEST_DISK’. Cannot insert duplicate key in object ‘dbo.VPX_GUEST_DISK’.” is returned when executing SQL statement “INSERT INTO VPX_GUEST_DISK (VM_ID, PATH, CAPACITY, FREE_SPACE) VALUES (?, ?, ?, ?)”

The link to the VMware knowledgebase article is here: vCenter Server service fails with the error: Violation of PRIMARY KEY constraint ‘PK_VPX_GUEST_DISK’

The curious part? That issue is addressed specifically by vCenter Update 1, Build 208111 and we’re running 208111. In any case, shutting down the vCenter service (ok, it wouldn’t run anyway) and running the SQL script supplied in the KB article did the trick and fixed that which should probably already have been fixed. Still super happy we’re not running on Oracle anymore, though…

This post by Marcel van den Berg just saved my sanity today since I could not make heads or tails of what my beloved Platespin server was trying to tell me:

Preparing <servername> (under PlateSpin control) For Synchronization

No connection could be made because the target machine actively refused it 127.0.0.1:5036

Description:

several one time synchronizations jobs fails at Step 3 “Take control of virtual machine”. Before this kind of job performed well.

Solution:

reboot the Platespin server and re-run the job. It will most likely run successfully.

Platespin: the Cadillac of physical-to-virtual migrations (or Porsche, or WRX STi, what have you) but decidedly not the best-documented solution on the planet. You’ll find that the errors that are thrown link you to expired or nonexistent knowledge base articles…

If you haven’t heard about disk alignment and you’re using virtual machines, you owe it to yourself and your most-likely-growing infrastructure to understand what alignment is all about. On a small scale it’s almost unnoticeable. But I can tell you that on a large scale it becomes a major pain for you or your storage infrastructure team.

One quick tip: to check your disk offset on Windows systems, simply launch msinfo32.exe from the Run menu. See the thumbnail of this post for a screenshot.

From VirtualGeek’s excellent post:

The purpose of alignment is to minimize extraneous internal array operations. All arrays have internal constructs that are generally a function of the RAID model (and also the filesystem alignment, and in some cases logical page table constructs in virtually provisioned models).

<snip>

All the funky goodness is done via either filesystem or another (pages commonly) abstraction on TOP of the RAID abstraction. Think of a 4K NTFS IO operation in a Guest making it’s way down to the array. Once it gets there, let’s say the array has a 64K stripe, but a 1MB “page” used for these fancy features. Falling into two 1MB logical memory pages as an example – where statistically it’s much more likely to land on a boundary if the volume is aligned on a 4K boundary.

It’s very worth your time to delve into this article and find out how your environment is set up, like right now. You might find your templates are mis-aligned, or in our case, that VMware Converter does not properly align disks on conversion (wonder-app Platespin Migrate does, in fact, give you properly-aligned disks).

I originally put up a post about two pieces of software that just plain make life easier when you’re sitting in front of a computer all day, but the list ended up growing. While I love both Google Chrome and WikidPad, the original topics of this post, I found that I wanted to list a bunch of other software and services that I use to hopefully de-clutter my life and streamline much of what I’d like to get done. Hopefully updated often. Enjoy!

Continue to my Useful Tools collection

This little tidbit from The Lone Sysadmin saved our bacon this morning: if you’re finding it impossible to migrate a VM off of a host because of a stuck VMTools installation process, there’s a quick way to kill this process off via the command line to get things moving along. First, you need to know the process ID of the VM you’re working with (run this from the host where the VM is currently living):

/usr/bin/vmware-cmd /vmfs/volumes/datastore/vmname/vmname.vmx getid

This should return something like “getid() = 192″

Using that ID you can then cancel that tools install:

/usr/bin/vmware-vim-cmd vmsvc/tools.cancelinstall

Voila! No more tools install, and migration should work normally. Huge thanks, again, to Bob over at The Lone Sysadmin!

If you end up using VMware’s VI Client to connect to multiple vCenter servers or ESX/ESXi hosts, you might find yourself a little annoyed at how many saved connections show up when you go to launch a new connection. This becomes ever more annoying when you’re connecting to multiple servers named somewhat the same as the client will start auto-completing your selections. This has reached it’s pain point this week as we transition to similarly-named vCenter servers and I keep fat-fingering what I’m typing.

If you want to clear that saved connections dialog, it’s a simple registry edit in XP. Navigate to:

HKEY_CURRENT_USER\Software\VMware\VMWare Infrastructure Client\Preferences\RecentConnections

and simply delete the connections you don’t want (DO NOT delete the entire key, just the connections in that reg key). Enjoy your clutter-free VI Client…

So I’ve been restoring some Windows servers from NetApp snapshots today, specifically single hard disks that had been having problems (long story involving Windows problems, etc). I found this pretty easy to do once I got the syntax down – basically, all I was looking to do was to restore the C: of a server, but keep it’s D: intact – that way I’d keep the most recent data, in this case some SQL files, but could roll back to a point where the Windows OS was a little less hosed up. Mostly for my own quick reference in the future, this is how I cranked a bunch of these out.

continue reading…

mozy

It’s good to see Lifehacker focusing on backup tools. After literally years of struggling with backing up various computers and laptops I’ve owned over the years, and having learned my disaster-recovery lesson the hard way when I lost the hard drive on my desktop in 1996 or something, I’ve recently settled into a very cozy relationship with Mozy. I signed up for the yearly Home Unlimited plan ($50/yr per machine) and have been nothing short of pleased with it’s performance.

Check out other options over at Lifehacker, but whatever you do? Make sure you’re backing up your data…