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

Friday, December 5, 2008

Lost permissions to a folder in VC

Filed under: vRanger,White Papers — Tags: , , , , , , — A. Mikkelsen @ 10:16 am

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


    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.

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.

Thursday, October 2, 2008

Recreating a missing VMDK descripter file

Filed under: Disaster Recovery,ESXi,vRanger,vSphere (ESX),White Papers — Tags: , , , , , , , , — A. Mikkelsen @ 8:47 am

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”

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.

Today I found out that esXpress has created a website that can create a VMDK descriptor file.

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

Sunday, September 28, 2008

It’s now possible to run ESXi / ESX 3.5.x in Workstation 6.5

Filed under: ESXi,Virtual Center,vSphere (ESX),White Papers,Workstation — A. Mikkelsen @ 19:49 pm

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.

Thursday, July 10, 2008

Howto move the VC database from one MSSQL to another MSSQL

Filed under: Virtual Center,White Papers — A. Mikkelsen @ 21:16 pm

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

Wednesday, July 9, 2008

Quick guide to tweak a VM for better performance

Filed under: ESXi,Performance,Tools,vSphere (ESX),White Papers,Workstation — A. Mikkelsen @ 18:39 pm

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

Monday, July 7, 2008

Great guide for getting started with PowerShell

Filed under: PowerShell,Scripting,White Papers — A. Mikkelsen @ 20:56 pm

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.

Wednesday, May 21, 2008

Troubleshooting VMware snapshots

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.

Thursday, May 15, 2008

Trim your XP installation to a minimum with nLite

Filed under: Microsoft,Tools,White Papers — A. Mikkelsen @ 13:47 pm

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 😉

Upgrading to ESX 3.5.x and VC 2.5.x – Read this guide

Filed under: ESX Migrate/Upgrade,Virtual Center,vSphere (ESX),White Papers — A. Mikkelsen @ 12:56 pm

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.


Free ESXi quick guide

Filed under: ESXi,White Papers — A. Mikkelsen @ 12:49 pm

RTFM Education has released a quick guide for ESXi

Get it here

« Newer PostsOlder Posts »

Powered by WordPress