Saturday, August 15, 2009

Administrator can not see datacenter after No Access role assigned on it

I created new datacenter for testing purpose and gave “Administrator” “No Access” . After this even I being a Administrator at the “Host & Cluster ” level even was not able to see it . To fix such situation we have two resolution method

Resolution #1

If the permission was modified for a user or group (as long as it was not the administrators group):

This is by design that the local administrator/member of local admin group of Virtual Center does have admin level privilege on VC.

1. Create a new user that is a member of the local administrators group for temporary use

2. Log in with this user.

3. Modify the permissions of the user so that they are no longer as restrictive. You can now log in to VirtualCenter appropriately.

SQL method:

Since I have changed the Administrator privilege on datacenter , fist method will not work and then only SQL method will work

  1. Login to the SQL server for virtual center and lunch SQL server Management Studio

  1. Connect to the SQL server based on WINDOWS Authentication

  1. Expand Database ->VMwareVirtualCenter -> Tables.

  1. Search for Tables called VPX_ACCESS tables ,select and right click on it “Open Table”

  1. Check for the column “ROLE_ID” and see the value is -1 for Principle called “Administrator”. If the value is other than -1 then change it to -1 .Close the Database and then restart virtual Center service

India Turn 62 today - Happy Independence Day

India turn 62 today. ON 15th August 1947 India was freed from British Raj.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Happy Independence Day!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Friday, August 14, 2009

Creating a quiesced snapshot failed because the (user-supplied) custom pre-freeze script in the virtual machine exited with a non-zero return code

During one of the P2V I got below mention error message

clip_image001

Do not panic, just reinstall the VM tools and retry to the HOT cloning again. This will work

Thursday, August 6, 2009

Snapshot dependency on .vmsd file

There were a VM which has been spreads across multiple folder . One folder were holding .flat file and delta file. While other was holding all the snapshot.

We have to shift this VM to a different host in different site. We created the same folder structure at different site but still all the snapshot were lost. I started looking at each vmdk files (Every snapshot has its own VMDK to refer to) and corrected the file location /vmfs/volumes/<file_system_UUID>.

After fixing I was still not able to see my all snapshot under snapshot manager. Finally I had a look at .vmsd file .It has few pointers to old datastore

"snapshot0.disk0.fileName =". After I fix I was able to see all the snapshot.

Cloning a snapshot attached Virtual Machine

I am returning back after a long vacation. Thanks to my new family member.

If you want to clone a snapshot machine you have to be very careful because snapshots are lost on cloned machine. This was usual method which we were using for migrating from one location to other location in order to save WAN bandwidth.

The method which we adopted was to clone the VM's to a cheap filer (FAS2020) and ship the filer . This way WAN link will be saved. With VC2.5 U5 and all we can do live cloning of VM's For the VM's which has snapshot I usually copy it "as it is " to the filer and then do the same thing out of filer. Register the VMX and all set.

Copy using SCP was very painful so I found new way to do it TAR

Get inside the VMFS volume.

tar zcf - <vm_folder_name>/ | ssh root@<target ESX host name> "cd /vmfs/volumes/<target vol name>/; tar zpxvf -"