shareVM- Share insights about using VM's

Simplify the use of virtualization in everyday life

Posts Tagged ‘ext3

Best Practice: Defrag VMDK, VHD, VirtualBox Virtual Disk

leave a comment »

Wikipedia describes defragmentation as

a process that reduces the amount of fragmentation in file systems. It does this by physically organizing the contents of the disk to store the pieces of each file close together and contiguously. It also attempts to create larger regions of free space using compaction to impede the return of fragmentation.

Generically, the defragmentation of a Windows guest within a virtual disk running on a Windows host (Windows on Windows) requires a three-step process:

  1. Defragment the guest
  2. Defragment the virtual disk
  3. Defragment the host

On a Linux host or guest, the ext3 and ext4 file systems are more resilient to defragmentation.

Windows on Windows

You should perform the following steps whether you are using a Microsoft VHD, VirtualBox VDI or VMware VMDK virtual disk,

  1. On a Windows guest OS, run the Windows Disk Defragmenter to defragment the files within the volumes stored inside the virtual disk.
  2. Next, power down the virtual machine and defragment the virtual disk using contig. Defragmenting the virtual disk simply reorganizes the blocks so that used blocks move towards lower-numbered sectors and unused blocks move towards higher-numbered sectors.
  3. Run the Windows Disk Defragmenter to achieve an overall defragmentation of all files on the host including the virtual disk.

VMware VMDK specific

The following steps can be used generically for VMware VMDK, for Windows on WIndows or any other suppoted platforms. vmware-vdiskmanger:is a standalone tool for defragmenting a growable VMware Workstation, VMware Fusion or VMware Server, vmdk when it is offline. Note that you cannot defragment:

  • Preallocated virtual disks
  • Physical hard drives
  • Virtual disks that are associated with snapshots.

The recommended steps for defragmenting a vmdk are:

  1. On a Windows guest OS, run the Windows Disk Defragmenter to defragment the files within the volumes stored inside the VMDK.
  2. Next, power down the virtual machine and defragment the vmdk using the command vmware-vdiskmanager -d myVirtualDisk.vmdk. Defragmenting the vmdk simply reorganizes the blocks so that used blocks move towards lower-numbered sectors and unused blocks move towards higher-numbered sectors.
  3. If the host OS is also Windows, run the Windows Disk Defragmenter to achieve an overall defragmentation of all files on the host including the VMDK.

A year in review: What are our readers looking for?

leave a comment »

Our readers are primarily asking questions like:

  • How can I free up disk space, on Windows, and on ext4, ext3 on Ubuntu and Linux, within virtual disks like vmdk, vhd and vdi?
  • Where can I find the best virtual appliances/ Top 10 virtual appliances?
  • How can I convert from one virtual disk (vmdk to vhd, or vdi to vhd) to another?
  • Who are the competitors for ec2?

An analysis of the search terms shows interesting clusters:



% of queries

Search terms


ext4 defragmentation


ext4 defrag, defrag ext4, ext4 defragment, defragment ext4


ubuntu ext4 defragmentation


ext4 defrag ubuntu, ext4 ubuntu defrag, ubuntu ext4 defrag, ubuntu defrag ext4, defrag ext4 ubuntu, defrag ubuntu ext4


vmware virtual appliance


vmware virtual appliance, vmware virtual appliances, top vmware appliances, top 10 vmware appliances, best vmware appliances


virtual appliance


virtual appliance, virtual appliances, top appliances, top 10 appliances, best appliances


vmware firewall appliance


vmware firewall appliance, vmware appliance firewall


ubuntu defragmentation


defrag ubuntu, ubuntu defrag, defragment ubuntu, ubuntu defragment


ec2 competitors


amazon ec2 competitors, ec2 competitors


windows 7 virtual appliance


windows 7 virtual appliance, virtual applaince windows 7


ext3 defragmentation


ext3 defrag, defrag ext3, ext3 defragment, defragment ext3


convert vdi to vhd


convert vdi to vhd, vdi to vhd

If I abstract it out, our readers are primarily interested in learning how to free disk storage and where to find the best / Top 10 vmware, Xen and Windows virtual applainces.

Thank you. I appreciate your interest in this blog.

Top 10 Posts for Q1 2009

leave a comment »

Here are the Top 10 posts for Q1 2009, the numbers of views are in parentheses.

  1. Defragment Ubuntu, Fedora, ext3, ext4 (2247)
  2. Most popular VMWare Virtual Appliances for IT Administrators (2186)
  3. VirtualBox – setup, share, shrink, convert (842)
  4. How to convert a VMWare VMDK to a Microsoft, Xen VHD? (810)
  5. How does shrink with vmware disk manager work? (614)
  6. Most popular VMWare Virtual Appliances for Security (607)
  7. Pre-configured VHD (Virtual Appliance) available from Microsoft (593)
  8. Most popular VMWare Virtual Appliances for Web Apps (558)
  9. Virtual Machine Disk Image Compression (320)
  10. rsync vm, vhd for backup, disaster recovery, ec2 (317)

Defragmentation of virtual disk files remains the dominant theme. There is an equal amount of interest in virtual appliances, particularly those for system administrators.

