Virtualization - DC restoration with VHD

Hello.

In case one of my virtual DCs died and I have a copy of VHD file and system state backup, is it possible to create a new VM (VMware vSphere) with this VHD file, restore system state backup and make it working as before without any replication issues and other issues? If yes, how?

Thank you.
LVL 13
Hello ThereSystem AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I would just create a new DC on VMware and add AD roles, and replicate.

remove metadata for failed DC.

otherwise you will need to convert VHD to VMDK.... it may not boot and give you issues with replication!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hello ThereSystem AdministratorAuthor Commented:
I would never use VHD, unless I read this article on Microsoft TechNet:

If a working copy of the VHD file is available, but no system state backup is available, you can remove the existing virtual machine. Restore the existing virtual machine by using a previous copy of the VHD, but be sure to start it in Directory Services Restore Mode (DSRM) and configure the registry properly, as described in the following section. Then, restart the domain controller in normal mode.

That's why I am asking.
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Jason CrawfordTransport NinjaCommented:
I apologize if I misunderstood.  Either method mentioned thus far is valid, I guess it would just depend on the state of AD at the time the restore is performed which would be more appropriate.  If you already have a system state why even mess with the VHD?
Hello ThereSystem AdministratorAuthor Commented:
I am supposed to find a solution in case described above. So any suggestions, step-by-steps are welcome!

A new Windows Server installation seems to be a little time consuming so I am trying to find a solution to have the server back with all running applications installed, not in hours but in dozens of minutes.

Am I getting it right that if I had a VHD file or file like this I would have AD, system state, installed software, installed roles and features etc. back immediately? Without installing them again? This is my aim. Don't do steps that aren't necessary. Doesn't really matter how I achieve it.

I am not much experienced with VMware so any help appreciated.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Ah , well if it has applications installed on a DC, that's not recommended.

It takes us, seconds to deploy a Windows template, and then adding AD role, is very quick, and replication will take as long as it takes depending on how many records you have. So we can deploy and create a VMware Windows VM with AD role in minutes.

The biggest issue is the VHD contains, non-VMware hardware, so really needs to be converted to a VMDK with the correct hardware.

The following will convert the VHD to a VMDK, to use with VMware, but this may not boot

https://www.starwindsoftware.com/converter

Am I getting it right that if I had a VHD file or file like this I would have AD, system state, installed software, installed roles and features etc. back immediately? Without installing them again? This is my aim. Don't do steps that aren't necessary. Doesn't really matter how I achieve it.

This is true, and if you were to use Hyper-V or Virtualbox which understands the hardware and VHD it would be quicker, but AD replication may be broke!

otherwise try converter to VMware, but this just changes the format so it an be recgonised by VMware, it may be useless.

What you are trying may not be possible from a software copy.
yo_beeDirector of Information TechnologyCommented:
There are some assumption being made that there are two or more DC's in your environment.  If that is the case then what Andrew has suggested is probably the best and cleanest way to go.  The only issue you may have and it is not a big one are the FSMO role locations.  If the DC that failed or has been compromised held all the FSMO roles then you will need to seize them.

https://support.microsoft.com/en-us/help/255504/using-ntdsutil-exe-to-transfer-or-seize-fsmo-roles-to-a-domain-control

Now if this is your only DC and you can add a second one without any issues regarding licensing compliance I would do so and use Andrews suggestions for recovery.  

If you are not able to add a second DC to your environment you will need to have a complete backup (Not an image backup) of your System State to do a Non-Authoritative Restore. You can use Windows Backup (native to the system) or a third-party that has AD awareness  and can backup the system state.

https://technet.microsoft.com/en-us/library/cc816627(v=ws.10).aspx.

You cannot and should not use a snapshot as a backup/restore method for Domain Controllers.

http://www.itprotoday.com/virtualization/never-snapshot-domain-controller-here-s-why
https://dirteam.com/paul/2011/01/14/restoring-a-dc-from-a-snapshot/
Hello ThereSystem AdministratorAuthor Commented:
Thank you for that info!

I am still trying to get into this.

We have 2 DCs. I am aware of seizing FSMO roles.

So the cleanest solution is to have a template of Windows server (on external HDD or as VMware file? How to get it?).
What to do next? Install roles and features? Restore the system state backup? Let it replicate?
Is there something I shouldn't do or I shouldn't forget?
Hello ThereSystem AdministratorAuthor Commented:
Looks like what I need. Give me a time to get through it.
Hello ThereSystem AdministratorAuthor Commented:
Sorry for this maybe utopian solution, I am still learning... But I really need a solution to have my DC back asap. Really. Every single minute is important.

Andrew, you are the real expert here so you might be able to help me with this. Does exist something (even not recommended) that you turn off your server, save the state of it and use it later fully working with applications installed? E.g. you run a one week old virtual server in DRSM, perform a restore from backup and let it replicate? For VMware?
If not, I am going to start working on your solution with WS template.

Besides, is it a an idea of performing the restoration process from system state backup taken by previous WS after deploying the template of WS and installing needed roles and features that terrible?
I mean... most of files that a system state backup contains aren't replicated from other servers. And this seems to be a good way how to put my server together.
Yes, I realize that the template is in fact a new server, but still... Even if this is not recommended I've read that in certain situations it is possible.

Thank you for your patience.
yo_beeDirector of Information TechnologyCommented:
It sounds like you need a backup copy of your AD. If you need a backup plan you cannot use an old offline server as a backup. You should run Windows Backup (builtin to windows server OS) or a third party backup solution that uses an agent on the server. This is the only true way to backup a DC. With that backup you can run a  non-authoritative restore. All the things being said here I did outline in my previous reply.

It sounds like you
Hello ThereSystem AdministratorAuthor Commented:
Yes, it sounds and I don't. :D

Thanks anyway.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Andrew, you are the real expert here so you might be able to help me with this. Does exist something (even not recommended) that you turn off your server, save the state of it and use it later fully working with applications installed? E.g. you run a one week old virtual server in DRSM, perform a restore from backup and let it replicate? For VMware?

Yes, but you have to have the data in the correct format, and sadly you do not. You have a VHD which is not VMware compatible.

Hyper-V works with VHDs.

Again, it's very quick to have the server installed, AD role installed and AD replicated.

BUT, is your requirement DC back online, or these applications back up and running.
Hello ThereSystem AdministratorAuthor Commented:
Is it OK to perform a system state backup on a new server with identical virtual hardware?
yo_beeDirector of Information TechnologyCommented:
Did you clone the machine and want to take a backup?
I do not think this will work.

You need to follow this article to do what you want to do.

https://technet.microsoft.com/en-us/library/cc772519(v=ws.10).aspx
Hello ThereSystem AdministratorAuthor Commented:
Thanks.
Hello ThereSystem AdministratorAuthor Commented:
I don't have time to test it now. Hope you are right.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Virtualization

From novice to tech pro — start learning today.