Monthly archives: July, 2015

How to shrink a VMDK: Shrinking a virtual disk in VMware ESXi

First open up Disk Management in Computer Management in your guest Windows environment.

Right click the volume on the disk you want to shrink.

Windows will inform you the maximum amount it can shrink the disk by. Choose an amount that you wish to actually shrink it by and click Shrink.

shrinkF

Windows will start the shrinking process and it might take some time and appear to be hanging as Windows will actually be defragmenting the disk in order to consolidate the free space towards the end of the disk before resizing the volume.

Once it is done and you are satisfied that the volume on the disk is the size you want it then you need to shut down the VM.

SSH into the host and copy the VMDK file to make a backup of it, just the descriptor file not the flat file.

cp vmname.vmdk vmname-original.vmdk

Open up the VMDK file in a text editor and find the line that describes the size of the flat file. Similar to the following

# Extent description

RW 209715200 VMFS “vmname-flat.vmdk”

The number is the size of the virtual disk in terms of disk sectors, where each sector is 512 bytes. So a 100GB virtual disk is 209715200 sectors.

You will need to change this number to correspond to the new disk size where x = size in GB

vmdk_size = [x * (1024*1024*1024)] / 512

I have chosen to shrink my disk to 60gb, so my new Extent description now reads as follows:

# Extent description

RW 125829120 VMFS “vmname-flat.vmdk”

You now need to clone the drive to get it to the new size:

vmkfstools -i vmname.vmdk vmname-new.vmdk

The bit we are interested in is the newly created vmname-new-flat.vmdk file.

Rename the old flat file from vmname-flat.vmdk to vmname-flat-old.vmdk

and rename the vmname-new-flat.vmdk file to vmname-flat.vmdk

Start the VM up and it should show the new smaller disk. When you are satisfied that everything is working you can now delete the old unneeded files from your datastore.



How to download the Windows 10 ISO

It is July 29th 2015 and Windows 10 has been released. If you have reserved your copy it will probably have downloaded by now and is ready for you to install it.

However

  • If you reserved your copy and it hasn’t downloaded yet.
  • You didn’t reserve your copy and you’ve found that you can’t download and install it yet due to Microsoft’s staggered roll-out.
  • You wish to do a fresh install.
  • You have multiple machines to upgrade and you don’t want to download the installation files many times.

Then what are your options?

You can jump the queue and do an in place install or download an ISO file of Windows 10 via a handy little tool that Microsoft has published called the Media creation tool.

The Media creation tool is a small EXE file that you just need to download and run to start the process. It comes in 32-bit and 64-bit versions and both will allow you to create 32-bit and 64-bit ISO files.

When you run it you’ll be given the option to either perform an upgrade of the PC you run it on or to create installation media for another PC. Choose the latter option, click Next, then choose the language, Windows version, and whether you want 32- or 64-bit architecture, or both.

You will then get the option to either download and create a bootable USB medium or to download and create an ISO file. select the ISO file radio button, click Next yet again and choose a location to save it to.

The tool will download the files, verify them and then create the ISO file.



One of the most important reasons to upgrade to Windows 10: Security

The most secure Windows ever, Windows 10 has more built-in security protections to help safeguard you against viruses, phishing, and malware. New features are now delivered through always-enabled updates, helping you to stay current and your system to feel fresh, so you’re free to do.

Windows 10 is designed to be the most secure version of the operating system yet, but as is typical with software this complex there are likely to be new security flaws that have yet to be discovered that are unique to this version of Windows.