infuseweb
Contributor
Contributor

Disk Space Allocation Questions

I'm trying to import a physical machine to ESX which is connected to a SAN. So, I have created a LUN with, say, 40GB of disk space which is more than adequate for the physical machine (which is only using 7 GB of space, but the physical drives have 67 GB of disk space available, so I'm essentially shrinking the disks during the conversion).

The conversion process states that I actually only have 39.14 GB of space available on the SAN LUN (where did the rest go?). Fine, so I allocate 39.14 GB of space to the new virtual disk. The server converts fine. But then when I try to boot the server, it says there's not enough free space on the disk. Looking at the Virtual Center numbers, it shows 128 MB of free space on that LUN.

So I'm confused...I created a 39.14 GB disk, with only 7 GB being used, so why is it saying there's not enough free space? Am I supposed to only create, say, a 20 GB hard disk on a 40 GB LUN? If so, what is all the extra space used for?

I guess my main question is how am I supposed to properly allocate disk space when setting up a server? The manuals aren't very clear about this.

Thanks in advance!

Tony

0 Kudos
6 Replies
christianZ
Champion
Champion

If I understood your problem correctly you have created a lun with 40 GB and on it you will create a vm with disk file of round 40 GB -

remember on your lun where the vm is stored you need space for swap file and log files - for me you have there to few free space for those purposes (your vmdk file will be round 40 GB big although you have only 7 GB data in it).

0 Kudos
infuseweb
Contributor
Contributor

That's what I thought, but how much "free" space is ok. If I created a 40 GB LUN, should I create a Windows 2003 Server vmdk file of 30 GB, 35 GB, etc? Wondering if there's a rule of thumb that everyone follows here.

Just seems odd to me that that "swap" and "log" space isn't within the vmdk rather than outside of it.

0 Kudos
christianZ
Champion
Champion

Well that depends -

how many RAM has your vm - swap is e.g. 1.5x RAM,

the logs files have e.g. 20-100 kb or more and there are many of these (how often is the vm restarted).

0 Kudos
esiebert7625
Immortal
Immortal

If you create a memory reservation for the VM equal to the amount of RAM it is assigned then it will not use any disk space for it's vswp file. The vswp file is the biggest file usually other then the vmdk file. All the additional supporting files for the VM are not part of the VMDK file, they are in the same directory as the vmdk file on your SAN. These include the nvram file (small), vmx file (small), log files (up to 6 and usually small), vmxf file (small) and vmsd file (small). If you do a directory listing of the VM's directory, how big are the files in there? Are you sure the vmdk file is re-sized down to 7GB? The total overhead of the extra files shouldn't be more then a few MB's except for the vswp file which will be the size of the assigned RAM unless you use memory reservations. The vswp file is only created when the VM is powered on and is deleted when it is shutdown.

infuseweb
Contributor
Contributor

Sorry, I'm still a noob at VMWare. What's the best way to view the files in each LUN? Is there a GUI based tool, or do I have to do it from the VMWare console?

0 Kudos
esiebert7625
Immortal
Immortal

No problem, they removed the File Manager in ESX 3 but there is still a basic one that is not very obvious.

-Select the server in the VirtualCenter

-On the summary tab right-click on the datastore you want to browse and click “Browse Datastore”

-Select your VM and you should see all the files in that directory

Optionally you can use Putty to login to the ESX server console and change to your VM's directory (ie. /vmfs/volumes/Storage1/MyVM) and do a ls -ltr