Forum Discussion
Exporting a single virtualized W2012 r2 Hyperv guest
- Aug 22, 2022
With only a single domain controller, USN rollback isn't something you would need to worry about - so long as you're not working with snapshots/checkpoints (and you shouldn't be.)
Don't use Hyper-V Replica replication for domain controllers - not ever. Nothing good can come of this.
Conversely, what you can do is leverage the "live migration" functionality but you need to understand how to set up things like Kerberos Constrained Delegation for this.
Domain controllers (plural, which doesn't apply to you but I'll mention this anyway) - by design work in a multi-master replication model at the application layer - which is always preferable to any kind of half-baked hypervisor or hardware-level replication (a common mistake I still see to this day in infrastructure architectures.)
Instead of using Hyper-V replication, you'd pursue the option I mentioned previously and create a new domain controller on the new hypervisor. Those two domain controllers would replicate amongst themselves, and once both report as being up-to-date, you'd simply demote the old 2012 R2 domain controller.
I'm not clear on what you mean by "backup", but it sounds like you're not familiar with PowerShell (please correct me if I'm wrong and I can speak to other PowerShell-based options), so if you're using the Hyper-V management console, then you'd be using the "Export" virtual machine and "Import virtual machine" options.
The optional tip I provided relating to the names of the virtual switches is still relevant independent of any migration approach.
If you are going to use the export/import or live migration models, you would be wise to shut down the domain controller guest first, then export and copy it across (I wouldn't strictly move it unless it's using the live migration option) and finally start it up on the new hypervisor (fixing any misaligned settings beforehand.)
If I were going to migrate the guest from the old hypervisor to the new as-is (which I wouldn't - I'd pursue the new, additional domain controller approach), I'd only remove the stopped original domain controller guest from the old hypervisor once the guest on the new hypervisor is confirmed to be working.
- Export and import virtual machines | Microsoft Docs
- Set up hosts for live migration without Failover Clustering | Microsoft Docs
Cheers,
Lain
LainRobertson ... thanks for the advice....there is some comments out there it is not adviseable to export a guset VM if the guest VM is a AD server. They mentioned it is something to do with rollback USN. I am unsure i can proceed since I only have an AD server.
There is also another option: Hyper-V replication.. I assume if I were to replicate my VM guest to another Hyper-V server, I should have the same Hyper-V manager version? Also, am unsure I can use another Hyper-V manager, hosting another running VM guest to be a replica server as well.
So, bottom line, can I export a single VM guest hosting active directory to another storage as a backup, or , setup a replica server in another Hyper-V host.
I am sorry to post these questions as I am a newbie with Hyper-V and the information is sometime conflicting...
Appreciate any help
With only a single domain controller, USN rollback isn't something you would need to worry about - so long as you're not working with snapshots/checkpoints (and you shouldn't be.)
Don't use Hyper-V Replica replication for domain controllers - not ever. Nothing good can come of this.
Conversely, what you can do is leverage the "live migration" functionality but you need to understand how to set up things like Kerberos Constrained Delegation for this.
Domain controllers (plural, which doesn't apply to you but I'll mention this anyway) - by design work in a multi-master replication model at the application layer - which is always preferable to any kind of half-baked hypervisor or hardware-level replication (a common mistake I still see to this day in infrastructure architectures.)
Instead of using Hyper-V replication, you'd pursue the option I mentioned previously and create a new domain controller on the new hypervisor. Those two domain controllers would replicate amongst themselves, and once both report as being up-to-date, you'd simply demote the old 2012 R2 domain controller.
I'm not clear on what you mean by "backup", but it sounds like you're not familiar with PowerShell (please correct me if I'm wrong and I can speak to other PowerShell-based options), so if you're using the Hyper-V management console, then you'd be using the "Export" virtual machine and "Import virtual machine" options.
The optional tip I provided relating to the names of the virtual switches is still relevant independent of any migration approach.
If you are going to use the export/import or live migration models, you would be wise to shut down the domain controller guest first, then export and copy it across (I wouldn't strictly move it unless it's using the live migration option) and finally start it up on the new hypervisor (fixing any misaligned settings beforehand.)
If I were going to migrate the guest from the old hypervisor to the new as-is (which I wouldn't - I'd pursue the new, additional domain controller approach), I'd only remove the stopped original domain controller guest from the old hypervisor once the guest on the new hypervisor is confirmed to be working.
- Export and import virtual machines | Microsoft Docs
- Set up hosts for live migration without Failover Clustering | Microsoft Docs
Cheers,
Lain
- Eric_wongAug 22, 2022Copper ContributorBrilliant ...informative....since there is only 1 virtual DC , I suppose I can do the export/import route since USN rollback does not applies to me...Actually, I am not that keen on replication because the other Hyper-V server is an old server with mimium specs. Furthermore, there is no option to upgrade the HDD, RAM and CPU. My boss wants to decom this server as the data has moved to Sharepoint. Basically, my idea of exporting the guest VM is to 'backup' . I will import this VM when the running VM runs into issues. Do you think this is feasible ? I also plan to run this exporting process while the DC is running, is it ok to do so?
- LainRobertsonAug 22, 2022Silver Contributor
I'd recommend not exporting and importing a VM if it's having issues, as depending on what those issues are, you're just going to migrate the issues across to the new host.
I wouldn't personally migrate the guest while it's running, but then I'm quite risk-averse. My process for a single host on poor hardware would be to do the following out-of-hours:
- Shutdown the existing guest;
- Export it;
- Copy it across to the new host;
- Import it;
- Start up the copy on the new host - assuming there's no outstanding configuration issues to resolve (you'd want to resolve those first);
- Once the new guest is confirmed to be working properly, you could consider removing the old original copy.
The rollback process would simply be to stop the new copy of the guest on the new hypervisor and start up the old guest on the old hypervisor.
Cheers,
Lain