VMware: Extending a Cloned (Deployed) Windows VM's root partition without using any 3rd party tools

27 September 2006
In the dynamic environment we have at work any day of the week, we could need some test VM's with any number of different disk sizes.

I would clone a "Golden Master" and then resize the disk, going through many different tools to be able to resize the C:\ drive to the full size of the .vmdk.

So, I wondered if there was any way to automate this. Well, there partially is.

If you add the "ExtendOEMPartition = 1" entry to the sysprep.inf file that VMware "drops off" on the vmdk before the customization process, it will resize to the full size (within the limits of the Windows OS you are cloning).

Keep in mind, this doesn't work for shrinking, but it certainly does for extending.

So my task was to deploy a VM, resize the disk, and have the customization process extend to the new (bigger) .vmdk size.

Well, after some deductive reasoning, I figured out which file generated the sysprep.inf. I wasn't so concerned with the "dropping off" process, as I was the generation process.

If this file is modified, to include the "ExtendOEMPartition = 1" entry in the [Unattended] section, the magic will happen. That is if you extend the .vmdk before the VM powers on for the first time.

Now, the modifications aren't difficult by any means. I will mention however, that the files to be modified are encoded, and they will have to be decoded. I will not go through the process of decoding them. But once decoded, you should be good to go.

And as everyone else who posts tweaks/ enhancements/ mods/ etc., I cannot be held responsible (or liable) for any changes you make to your configuration or your environment.

Click here to download the paper I put together. (Apparently my provider is having some web issues, possibly compression or something, so I've changed the .pdf to a .zip link. I'll post the whole article as a web page to help with this issue.)

I've tested this in VC 1.4 with ESX 2.5.x and VC 2.0 with ESX 3.0.0 and it works successfully with Windows 2000 and Windows 2003 guests. Updated: VC 2.0.1 and ESX 3.0.1 also perform flawlessly.

Another note: The mentioned files only have to be modified once. They will not affect the normal cloning/template deployment process if you do not resize the .vmdk's. I would recommend that if you upgrade your VC install, you check these files, and potentially update them if they have been replaced.

Labels:

Windows: Unsolicited Remote Assistance

I knew that this existed, but didn't need it until this past weekend.

One of my work environments has a need for remote connections for troubleshooting purposes, with the requirement of getting the approval of the remote user. They were given SMS 2003's remote control capability, and then it was taken away.

So I did a Google search on 'Scripted "Remote Assistance"' and found many results. I was thinking I could pass a computername or IP to a script, and then have it initiate Windows XP's Remote Assistance.

Then I learned of "Unsolicited" Remote Assistance. Nice little thing that Microsoft added there.

If you Run (or use Internet Explorer) the following link, you will see the interface:
hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,
C=US/Remote%20Assistance/Escalation/unsolicited/unsolicitedrcui.htm















Your mileage may vary as to the exact look, depending on your Windows installation. Different vendors customize the Microsoft Help and Support Center, so your window may look a little different.

Simply enter a computer's Name, FQDN, or IP, and Connect. Then pick the user you wish to help, and click Start Remote Assistance.

There are some GPO settings that I'll add if you need to enable Remote Assistance on your desktops. Here's a link to a little more information:
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/
technologies/security/ws03mngd/20_s3rem.mspx


Enjoy.

Labels:

AutoIT: Give users the ability to defrag without Admin access

11 September 2006

I found a cool tool this weekend, called AutoIT V3.

You can find it here: http://www.autoitscript.com/autoit3/

I put together a script that will (running as the local admin) allow a user that has zero admin priviledges the ability to defrag their hard drive.


Here's the script:
;**** AutoIT Script to allow users to defrag their hard drive ****
; Set the RunAs parameters to use local adminstrator account
RunAsSet("Administrator",@ComputerName, "PASSWORDHERE")

; Run defrag as admin
RunWait("mmc.exe dfrg.msc",@SystemDir)

; Reset user's permissions
RunAsSet()

;**** End of Script ****

Save this as defragit.au3, and then using the AutoIT scripting tools and compile the au3 you created.

You can download the script here.

And you can download AutoIT here.


If you want to add a cool Vista style .ico, look at Jrdn88's gallery: http://jrdn88.deviantart.com/gallery/

f