Solved

VMWARE Creating Sparse-Provisioned disks, Preserving Snapshot history..

Posted on 2009-05-16
7
459 Views
Last Modified: 2013-11-11
Hi Experts,

I have a ESXI 3.5 (free version) vmware server that is chock full o' VM's.  I need to convert a number of the images to sparse-provisionded disks without losing snapshot history. I've heard that this is possible using a combination of vmkfstools and snapshot file hacking .

Step by step directions would be great!
0
Comment
Question by:alpha-lemming
  • 3
  • 2
  • 2
7 Comments
 
LVL 8

Expert Comment

by:markzz
ID: 24401985
Without entering into the discussion of retaining snapshots as a backup/restore method (don't do it)
I would advise you backup the guests before attempting this.
The basis is that it's not supported however that doesn't mean it can't be done.
I don't really wanrt to advise on something that is VERY likely to go horribly wrong.
The primary thing to be aware of is to ensure you have at least the amount of disk free in the VMFS LUN as the guest sessions disks total.
eg. if the guest has a 10GB and a 100GB vDisk be sure you have 110GB free before starting.
0
 

Author Comment

by:alpha-lemming
ID: 24405345
Anybody done this or know how?
0
 
LVL 8

Expert Comment

by:markzz
ID: 24405498
I have not done this but can see a possible method.
Again just to enforce the point. It sounds like you are using snapshots for something they were never intended and you will at some point likely corrupt the guest disk by doing this.
I would suggest you commit your snapshots.
Shutdown you guest, rename the guest in the VI interface.
Via the importer, import the guest to another LUN using the original guest name, at this point you can decide what disk format you will use.
Be aware your disk IO will increase by using sparse disks.
I think many here would agree sparse disks are not the best method and you will have unanomious agreement that you need to commit your snapshots.
Funny thing these public forums, there are many here with significant levels of skill and years of experience with these products and proceedures, yet the advise is at times ignored. At least ignored until it all goes wrong.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 21

Expert Comment

by:za_mkh
ID: 24407377
I concur with Markzz ... snapshots are not backups and should never be used for them. Leaving them running, not only eats up lots of disk space, but there is a performance penalty to your VM too! His advice is sound!
 
0
 

Accepted Solution

by:
alpha-lemming earned 0 total points
ID: 24436704
Well, now, who said we're using snapshots as bakups? We have tape and offsite sans for that. We use backups to preserve developments points and branch from them, much like tags and branches in a version control system. Isn't that what snapshots are for?

I tried the idea with the converter, but it didn't offer me the choice of using a sparse-provisioned disk image..

After some research, I came up with the following  solution, which has worked fine on a couple of test VM's:

1) make a snapshot
2) clone the base disk to a sparse one with: 'vmkfstools -i <basedisk.vmdk> -d thin <basedisk-thin.vmdk>
3) drop the old disk from the vm, add the thin one, get the cid of the new
4) change the parent cid of all the snapshots to the cid of the new disk


0
 
LVL 21

Expert Comment

by:za_mkh
ID: 24466059
It wasn't our intention to scold you Alpha-lemming. That wasn't the point. The point was we  didn't know what type of backup environment you had .. there are lots of users on this forum that use snapshots as their only backups! And we have seen the types of disasters that occur when somebody use snapshots as a permanent backup tool.
In any case, please don't take offence. I'm certain none of my fellow posters tried to scold you. I know I didn't.
But thank you for also posting your solution to the problem which means other people could benefit from it. I know I will ! :-)
0
 

Author Comment

by:alpha-lemming
ID: 24467730
Ok, sorry for being so cranky. Too much coffee....
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Windows Update not working 12 71
Vcenter 6.5 install Error 8 56
Best RAID for a BDD Oracle 4 22
pros and cons of RDS vs VDI 12 62
This is an issue that we can get adding / removing permissions in the vCSA 6.0. We can also have issues searching for users / groups in the AD (using your identify sources). This is how one of the ways to handle this issues and fix it.
When we have a dead host and we lose all connections to the ESXi, and we need to find a way to move all VMs from that dead ESXi host.
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now