Joined: Aug 13, 2004 Posts: 344 Location: Maysville, KY
Posted: Wed Sep 21, 2005 4:59 am Post subject: howto increase disk size of a vmware virtual disk
I use vmware for testing and setting up various types of system configurations (pen testing, etc) and one thing I need to be able to do quickly is to resize vmware workstation disks.
An easy way to resize a vmware workstation virtual disk is using the vmware-vdiskmanager program.
Here is an example of increasing disk size from 750mb to 1.5GB on a Windows 2000 virtual disk:
Code:
ewiget@laptop ~/vmware-clients/Windows 2000 Professional $ vmware-vdiskmanager -x 1.5GB Windows*.vmdk
Using log file /tmp/vmware-ewiget/vdiskmanager.log
Grow: 100% done.
The old geometry C/H/S of the disk is: 512/128/32
The new geometry C/H/S of the disk is: 768/128/32
Disk expansion completed successfully.
Here are all of the options for vmware-vdiskmanager:
Code:
ewiget@laptop ~/vmware-clients/Windows 2000 Professional $ vmware-vdiskmanager
VMware Virtual Disk Manager - build 8848.
Usage: vmware-vdiskmanager OPTIONS diskName
Offline disk manipulation utility
Options:
-c : create disk; need to specify other create options
-d : defragment the specified virtual disk
-q : do not log messages
-r <source-disk> : convert the specified disk; need to specify
destination disk-type
-x <new-capacity> : expand the disk to the specified capacity
Additional options for create and convert:
-a <adapter> : adapter type (ide, buslogic or lsilogic)
-s <size> : capacity of the virtual disk
-t <disk-type> : disk type id
Disk types:
0 : single growable virtual disk
1 : growable virtual disk split in 2Gb files
2 : preallocated virtual disk
3 : preallocated virtual disk split in 2Gb files
The capacity can be specified in sectors, Kb, Mb or Gb.
The acceptable ranges:
ide adapter : [100.0Mb, 128.0Gb]
scsi adapter: [100.0Mb, 256.0Gb]
ex 1: vmware-vdiskmanager -c -s 850Mb -a ide -t 0 myIdeDisk.vmdk
ex 2: vmware-vdiskmanager -d myDisk.vmdk
ex 3: vmware-vdiskmanager -r sourceDisk.vmdk -t 0 destinationDisk.vmdk
ex 4: vmware-vdiskmanager -x 36Gb myDisk.vmdk
Posted: Sat Dec 03, 2005 10:47 am Post subject: VMWare ESX Server
Widget,
I am new to ESX Server and have a question since you seem to be knowledgeable about VMWare. I need to split my VMWare 5.0 Legacy session of Windows 2003 I created from 2.5gb to 2 or 3 smaller files to copy to my ESX Server via WinSCP. Can you help with what VMWare-VDiskManager commands I need to use to accomplish this?
Joined: Aug 13, 2004 Posts: 344 Location: Maysville, KY
Posted: Mon Dec 05, 2005 12:54 am Post subject: Re: VMWare ESX Server
bobk63 wrote:
Widget,
I am new to ESX Server and have a question since you seem to be knowledgeable about VMWare. I need to split my VMWare 5.0 Legacy session of Windows 2003 I created from 2.5gb to 2 or 3 smaller files to copy to my ESX Server via WinSCP. Can you help with what VMWare-VDiskManager commands I need to use to accomplish this?
Joined: Aug 13, 2004 Posts: 344 Location: Maysville, KY
Posted: Mon Dec 05, 2005 1:00 am Post subject: Re: VMWare ESX Server
bobk63 wrote:
Widget,
I am new to ESX Server and have a question since you seem to be knowledgeable about VMWare. I need to split my VMWare 5.0 Legacy session of Windows 2003 I created from 2.5gb to 2 or 3 smaller files to copy to my ESX Server via WinSCP. Can you help with what VMWare-VDiskManager commands I need to use to accomplish this?
Thanks in advance...
Bobk63
well, I think I found the answer already, so here it is:
At the command line, enter:
vmkfstools ‑e <folder>/<filename>.vmdk <vmhba number>:<filename>.dsk
Where:
<folder> is the name of the folder to which you are exporting
<filename> is the name of the file you are exporting
<vmhba number> is the name of the VMFS partition
For example:
vmkfstools ‑e /mnt/bigserver/putfileshere/mydisk.vmdk vmhba0:0:0:1:mydisk.dsk
Notes:
The ESX Server shell requires a backslash to escape each colon in the vmhba number and filename separator if you specify vmfs in the path, as shown in the following example:
/vmfs/vmhba0\:0\:0\:1\:mydisk.dsk
ESX Server 2.5 may use a .vmdk filename extension, so the file name following the vmhba number in the examples shown here might instead appear as vmhba0:0:0:1:mydisk.vmdk.
The vmkfstools command creates 2GB files on non-VMFS file systems, in the same way that the management interface file manager does.
Posted: Fri Oct 13, 2006 11:46 pm Post subject: Re: VMWare ESX Server
bobk63 wrote:
Widget, I am new to ESX Server and have a question since you seem to be knowledgeable about VMWare. I need to split my VMWare 5.0 Legacy session of Windows 2003 I created from 2.5gb to 2 or 3 smaller files to copy to my ESX Server via WinSCP. Can you help with what VMWare-VDiskManager commands I need to use to accomplish this? Thanks in advance... Bobk63
You can copy large files to ESX using FastSCP. There's no need to split files.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
All content Copyright 2000 - 2008, Maysville Linux Users Group unless otherwise credited.
All Rights Reserved!
The opinions expressed by visitors to this web site are their own and not necessarily the opinions of the MLUG!