This is going to be a long post but I don't want to miss any details that might help someone help me.
Let me start off by saying I am extremely new to VMWare and virtual machines in general. I have built a few small machines but I wasn't completely sure what I was doing and was just following the instructions I was given.
My manager is currently out but in his absence I was tasked with creating a few new machines. I couldn't figure out why I always had to set the size of the provision to be less than the total size available on the datastore until I read about the swap file. I understand now that a swap file will take up the same amount of space as the amount of RAM you specify for the machine unless you reserve memory.
The problem I'm having is I was told to set up a 40GB drive with 32GB of RAM. Since the Windows OS I'm installing is around 10GB there wasn't enough space to complete this. To solve this issue I increased the size of the datastore by the amount of RAM. So to have a 40GB C: drive but allow for 32GB of RAM I set the size of the datastore to ~72GB and provisioned 40GB. The machine booted and installed the OS and I thought things were fine until I checked the size of the C: drive after installation and it told me there was only 1GB or so of space left. I was expecting it to be around 30GB. I rebooted the machine to update some unrelated settings and when the machine came back on I had 22GB of 40GB free on my C: drive. This is still less than what i was expecting but I'm not sure exactly what happened to free up 21GB.
Below is the process I'm using to create this VM. If someone could take some time to look at this and let me know what I'm missing I would really, really appreciate it.
1.) Create a 74GB virtual disk on the SAN and present it to the ESXI host
2.) Log into the host with vSphere Client
3.) Configuration --> Add storage -->
a.) Disk/LUN
b.) VMFS-5
c.) Maximum available space
4.) New virtual machine...
b.) Storage: 74GB datastore I created
c.) VM Version: 5
d.) Guest OS: Windows Server 2008 R2 (64 bit)
e.) CPUs: 4 virtual sockets
f.) Memory: 32GB
g.) Network: VMNetwork
h.) Create a disk: Virtual disk size = 40GB, thick provisioned lazy zero
This lets the machine start and I'll install the OS but like I said, when it finished there was barely any space left on the C drive. I'm sure there is something brutally obvious that I'm missing here but I appreciate any help.