How I manually migrated from vCenter 4.0(32-bit) to 4.1u1(64-bit)

Last week I upgraded a vCenter 4.0 installation to 4.1u1. The vCenter was installed on a 32-bit VM so I needed to migrate the installation to a new 64-bit host.

I tried to do the migration according to the vSphere 4.1 upgrade pre-installation requirements and considerations guide. But sadly I got an error during the migration process.

RESTORE FILELIST is terminating abnormally.

The error is described in this thread at vmware communities.

Also, the datamigration scripts makes the original vCenter database corrupt. So if the datamigration fails, as it did for me, the original installation is trashed. (Luckily the datamigration scripts exports a backup before trashing it. But this procedure stinks anyway.)

So how did I migrate? Well I found a workaround and did the following.:

On the old vCenter 4.0 server (32-bit)

  1. Stop the vCenter service
  2. Install Microsoft SQL Server Management Studio Express
  3. Open Management Studio and detached the vCenter database.
  4. Copy the database files.
  5. Copy the % ProgramData% \ VMware \ VMware VirtualCenter \ SSL folder.
  6. Shutdown the vCenter VM.

On the new vCenter 4.1u1 server (64-bit)

  1. Install vCenter 4.1u1 with all the default settings. (This installs SQLExpress and the vCenter database)
  2. Uninstall vCenter from add and remove programs. (This does not remove the SQLExpress installation)
  3. Restore the % ProgramData% \ VMware \ VMware VirtualCenter \ SSL
  4. Install Microsoft SQL Server Management Studio Express
  5. Detach the newly installed database and attach the one from the old vCenter server.
  6. Create a ODBC connection to the local SQLExpress server with the old vCenter database.
  7. Install vCenter 4.1u1 and choose existing ODBC connection during the installation. The installer will detect the old vCenter database and upgrade it.

I wonder why VMware don’t recommend this procedure in the first place?

HTTPS Everywhere

HTTPS Everywhere is a Firefox extension produced as a collaboration between The Tor Project and the Electronic Frontier Foundation. It encrypts your communications with a number of major websites.

Many sites on the web offer some limited support for encryption over HTTPS, but make it difficult to use. For instance, they may default to unencrypted HTTP, or fill encrypted pages with links that go back to the unencrypted site.

This plug-in is an absolute must-have.

Download it here.

Install VMware Tools on Trixbox

Recently I had to install VMware Tools on a Trixbox installation.

1. First, in the VMware console, run ‘install vmware tools’ in the menu
2. Mount the cd-rom drive in an empty folder:

cd /media
mkdir cdrom
mount /dev/cdrom /media/cdrom
cd /media/cdrom

3. Copy the .tar.gz file to somewhere such as /home & extract..

cp VMware-tools.xxxxxxxxx.tar.gz /home
tar xvfz VMware-tools.xxxxxxxxx.tar.gz
cd /home/vmware-tools-distrib

4. Run the installation:

./vmware-install.pl

Source

NoScript is awesome

Probably the main reason I *still* use Firefox as my main browser is the plugin NoScript.

NoScript blocks all unwanted JavaScripts and Flash etc. With JavaScript turned off by default, my browsing is so much faster.

But what if you need JavaScript? Well, NoScript lets you permanently add domains to a white-list or temporarily add all scripts from a site.

I have added two buttons to my Firefox interface, this enables me to configure NoScript faster with fewer clicks.

 

Fix slow/sluggish mouse in VMware Fusion

I have been experiencing that the mouse pointer in my VMware Fusion gets somewhat sluggish from time to time. It got slow for a second or two. Quite annoying.

It turns out that this is caused by VMware Fusion attempts to “optimize mouse for gaming”. Totally useless in my opinion..

Just disable this in the VMware Fusion preferences.

How to speed up the vSphere 4 Client

Lately I’ve found that the my vSphere Client has been really slow.

It turned out that deleting the following 2 registry keys does the trick:

HKCU\Software\VMware\Virtual Infrastructure Client

HKCU\Software\VMware\VMware Infrastructure Client

Check out the original post here:

Apparently, all the prior versions and settings get retained during updates / upgrades and seem to cause significant delays due to components referenced that no longer exist.

Update 2011-04-21:

I also found this guide that shows you how to disable some Aero features that’s slowing down the client on Windows 7. Here is a link to the VMware KB.

This issue occurs when desktop composition is enabled.
To workaround this issue, disable desktop composition:
  1. Right-click the shortcut for the vSphere Client and click Properties.
  2. Click the Compatibility tab.
  3. Select Disable desktop composition.Note: This disables Aero desktop effects while the application is open.
  4. Click OK.
  5. Run the vSphere Client.

Aligning VM Partitions Without Losing Data

If you align your virtual disks the performance of your VM:s increases. The only problem is when you have a n already installed VM that doesn’t have aligned disks.

Do you really want to create a new VM with aligned disks and then install the OS, VMware tools, applications etc?

I found a great guide on how to align partitions without losing data on tuxyturvy.com.

It basically boils down to the following:

1.  Make sure the disk is defragmented
2.  Boot the system with the Gparted live CD.
3.  Select the parition you are wanting to resize and choose (Move/Resize)
4.  Shrink the volume by some amount, the smaller you shrink it the faster it will copy during the move step.  I usually shrink it a GB or so larger than the amount of data on the drive.
5.  Move the partition to right by a few MB’s to free up space at the start of the disk.
6.  Once the move completes, exit Gparted, not the entire live CD, just the Gparted application
7.  Start the terminal window on the live CD
8.  In the command window type ‘parted /dev/sda’ (substitute your actual device here) to start the command line parted editor
9.  Create a new partition at the start of the disk to fill in the space up to the section where you want to align your parition.  For example, if you want your system partition to start at sector 128, create a very small partition that takes up space from sectors 63-127.  The command would be something like this:

mkpart primary 63s 127s

This tells parted to create a new primary partition from sector 63 to sector 127.  That means the very next sector available is 128, a stripe aligned partition.  You may want a different start sector based on your array (some use 64K, some 128K, some bigger) but I’ve found the 128K alignment to work well with both 64K (Equallogic) and 128K (EMC Clariiion) stripe sizes.

10.  Exit parted and restart the Gparted GUI by clicking the Gparted icon.
11.  Use the Move/Resize option to resize the NTFS partition to fill the entire remaining space.  As pointed out by several users, you MUST uncheck the “Round to Cylinders” option prior to this.  I guess I thought this was obvious since we’re trying to align to a specific sector but that’s why I’m not a documentation writer.
12.  Exit gparted, run parted again, remove the small partition you created earlier and reboot.