• No results found

Running the VMware Virtual Disk Manager Utility

! “Shrinking Virtual Disks with VMware Virtual Disk Manager” on page 143

! “Examples Using the VMware Virtual Disk Manager” on page 144

Running the VMware Virtual Disk Manager Utility

To run the VMware Virtual Disk Manager utility, open a command prompt or terminal  on the VMware Server host. For Windows hosts, change to the directory where you  installed your VMware Server software. By default, this directory is C:\Program Files\VMware\VMware Server.

The command syntax is:

vmware-vdiskmanager [options]

The options you can or must use are outlined in Table 6‐1.

Table 6-1.

Options/Parameters Description

<diskname> Is the name of the virtual disk file. The virtual disk file must  have a .vmdk extension.

You can specify a path to where you want to locate the disk. If  you mapped network shares on your host, you can create the  virtual disk there by providing the correct path information  with the disk filename.

-c Creates the virtual disk. You must use the -a, -s and -t  options, and you must specify the name of the virtual disk  (<diskname>).

-r <sourcediskname>

<targetdiskname>

Converts the virtual disk specified by<sourcediskname>,  creating a new virtual disk as a result. You must use the -t  option to specify the disk type to which the virtual disk is  converted and you must specify the name of the target virtual  disk (<targetdiskname>). 

After the conversion is completed and you have tested the  converted virtual disk to make sure it works as expected, you  can delete the original virtual disk file.

To have the virtual machine recognize the converted virtual  disk, use the virtual machine settings editor to remove the  existing virtual disk from the virtual machine. Add the  converted disk to the virtual machine. For information on  adding virtual disks to a virtual machine, see “Adding Virtual  Disks to a Virtual Machine” on page 132.

-x <n>[GB|MB]

<diskname>

Expands the virtual disk to the specified capacity. You must  specify the new, larger size of the virtual disk in Gigabytes or  Megabytes. You cannot change the size of a physical (raw)  disk.

Caution: Before running the virtual disk manager utility, you  should back up your virtual disk files.

Note: If the virtual disk is partitioned, you must use a  third‐party utility in the virtual machine to expand the size of  the partitions. For more information, see VMware knowledge  base article 1647 at 

www.vmware.com/support/kb/enduser/std_adp.php?p_fa qid=1647.

If you have a virtual machine with a snapshot or a redo‐log  file stored in a different directory, do not use the virtual disk  manager to expand the virtual disk until you remove the  snapshot or commit the redo‐log file. Otherwise, you might  not be able to power on the virtual machine.

-n <sourcediskname>

<targetdiskname>

Renames the virtual disk specified by <sourcediskname>. You  must specify the name of the target virtual disk 

(<targetdiskname>). By providing directory paths, you can  rename the disk and place it in a different directory or place  the disk with the same name in a different directory.

Before you rename the virtual disk or change the directory in  which it is located, you should remove the virtual disk from  any virtual machine that contains the disk. Choose VM > 

Settings > <virtualdisk>, then click Remove. If this virtual  machine has a snapshot or a redo log stored in a different  directory, remove the snapshot or commit the redo log. 

Otherwise, you may not be able to power on the virtual  machine.

After you rename or relocate the virtual disk, add it back to  any virtual machines that use it. Choose VM > Settings, click  Add, then follow the Wizard to add this existing virtual disk.

-d <diskname> Defragments the specified virtual disk. You can defragment  only growable virtual disks. You cannot defragment  preallocated virtual disks.

-p <mountpoint> Prepares a virtual disk for shrinking. If the virtual disk is  partitioned into volumes, each volume must be prepared  separately. The volume must be mounted by VMware  DiskMount at <mountpoint>. After you prepare the volume,  unmount it with VMware DiskMount. Continue mounting  each volume of the virtual disk and preparing it for shrinking  until you complete this process for all the volumes of the  virtual disk.

You can mount only one volume of a virtual disk at a time  with VMware DiskMount. You can prepare volumes of  virtual disks for shrinking on only on Windows hosts.

-k <diskname> Shrinks the specified virtual disk. You can shrink only  growable virtual disks. You can shrink virtual disks only on  Windows hosts.

You cannot shrink a virtual disk if the virtual machine has a  snapshot. To keep the virtual disk in its current state, remove  the snapshot. To discard changes made since you took the  snapshot, revert to the snapshot.

-a

[ide|buslogic|lsilogi c]

Specifies the disk adapter type. You must specify an adapter  type when creating a new virtual disk. Choose one of the  following types:

! ide — for an IDE adapter.

! buslogic — for a BusLogic SCSI adapter.

Table 6-1.

Options/Parameters Description