Solved

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

Posted on 2009-05-16
7
464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
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…
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

734 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