A. Mikkelsen

VMware ESX scripts, commands, tools and other nice to know things that will make your virtualization days easier!!!!

Browsing Posts in White Papers

Yesterday I by mistake added the VirtualCenter servers local Users group to a folder in VC with ReadOnly permissions.

This resulted in that I couldn’t delete or change any permissions on the folder.

To solve the problem do the following (On a MSSQL2000 – should be almost the same on MSSQL2005):

  • Open the SQL Server Enterprice Manager and browse to the VC_DB (or what you have called the VC database)
  • Locate the table VPX_ACCESS and right click it and choose Open Table -> Return all rows
  • In the buttom of the table you should be able to locate the wrong permissions entery – make a note of the ID.
    If you can’t find the user/group, you can browse the VPX_ENTITY table to locate ENTITY_ID you need.
  • Open the SQL Query Analyzer an choose the VC database
  • To delete the row that contains the wrong permissions run the below SQL code or modify it for you liking.
    To only delete row 221 from the table

    DELETE FROM esx.VPX_ACCESS WHERE ID = 211

    To delete all rows containing a specific user/group from the table

    DELETE FROM esx.VPX_ACCESS WHERE PRINCIPAL = 'your_user or group'

After you have deleted or updated all the permissions you need, you have to restart the VC server service before the changes will take effect.

Disclamer…..
All changes to the VC database should be avoided at all time.
Always make a backup of the database before making ANY changes to it.
All changes to the VC database using examples on this website is at your own risk.

A few weeks ago we were conducting a vRanger DR test of a VM (new host and new LUN).

The VM was restored succesfull, but when we powered it on we discovered that it for some unexplaned reason had lost the SCSI0:1 (100GB) and SCSI0:2(300GB) VMDK’s.
It had created two new 20GB VMDK’s instead.
We searched the LUN and found the two orginal *-flatvmdk files but not the descripter files.

Use Putty to identify the size of the *-flatvmdk file. ex. 100GB

ls -lah

From a VM (not running) create a new disk with the same size as the one you are missing. The name is not important.

Locate the newly created *.vmdk and *-flat.vmdk file. Copy the new *.vmdk file to the folder that contains the orginal *-flat.vmdk file.

cp rescue_me.vmdk /vmfs/volumes/mysan/rescued/rescued.vmdk

Use VI or NANO to change the following line as below from:
RW 419426200 VMFS “rescue_me-flat.vmdk”

To:
RW 419430500 VMFS “rescued-flat.vmdk”

Make sure that the name of the .vmdk file correspond to the SCSI*:*.fileName in the vmx file.
Now just power on the VM and the orginal disks are intac.

UPDATE
Today I found out that esXpress has created a website that can create a VMDK descriptor file.
http://www.esxpress.com/tools/wrapgen.php

Below is an exampel for the rescure_me-flat.vmdk file with a size of 100GB (107374182400 bytes)
esXpress WMDK descriptor file creator

This isn’t new!
But what is new, is that it’s now possible to run VM’s inside the hosts.

The performance isn’t the best, but it’s OK for testing.

Read the full article here.

Today i came accross this guide on howto move the Virtual Center database from one MSSQL server to another.

Read the full guide here..

I know that this guide will be usefull when i next week have to do just that.

Read my local copy here

Today i came accoss this handy little guide to boost performance of a VM.

  1. Disable the pre-logon screensaver:
    Open Regedit
    HKEY_USERS\.DEFAULT\Control Panel\Desktop
    Change the value of “ScreenSaveActive” to 0.
  2. Disable updates of the last access time attribute for your NTFS filesystem, especially for i/o intensive vm’s this is a real boost:
    Open CMD
    fsutil behavior set disablelastaccess 1
  3. Disable all visual effects:
    Properties on your desktop
    Appearance -> Effects
    Disable all options.
  4. Disable mouse pointer shadow:
    Control Panel -> Mouse
    Click on the tab “pointers” and switch “enable pointer shadow” off.

A big thanks goes to Yellow Bricks – Read the full guide here

VMware has released the LAB guide for PowerShell from VMworld 2008 – Cannes.

It is great for getting inspriation for scripts or just to learn how the PowerShell for VMware works.

Get it here form VMware.com
Or my local copy here.

Eric Siebert has writen a very good and explaining guide on how to troubleshoot snapshots on ESX 3.x.

Virtualization administrators can use snapshots on VMware ESX to travel back in time and figure out what went wrong with their virtual machines (VMs). But what do you do when your snapshots start acting funny? In this tip, we’ll troubleshoot potential problems that may come up when using snapshots on ESX.

Read it here or read my local copy.

Ever wanted a XP installation disc that only had the bare minimum of features and the smalest foot print?
The take a look at nLite and if you a a gamer also take a look at Game XP.

You can find a guide to both Freeware programs here.

Last week I created a new WinXP media including SP3 using nLite.
After installation of a new VM I discovered that the VM boots faster and that the foot print is alot smaller around 1.3 GB.

I will in future use nLite or vLite to trim all my WinXP, WIN2003 server and Vista installation medias with.
This will result in my DR of VM’s will take up less space.

I know disk storage isn’t expencive but I also move the DR to tape 😉

Looking for a guide to upgrade your VMware ESX enviroment to ESX 3.5 and VC 2.5, then this guide from RTFM Education is a must read.

http://www.rtfm-ed.co.uk/?p=482

RTFM Education has released a quick guide for ESXi

Get it here
http://www.rtfm-ed.co.uk/?p=476

Powered by WordPress Web Design by SRS Solutions © 2019 A. Mikkelsen Design by SRS Solutions