?
Solved

VMWare Vsphere datastore and VM hard drive usage question

Posted on 2012-03-22
5
Medium Priority
?
586 Views
Last Modified: 2012-03-26
I have a Vsphere 4.1 server that currently hosts 2 VM's.  The hard drives are 10-15k rpm Raid-10 fashion and I have about 600gb of total storage on one datastore.

Currently the datastore has been running low and I'm kind of curious as to why because I have VM-1 provisioned with 2 drives (50GB and 225GB respectively) and VM-2 provisioned with 1 drive (150GB)

Total its about 425GB of provisioned space.  I am however concerened that the datastore only shows 4gb of available now.

Under further scruitiny, I looked at the datastore folders and noticed some redundancy to the VMDK files for each VM.

What I think happened was that I replicated from a physical to this Vsphere server and it did a few passes to keep the 2 boxes current until I was able to power down the phsical and power up the VM's.  

Attached are the screenshots of the VMDK files for each VM below:

phxex
phxsql
My question is, is it possible to delete one of the redundant files or are they both necessary for the VM's to boot properly?  For instance there is a C.vmdk and D.vmdk for the phxex01 server.  There is also a C-000002.vmdk and a D-000002.vmdk.

How can I tell which ones are active, and or is there a way to combine the two safely?

Thanks.
0
Comment
Question by:jhuntin
  • 3
  • 2
5 Comments
 
LVL 124
ID: 37756077
The reason for the lack of datastore store space, is your Virtual Machine is cirrently running on a Snapshot. You must not delete them, you must merge them correctly.


A snapshot is NOT a backup of a VM; that is a gross misconception.  

A snap shot is a way to preserve a point in time when the VM was running OK before making changes. A snapshot is NOT a way to get a static copy of a VM before making changes.  When you take a snapshot of a VM what happens is that a delta file gets created and the original VMDK file gets converted to a Read-Only file.  There is an active link between the original VMDK file and the new delta file.  Anything that gets written to the VM actually gets written to the delta file.   The correct way to use a snapshot is when you want to make some change to a VM like adding a new app or a patch; something that might damage the guest OS. After you apply the patch or make the change and it’s stable, you should really go into snapshot manager and delete the snapshot which will commit the changes to the original VM, delete the snap, and make the VMDK file RW. The official stance is that you really shouldn’t have more than one snap at a time and that you should not leave them out there for long periods of time. Adding more snaps and leaving them there a long time degrades the performance of the VM.  If the patch or whatever goes badly or for some reason you need to get back to the original unmodified VM, that’s possible as well.  

I highly recommend reading these 2 articles on VMware Virtual Machine Snapshots:

Understanding Snapshots - http://kb.vmware.com/kb/1015180
Snaphot Best Practices - http://kb.vmware.com/kb/1025279

Also check out the following Snapshot Articles by Eric Siebert

Pt.1- http://is.gd/Lajg4p
Pt.2- http://is.gd/NdKQWC
Pt.3- http://is.gd/tp2vEK

Check Snapshot Manager, for a Snapshot Entry. Shutdown the Virtual Machines, and DELETE the Snapshot, this will merge the snapshot into the parent disk.

Be Patient, this can take several minutes, to hours or days to complete. (it may stick at 95%, JUST BE PATIENT) It will complete.
0
 

Author Comment

by:jhuntin
ID: 37756106
So this is the snapshot manager for PHXSQL.

snapshot
Are you saying shut down PHXSQL, and delete the non-bootable snapshot and then restart the VM?

Thanks for your help!
0
 
LVL 124

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 37756147
Yes, Shutdown the VM. (it's quicker)

either DELETE ALL, or DELETE BOOTABLE and DELETE NON-BOOTABLE, this will merge the changes.

and then restart the VM.
0
 

Author Comment

by:jhuntin
ID: 37758086
This wont obviously delete the VM's hard drive(s)? Just want to be certain. Thanks again!
0
 
LVL 124
ID: 37758337
no, it will remove the snapshots and merge with the parent disk.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question