Avatar of Mark Owens
Mark OwensFlag for United States of America

asked on 

restore snapshot of vcenter...oops vcenter is gone

So...while on holiday shutdown and after installing some network infrastructure I decided while home and bored I'd move my vcenter and sql servers from local drives to network drives with hopes of enabling HA and what not.  My first attempts were to 'migrate' but the problem with that is the VM needs to be powered off and the VM's to be migrated are vCenter and SQL server so if they're off I can't exactly migrate them since I have no vCenter. Thus I tried cloning which worked but I did something I didn't want to do so I killed it and started over and then thought I should just 'move to another data store' except that this copies everything including all snapshots which was taking forever so in the process I thought hey just kill it, delete what's on the nfs share and go back to cloning. Catch my mistake??? I wind up deleting what was already moved which turns out was the .vmx file so when I went to add it into inventory there was no .vmx file to use. Of course I immediately realized I 'moved' files and already deleted them. I'm left with intact snapshots (I think) and an intact vmdk thus I need the simplest way to get the vCenter back online. Still have a few days left of holiday shutdown so I"m good. H E L P !!!! Thanks!
Microsoft Server AppsVMwareWindows Server 2008

Avatar of undefined
Last Comment
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Avatar of Mark Owens
Mark Owens
Flag of United States of America image

ASKER

Since my DB is external would it be simpler to install another windows server...and then restore the system data...If that's easier what would be the steps. in other words, 1.) install MS server, 1a) does the hostname have to be the same? 2) install backup client, 3) install vcenter app and SQL DSN, 4) restore system state. I'm guessing the above steps so if anyone knows the process it would be helpful.

Another thought can you manually rebuild a .vmx file. My sql and vcenter servers are exactly the same build but different apps, add it to inventory and it grabs the vmdk file with no issues. Yeah, I hoping for something this simple.
Avatar of Mark Owens
Mark Owens
Flag of United States of America image

ASKER

Hmmm, it's Saturday with little activity. I found out how to recreate the vmx file. Still an issue as it turns out the move files to another data store is still working (thought I canceled it) and  yet files were deleted earlier. I'll have to just wait to see what happens with that. I'm looking at the vmdk files and I think I deleted the original. There is a 67GB snapshot so I think I'm back to the beginning where I need to figure out how to initiate a restore of that...

All suggestions still welcome.
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
see my EE article about snapshots


HOW TO: VMware Snapshots :- Be Patient

do you have all the virtual machine files (parent and snapshot files)?

can you screenshot the datastore of all the files?
Avatar of Mark Owens
Mark Owens
Flag of United States of America image

ASKER

I'll check but can't be sure since I didn't realize I was deleting files. I'll get back with you later.
the easiest way out of this mess, would be to create a new virtual disk for vCenter server, by merging the snapshot files with the parent, and create a new clone virtual disk.

This can then be added to a new virtual machine, e.g. new VM created and this disk added.

the command is:-

vmkfstools -i <most recent snapshot file name> /vmfs/volumes/<temp folder name>/<newfilename.vmdk>

if you screenshot the datastore, I can give you the exact command to use, and providing you have all the files available, and the snapshot chain is entact,. you will be able to create a new cloned vmdk.
Avatar of Mark Owens
Mark Owens
Flag of United States of America image

ASKER

I thought I sent this earlier something didn't work. Anyway since the files were moved the snapshots have the same date however the 67GB is from 12-14-12.

Thanks
datastore-snapshot.pdf
Avatar of Mark Owens
Mark Owens
Flag of United States of America image

ASKER

Hey one more thing...I'm going to refer to your solution as scenario A and my frazzled thought process as scenario B.

In scenario B, I've installed Windows 2008 server, reinstalled vCenter, have given it the same host-name of the vcenter server in question and will clone it and run through different scenarios with it while I wait your update of the 'exact syntax to restore my snapshot'.

In scenario A however, I have a question...what happens to all the changes that occurred after 12-14 if the snapshot restore is successful? There were many changes made to 10+ hosts with respect to upgrading esxi hosts, adding new VM's etc.?

In scenario B I've already reconnected to the DB, launched my vshpere client, connecting to vcenter. I see all my hosts although they show disconnected yet at least I can add the users, groups back and start the vCenter from scratch.  

Yet, if I restore my original back to 12-14 and everything gets 'magically' updated from each host that would obviously be the better route.

Please advise...and thanks
Avatar of Mark Owens
Mark Owens
Flag of United States of America image

ASKER

okay one more...I've read through your articles and some others and first let me say that this was built as simply a central mgmt function with 'Hope' of implementing the higher functions of resource pools, HA, etc. Which is exactly how I put myself in this mess. After reading the article on snapshots and having several of them contrary to what the article says it may be fact that I can't get back to the way things were. That said would it be wise to use the original DB and a new vcenter (I've noticed with each host I re-register my license count decrements from where it was originally, i.e. I had 150, at time of crash/and time of new vcenter reconnect it shows 57, so I'll run out of licenses if I proceed like this. Thus should I re-create DB, vCenter, add licenses and go from there....Ugh this is quite ugly.
that pdf screenshot shows a VM with snapshots.
Avatar of Mark Owens
Mark Owens
Flag of United States of America image

ASKER

okay, but you said you'd give me the exact syntax to use and you also refer to 'All' snapshots in the chain to be there. I can't assure you that all snapshots are there.

I defer to you...
have you removed any snapshot files, if you have deleted any snapshot files the chain will not be complete.
Avatar of Mark Owens
Mark Owens
Flag of United States of America image

ASKER

exactly. I can't thank you enough and your reference to other articles leaves me with some studying for best practices. I had this up and running for a year and it was in haste to cancel/killing  the move (thinking it was a copy) and that has been more than costly.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Windows Server 2008
Windows Server 2008

Windows Server 2008 and Windows Server 2008 R2, based on the Microsoft Vista codebase, is the last 32-bit server operating system released by Microsoft. It has a number of versions, including including Foundation, Standard, Enterprise, Datacenter, Web, HPC Server, Itanium and Storage; new features included server core installation and Hyper-V.

86K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo