Using vmware-virtualdiskmanager to Convert Vmware Disks

I have a virtual machine with a single “monolithic” vmdk disk that I’ve been running for some time. Recently I changed backup routines and started using an external disk.

Since my Vmware vmdk was 14GB in size it would not fit on the external fat32 disk.

After a bit of research I discovered the following article which mentions the “vmware-virtualdiskmanager” utility.

A quick “vmware-virtualdiskmanager –help” revealed a full array of commands shown below which allows you to defragment, shrink, and convert your vmdk files among other things.

VMware Virtual Disk Manager - build 56528.
Usage: vmware-vdiskmanager OPTIONS diskName
Offline disk manipulation utility
-c : create disk; need to specify other create options
-d : defragment the specified virtual disk
-n source-disk : rename the specified virtual disk; need to
specify destination disk-name
-q : do not log messages
-r source-disk : convert the specified disk; need to specify
destination disk-type
-x new-capacity : expand the disk to the specified capacity

Additional options for create and convert:
-a adapter : (for use with -c only) adapter type (ide, buslogic or lsilogic)
-s size : capacity of the virtual disk
-t disk-type : disk type id

Disk types:
0 : single growable virtual disk
1 : growable virtual disk split in 2Gb files
2 : preallocated virtual disk
3 : preallocated virtual disk split in 2Gb files

The capacity can be specified in sectors, Kb, Mb or Gb.
The acceptable ranges:
ide adapter : [100.0Mb, 950.0Gb]
scsi adapter: [100.0Mb, 950.0Gb]
ex 1: vmware-vdiskmanager -c -s 850Mb -a ide -t 0 myIdeDisk.vmdk
ex 2: vmware-vdiskmanager -d myDisk.vmdk
ex 3: vmware-vdiskmanager -r sourceDisk.vmdk -t 0 destinationDisk.vmdk
ex 4: vmware-vdiskmanager -x 36Gb myDisk.vmdk
ex 5: vmware-vdiskmanager -n sourceName.vmdk destinationName.vmdk

After a quick backup of the machine I issued the command:

“vmware-vdiskmanager -r olddisk.vmdk -t 1 newdisk.vmdk”

The system immediatly began processing giving me a percentage of the process which took about 30 min. Once complete I booted the new disk to ensure it converted all my data successfully and then deleted the old disk.

Vmware Server Console crashes when removing snapshot

Tonight while doing maintenance on one of my virtual machines I decided it was time to remove a snapshot I created a few days ago while upgrading some software. Shortly after hitting the “remove snapshot” selection my vmware console crashed with a lost pipe error.

Attempting to reconnect yeilded:

There was a problem connecting:
511 Error connecting to /usr/bin/vmware-serverd process

I was almost ready to reboot the machine when painful memories of my last vmware snapshot gone bad experience entered my mind. I investigated further and found that there were .WRITELOCK files in place in my virtual machine folder. After checking my processes on my vmware box I noticed a file called “sdhelper” using a bit of cpu time.

After a brief google search I stumbled across this article which stated that in the event of removing large snapshots it is not unusual for the console to loose connectivity. It is important to simply wait it out and it will eventually finish recombining your disks and restore your connectivity.

I know from prior experience that snapshots are very finicky creatures and rebooting your machine at a time like this could easily lead to data corruption and the loss of your virtual machine.

Troubleshooting Event ID: 1202 SceCli

On a recent service Call I found myself looking at an event log full of errors consisting of:

Event ID: 1202
Source: SceCli

Security policies were propagated with warning. 0x534 : No mapping between account names and security IDs was done.

Advanced help for this problem is available on Query for “troubleshooting 1202 events”.

I was able to resolve this particular error by the following steps:

Run the following command from the command line:
Find /I “Cannot find” %SYSTEMROOT%\Security\Logs\winlogon.log

In my case this resulted in:

Cannot find Remote Desktop.
Cannot find Remote Desktop.
Cannot find Remote Desktop.

Goto Start, Run, and type “rsop.msc” to launch the “Resultant Set of Policy” mmc.

Notice a Red X over either Computer Configuration or Windows configuration.

Expand the folders under the appropriate category until you see a policy with a red X over it containing the user or group noted in the above error. In a column on the right it will show shich Group policy this is configured in. Most likely the policy is referencing a user or group that was deleted or has become corrupt. Adjusting the effected policy to remove the group corrects this issue.