AWS Managed Microsoft AD to AD (x-post /r/sysadmin)

A while ago, we got our Data Analyst drank the cloud cool-aid, and setup a full AWS environment to run 2 EC2 instances.

2 years later, they finally realized that it was just 2 servers sitting in a DC in Frankfurt and that they could have just set up 2 ESX VMs in our DC in Netherlands.

Anyways, we are now looking at a way to move their EC2 instances, and I found out from AWS that there is no easy way to export EC2 Instances to VMWare.

A much brighter guy than me already tried it https://www.virtuallyghetto.com/2013/05/exporting-amazon-ec2-instance-to-run-on.html

and he eventually concluded that you are better off trying with VMWare converter https://kb.vmware.com/s/article/1018015

The problem is that they initially setup a new forest with AWS Managed Microsoft AD (we have a VPN connection between AWS and our domain and a forest trust)

The AD being AWS managed, I don’t have the option to virtualize domain controllers.

I checked briefly the setup (I am not an AWS admin really) but the AWS managed AD servers are not even accessible with RDP and contains GPO and security groups dedicated to AWS.

So my question is: would it be possible to migrate from AWS Managed Microsoft AD to a normal AD? That way we could virtualize an AD server and their 2 EC2 instances and import them in our current vmware cluster.


Related discussions:

It may be, but the problem you’re going to find is that you don’t actually have full control of the AWS domain. You can try and promote a new DC of your own, but I suspect you’ll find you don’t have enough rights to do so..

Without this, you’re stuck migrating accounts to your new domain, unfortunately!

AWS Directory Service is literally AD under the hood. You don’t have access to the OS, but otherwise all your normal tools that you use with AD should work the same.

Setting up one way or two way trust with another domain works fine, etc.

There are 2 computers account for AD domain controllers but these boxes are not accessible…no rdp.

I wouldnt know how to unpromote them as DCs.

I wonder if you could just add a domain controller in your datacenter, let it replicate and make sure its fully functional, and either move the roles or cut the connection and seize the roles, then just clean up the AWS DCs metadata. Treat it like you lost the datacenter and are recovering AD in a secondary site

Let me save you some headache. You’ll never have full ownership of that AWS Directory Services Microsoft AD deployment. There is no current scenario where you can deploy you own domain controller to the domain. There is no current scenario where you get Domain Admin privileges. If you can think of a way where you can take control of a domain without having domain admin or access to a domain controller, then you still don’t have a shot because Amazon locked down whatever you were thinking of doing. You can configure and deploy a new on-premise forest/domain and then do a forest trust to your AWS DS Microsoft AD and continue to be functional, but you’ll always need the AWS Directory Services around. Not sure if there might be some AD object export functionality out there, but bottom line, you won’t keep the same domain.

Wow, he was spending allot of money for two machines. Those AD instances aren’t cheap. I would recommend a VPN and then join those machines to your domain.

With a VPN u could build your own DCs

Sounds like a good opportunity to begin using config management so you don’t have to “export and import” vms anymore. If you really hate AWS that much, just have your analyst recreate the VMs from scratch in your DC and use ansible or similar this time. Infra as code means no more headaches the next time you need to migrate.

No real advice on the AWS AD, can you just use existing tools to export objects to your on-prem AD?

AWS Directory Services, Active Directory is fully managed. So you will never have access to the underlying machines, you won’t have domain or enterprise admin rights, you only have delegated rights to an OU within the directory. If you need to migrate, two machines are not a big deal. Move them and join them to a new domain. If you have a lot of objects, then you can do a forest trust and migrate the objects to a new domain. Long and the short is, you will need a new on prem domain in order to stop relying on the Directory Service.

Run this like a normal cross-domain server migration/consolidation.

V2V the EC2 instances with VMware converter, bring them online on your network, move to your domain, move/migrate users & groups to your domain, kill the two-way trust.

Done deal. It shouldn’t matter that the AWS AD is a black box. Just migrate off as you normally would.

Yes this is exactly what I will advise we do to management, thanks /u/redyouch

Thanks actually we don’t have any object, the separate forest was created to separate the management domain realm but in reality these servers (thanks to the forest trust) only forward authentication requests to our corporate Domain controllers, the front end web server gets user credentials, people use their corporate credentials, the web server then forwards to our own DCs.

So I guess once we moved their 2 servers, join them to our domain, it is just a matter of rewriting the code to handle authentication.

Just wondering once the EC2 instance is converted, how would you move the VMDK, I was thinking of creating an etxra disk on the 2 EC2 instances to create the VM but then we would have to copy the files, does Amazon provide tools for that? I think our VPN connection is very limited in terms of bandwidth so replication the VM with converter would take ages.

Run VMware Converter and export as in Workstation (flat-file format). Copy down with whatever way you see fit (SFTP, etc.).

No matter what method you use, you’re going to have to move your data from AWS to on-prem somehow. That’s the cost you pay…

Maybe saying no more headaches is the wrong way to put it. IaC is about being more organized, being able to reproduce everything you’ve done. It’s about documenting the exact setup needed. Once you do it once and have it in source control, updates are easy and systems can be completely recreated with a click of a button.

Updating for a new environment should be mostly trivial too. Days of work as opposed to weeks of work.