Changes

Jump to: navigation, search

Command Line Management of VMware Virtual Disks

1,198 bytes added, 18:30, 28 October 2008
Expanding a Virtual Disk
== Expanding a Virtual Disk ==
 
The size of a virtual disk may be expanded using the ''-x'' flag together with the new size of the disk. For example, the following command extends the size of the virtual disk containing in the file win2008.vmdk to 100GB:
 
<pre>
vmware-vdiskmanager -x 100GB win2008.vmdk
</pre>
 
An important point to note is that although the virtual disk has been extended by VMware, the new space will typically be treated as being unallocated by the guest operating system. In order to use the extra space, either an existing partition on the virtual disk will need to be extended, or a new partition created from within the guest operating system.
 
== Defragmenting a Virtual Disk ==
 
A VMware virtual disk may be defragmented only if created as, or subsequently converted to a ''growable'' disk. The defragmenting of ''pre-allocated'' virtual disks is not supported. In addition, any virtual machines making use of the virtual disk must be powered off prior to beginning the defragmentation process.
 
Defragmentation is initiated using the ''-d'' flag of the ''vmware-vdiskmanager'' tool combined with the name of the virtual disk image file. For example:
 
<pre>
vmware-vdiskmanager -d win2008.vmdk
</pre>
1,798
edits

Navigation menu