18.08.2013 Views

vSphere Storage - ESXi 5.1 - Documentation - VMware

vSphere Storage - ESXi 5.1 - Documentation - VMware

vSphere Storage - ESXi 5.1 - Documentation - VMware

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Renaming a Virtual Disk<br />

This option renames a virtual disk file at the specified path on the VMFS volume.<br />

You must specify the original file name or file path oldName and the new file name or file path newName.<br />

-E --renamevirtualdisk oldName newName<br />

Cloning a Virtual Disk or RDM<br />

This option creates a copy of a virtual disk or raw disk you specify.<br />

-i --clonevirtualdisk srcfile -d --diskformat [zeroedthick|thin|eagerzeroedthick|rdm:device|<br />

rdmp:device|2gbsparse]<br />

You can use the -d|--diskformat suboption to specify the disk format for the copy you create. A non-root user<br />

is not allowed to clone a virtual disk or an RDM.<br />

Example for Cloning a Virtual Disk<br />

This example illustrates cloning the contents of a master virtual disk from the templates repository to a virtual<br />

disk file named myOS.vmdk on the myVMFS file system.<br />

vmkfstools -i /vmfs/volumes/myVMFS/templates/gold-master.vmdk /vmfs/volumes/myVMFS/myOS.vmdk<br />

You can configure a virtual machine to use this virtual disk by adding lines to the virtual machine configuration<br />

file, as in the following example:<br />

scsi0:0.present = TRUE<br />

scsi0:0.fileName = /vmfs/volumes/myVMFS/myOS.vmdk<br />

Migrate Virtual Machines Between Different<strong>VMware</strong> Products<br />

Typically, you use <strong>VMware</strong> Converter to migrate virtual machines from other <strong>VMware</strong> products into your<br />

<strong>ESXi</strong> system. However, you can use the vmkfstools -i command to import virtual disks in 2gbsparse format<br />

into <strong>ESXi</strong> and then attach this disk to a new virtual machine you create in <strong>ESXi</strong>.<br />

You must import the virtual disk first because you cannot power on disks in 2gbsparse format on the <strong>ESXi</strong><br />

host.<br />

Procedure<br />

1 Import a disk in 2gbsparse format into the <strong>ESXi</strong> host by running the following command. Make sure to<br />

select the disk format compatible with <strong>ESXi</strong>.<br />

vmkfstools -i -d <br />

2 Use the <strong>vSphere</strong> Client or the <strong>vSphere</strong> Web Client to attach the disk you imported to a virtual machine in<br />

<strong>ESXi</strong>.<br />

For information, see the <strong>vSphere</strong> Virtual Machine Administration.<br />

Extending a Virtual Disk<br />

This option extends the size of a disk allocated to a virtual machine after the virtual machine has been created.<br />

-X --extendvirtualdisk newSize [kK|mM|gG]<br />

Chapter 25 Using vmkfstools<br />

You must power off the virtual machine that uses this disk file before you enter this command. You might<br />

have to update the file system on the disk so the guest operating system can recognize and use the new size<br />

of the disk and take advantage of the extra space.<br />

<strong>VMware</strong>, Inc. 261

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!