Search terms:

  • ext4 defrag ubuntu
  • ext4 defrag
  • convert vdi to vhd
  • e4defrag ubuntu
  • virtualbox shrink
  • rsync vmdk
  • wubi
  • defrag ubuntu
  • defrag ext3
  • windows 7 virtual appliance
  • defragment ext3
  • vmware appliances
  • defrag ext4
  • xen vhd
  • ubuntu ext4 defrag
  • defrag ext4 ubuntu
  • vmware firewall appliance
  • vmware appliance
  • “vdi to vhd”
  • convert vhd to xen
  • ext3 defrag
  • windows 7 beta vmware virtual appliances
  • defrag fedora
  • ext3 defragmentation
  • virtual appliance windows 7
  • ubuntu defrag
  • hercules load balancer virtual appliance
  • fedora defrag
  • convert vmdk to xen
  • shrink vmware disk

Top 10 referrers for Q1 2009

leave a comment »

wubi : Windows UBuntu Installer is wonderful

with one comment

One of my earliest posts on this blog was about installing and configuring Ubuntu 8.10 within a VM, and my feeling that I did springboard into the deep end of a frigid pool on a frosty winter day. I am delighted with the experience of installing and using wubi– the ubuntu installer for windows, on my Windows XP laptop.

User Experience

wubi is an innovative approach towards introducing Windows users to Ubuntu Linux. It preserves the user experience of installing a Windows application using a standard installer and uninstalling it later from Control Panel >  Add/Remove Programs seamlessly.

  • It provides an installation wizard implemented as a  standard Windows executable (.exe), double click on it and Ubuntu gets installed; users don’t have to deal with ISO images
  • wubi installs ubuntu on the desktop as a NTFS file and uses the ext3 filesystem for its contents within (escalating file defragmentation needs, many of our readers visit this blog prescisly for this topic)
  • NTFS-3G (Linux NTFS) driver with write support
  • Grub4Dos as a boot loader – every time the laptop reboots, I am presented with a choice of whether I want to start Windows XP or Ubuntu
  • Ubuntu appears as a program in the Control Panel > Add/Remove Programs.
  • Uninstall removes all the artifacts cleanly

Pros and Cons:

  • The Ubuntu GUI looks stunning , however, it is sluggish compared with the response time I get on XP (Harvey Su, remember him?, has a ghoulish imagination and he has by now trained all of us to view the background pattern as a giant lion that  has a void in its skull and a  skeleton dangling from its open jaws. Definitely PG-17 material)
  • Ubuntu found the printers on our LAN (this blew me away), it even found the PostScript profile (.ppd file?) for our HP LaserJet automatically, however, I when I tried to install it, the installation failed with no diagnostics.
  • It could not find the Postscript profile  for another Canon printer/copier/scanner, however, unlike Windows, it did not lead me to a website where I could download it from.
  • It found a Broadcom wireless driver for my Dell laptop, I was able to install and activate it, however, some interaction with our Active Directory authentication prevented me from getting access to our secure wireless network. Once again, there was no diagnostic to indicate what went wrong.
  • I would be glad to send the wubi developers log files except that I don’t know what to send to whom, however, it would be nice to have a utility that gathers all the relevant diagnostics and beams it up to “mother ship” over http.
  • Update: It would be cool if I could share a folder between XP and Ubuntu so that I could install the ISO’s I had downloaded earlier on  XP.

In conclusion

There is an excellent how-to guide prepared by parthodeep for your reference.

Kudos to Agostino Russo and team for an outstanding job.

Written by paule1s

March 24, 2009 at 5:42 pm

Top 12 referrers over the past 3 months

leave a comment »

How to find out whether vmdk, vhd VM’s slowdown due to fragmentation on Windows?

with 2 comments

I ran into this issue a couple of days ago on my windows and unix host machines running vmware workstation: namely the vm was responding really slowly. On windows XP (and beyond as I understand) there is defrag utility (accessories->system tools). I ran it with the analyze option

XP Defrag Utility

XP Defrag Utility

It produced the following report:

XP Defrag Report

XP Defrag Report

Which showed that my VM had 263 fragments!!!

My next thought was whether I could find a script to run this periodically …. I could only find scripts to run defrag from the command line which produces output (below) but no information on specific files. I am in search of something like filefrag for ext* which can tell me fragment info just for one file.

C:\>defrag -a -v c:\
Windows Disk Defragmenter
Copyright (c) 2001 Microsoft Corp. and Executive Software International, Inc.

Analysis Report

Volume size = 74.46 GB
Cluster size = 4 KB
Used space = 70.85 GB
Free space = 3.61 GB
Percent free space = 4 %

Volume fragmentation
Total fragmentation = 22 %
File fragmentation = 42 %
Free space fragmentation = 3 %

File fragmentation
Total files = 362,428
Average file size = 305 KB
Total fragmented files = 11,723
Total excess fragments = 36,590
Average fragments per file = 1.10

Pagefile fragmentation
Pagefile size = 2.00 GB
Total fragments = 1

Folder fragmentation
Total folders = 83,631
Fragmented folders = 2,269
Excess folder fragments = 7,870

Master File Table (MFT) fragmentation
Total MFT size = 437 MB
MFT record count = 446,433
Percent MFT in use = 99
Total MFT fragments = 3

You should defragment this volume.

Written by RS

January 15, 2009 at 6:41 am

Posted in free up disk space

Tagged with , , , , ,