Microsoft Azure AZ-801 — Section 15: Migrate on-premises servers to Azure Part 3

Microsoft Azure AZ-801 — Section 15: Migrate on-premises servers to Azure Part 3

90. Creating an assessment using Azure Migration

I now want to look at how we can create an assessment of our on-premises virtual machine into Azure.

So, what is the idea of an assessment? Well, the idea is that if I am planning on moving a virtual machine from my on-premises environment into the cloud, I want to assess cost and all of that stuff. So, the purpose of an assessment is to help me figure that out. If I had to go and make an argument that, oh, it’s a good idea for us to move into the cloud because of this, that or the other. This assessment is going to assist me in that. All right.

Here we are on portal.azure.com. Of course, I can go to the menu button, go to all services and search for Azure migration. I’ve already got a little button right here that I’m going to click and then I’m going to go to servers, databases and web apps. And my assessment or my discovery has occurred.

So, you can see I have two servers discovered, one of them being the appliance and one of them being the server. I would actually want to migrate, but I’m going to go here to assess and I’m going to assess to if I was going to move this into an Azure VM.

So, we’ll go there. This is a discovery source is from my appliance assessment type is Azure VM. We’re going to click Next. Okay. What do you want to call the assessment? I’m just going to call this server 2018 migration. This is all right. Give it a group name. Yes. I’m just going to call this the migration group. All right. For always lack of a better name. And then the appliance is right there listed. And then I’m going to I would want to migrate my 2019 server.

So, we’re going to click Review and create. And I’m going to click to create. All right. And I will go ahead and pause recording while that’s being created. All right.

So, the assessment didn’t take very long. Ran through pretty quickly. I’m going to click on groups right here, and then I’m going to click on assessments. And you can see the assessment is right here. And if I click on that, it’s letting you know, Ready for Azure storage monthly cost is 5.9, they’re telling you and then compute would be 14.17 and then storage 5.89. And then they’re mentioning the if I click on this, I can get a little bit more information looking at the storage and the monthly cost here and it tells you the standard VM size that I would need 128 gigs of storage.

So, monthly computer computing cost. And I can click on that gives me a little bit more information. All right. And so keep this in mind. I could print this stuff out. This is something I could bring to my boss or something like that if I needed to make some arguments on moving. Moving this into the cloud. Right. So, this machine is suitable for lift and shift right into Azure.

So, everything is go basically for me to do a migration into Azure with this, but that is how you can perform an assessment of the virtual machine that you plan to move to the cloud.

91. Removing AD from a DC in order to perform migration

All right, now to perform an Azure Migrate, we are going to have to download a migration tool. And one little tidbit of information that I didn’t realize because I had never tried to do this on a DC before, is that this little tool will not work on a DC and they don’t really advertise that a whole lot until you try to run it.

So, I am going to have to do something a little crazy. I’m going to have to remove Active Directory off of my DC and just make it a regular server so that we can do this migration. But the thing I am going to do to kind of save us here is in Hyper-V, I’m just going to create a new checkpoint. I’ve deleted existing checkpoints which is merged and I’m going to create a new checkpoint of this DC right now. And then when I’m done with this migration, we’re done with all these lessons, I can just revert back and I’ve got my DC back to the way it was.

So, we’re going to go ahead and create a checkpoint right now. All right. So, I’m creating the checkpoint, and then I’m going to go ahead and just remove Active Directory off of the server, which will then allow us to. Continue, and then we can do the migration. And we should be good to go at that point. All right.

So, here we go. We’ve created our little checkpoint and the server is up and running here. And now we are ready to remove Active Directory off of the server. So, we’re going to go up here to Server Manager, manage. I’m going to say remove roles and features next. Next. And right here, Active Directory Domain Services. So, we’re going to go ahead and uncheck that. And. Of course, Active Directory doesn’t really like being removed, so actor actually needs to be demoted. Right? So they want you to demote the domain controller. We’re going to click that little link and almost say force the removal of this domain controller. All right. And. This is, unless this is the last door in the domain, you must perform metadata cleanup. That’s fine. This is the last domain on the domain. So, it’s fine. Proceed with removal. I’m going to put my password in. Going to click Next. And demote. All right.

So, I’m going to go ahead and pause the recording while that’s happening. Okay. After the reboot here. I’m in Server Manager Remove roles and features. And I’m going to take off. AD DS now. And since I’ve demoted the machine from being a domain controller, that shouldn’t give me any hassle. And restart automatically if it needs to. And I’m going to go ahead and click remove and I will pause recording while that’s happening. Okay. The reboot is done after it finished removing Active Directory. And let’s go Tools and go to Hyper-V manager. You can see my virtual machines are still running here. My migration appliance, I can connect into that. All right. And. The only other thing I need to do here is just check a couple things. Because we’re no longer part of a domain.

So, I want to go back over here to edit credentials. And it’s no longer going to be exam lab practice. It’ll just be.\ administrator and then the password. Will be password. My normal password that I use in my little lab environment here. And then. Well, I’ve got some case sensitive stuff in there, too, but. So, from there. All that looks fine. I am going to tell it to revalidate. Just to make sure that everything looks good. It looks like it did revalidate just fine. So, all that looks fine. The discovery still looks solid there. And so I think everything is good.

So, we’ve officially got rid of Active Directory, which is what we needed to do in order to move on.

92. Migrate by using Azure Migrate

Now, real quick, before we get too, into this migration, there is something we want to enable on our server 2019 virtual machines.

So, you would you would have to connect into your server 2019 virtual machine in order to do this. And then you would click start and then go to settings. And then from there just type the word remote and you’ll see remote desktop settings and you can turn that on, says, “Do you want to enable this remote desktop settings?”

So, now that I’ve got that turned on, I am able to remote desktop in it. And the reason you want to do this is because once the server is migrated into the cloud, you’re going to want to have remote desktop enabled. So, if you want to try to connect into it and configure it and all that you can, All right.

So, that is how you turn on remote desktop, on the server, on the server 2019. All right. Let’s go through the process now of seeing how we can perform a migration.

So, here we are on portal.azure.com, we are on our server. That is, by the way, that is our Hyper-V server. This is NYC-DC1, which is not ADC. We’ve removed Active Directory, but you can see that we’ve got our appliance here. But what we really care about is the server 2019 box that we would want to do the migration for. Right? So we’re on portal.com, we’re going to go to the Azure Migrate. And we’re going to go to servers and database and web apps, servers, databases, web apps. We’re going to scroll down to the bottom. And this is where our migration tools are available. We’re going to click Discover. All right. And then drop this down and click. Yes, we’re doing Hyper-V, and it tells us that in order to do this. We need a tool called the Azure Site Recovery Provider installed on the Hyper-V box. It’s going to do replication. Okay.

Now, once we’ve got that installed and everything, we’re also going to need this thing called a registration key.

So, we’re just going to download both of those files. And I’m going to go to File Explorer downloads and you can see the Azure Site recovery provider is available and there’s that little vault right there.

So, we’re going to double click on the Azure Site recovery provider. What an extract that it’s going to pop a little box up on the screen here. And. All right, so this is Microsoft Update, all for security, important updates. I’m just going to turn off updates for now. Specify where you want to install the site recovery provider. I’m just going to take the default and we’re just going to let that install and I’ll pause recording while it’s being installed. All right. You can see that it’s done now and I can click this little button that says Register. All right. And I’m going to browse to the key vault file that was downloaded, which is right here. We’re going to click Next. All right.

Now, it’s a specify how the provider running on the server connects to the Azure Site Recovery connectivity. We verified when you click Next, so connect directly to the Azure site cover without a proxy. That’s what we’re going to choose.

So, we’re going to go ahead and click Next and let it connect. All right. And I’ll just pause while that’s happening. Okay, so that’s done. I’m going to click Finish. Now, the other thing you got to do is refresh your web browser and the finalized registration button should appear. So, if you ever try this and this finalized button is still not available, just try refreshing your web browser.

So, I’m going to click finalize registration now. And as you can see, it’s a start replicating the virtual machines. And I’m going to pause while this is happening. All right. Once that’s done, I’ve just gone clicked home here and going to a couple quick things I want to mention. You do need a virtual network set up to do this.

So, if you don’t if you ever doing this and you don’t have a virtual network, you just click the menu button. You go to virtual networks. And just create one. And you can call it whatever you want. I just create one called Migration vignette. But the process for doing that’s very easy. You could literally just click view and create. All right

That’s how you create a VNET. And now we’re ready to get moving. So, we’re going to click on Azure Migrate here. We’re going to go to servers, databases and web apps. Scroll down to the bottom and we’re going to click to replicate. Says, what do you want to replicate? Servers or virtual machines? Where do you want to migrate to the Azure Virtual machine? So we’re migrating from an on-premises of virtual machine into the cloud. All right. Are these virtual machines virtual? Yes. Are these machines virtualized? Yes. They’re Hyper-V. Import migration? Yes. Apply migration settings from an asset assessment, which I did do an assessment so I can take advantage of that. Cause if you didn’t, you wouldn’t have that option. There’s the server 2019 that’s showing up. We’re going to click Next. And we’re going to use the Migration Resource Group. And as far as asking about a storage account auto create. If you don’t have an auto create option, you can just create a storage account. Just make sure that you disable soft delete on it. But I have this auto create option. I don’t have a license and I’m not turning on SQL. I’ll just choose my v net that I’ve got no infrastructure for availability. And everything else is good. We’re going to click Next. All right. I’m just going to take the defaults here. I’m going to choose Windows, so I’m not going to really change anything here. We’re going to click Next and not going to change anything on the disk either. Um. Don’t believe there’s anything else there needed to select. Yeah, it’s just standard HD, right? Yeah.

So, we’ll click Next. I’m not going to put any tags. And that is it. As soon as I pull the trigger on replicate, it is going to begin replicating and my VM is going to show up in the cloud. It’s a long, drawn out process to get to this point. But now you can see the processes involved in replicating a virtual machine out in the cloud.

Now, once this replication is done and it does take some time for it to get everything out there, depending on how much data you got, you can now trigger the official migration.

So, here we are on Portal Azure. I’m going to go to Azure Migrate, click on servers, database and web apps. We’re going to come down here and click on right here where it says Azure VM. And you can see that replication status is protected.

So, that means that it has officially replicated fully, right? I can click on that. And there we go. I didn’t actually perform a test migration. I can do that, but I’m just going to go ahead and trigger the migration.

So, we’re going to go ahead and click on Migrate. So, shut down virtual machines and perform a planned migration with no data loss. Yes. All right. So, I’m going to go ahead and. And the reason it wants to shut it down, it’s just a little bit safer to make sure there’s no data loss at all. All right. This, of course, would mean that if there is a user who was using the virtual machine, they’d get disconnected. But we’re going to go ahead and click migrate. And it’s going to start the migration and I will just pause the recording while that’s happening. All right. After the synchronization has occurred, I should now be able to go here to Portal.com and click on virtual machines and we should see the server 2019 Virtual Machine is out there in the cloud and ready to be used, so I can click on that. And then from there you can see it’s up and running. Couple of things, though. Number one, it doesn’t have a public IP address. Also, if we click Connect, you’ll see it tells us that the port prerequisite is not met, meaning adding like an inbound 3389 rule.

So, we’ll click Add to that and you’ll see that says the network interface does not contain a network security group. Right? So we have to have a network security group that’s basically going to allow Port 3389 inbound. All right.

So, what we’ll do is we’ll come up here to the menu button. We’ll go to all services and. We’re going to just do a quick search for network security and then you’ll see network security group is an option. All right. We’ll click to create a network security group. And. So, resource group will just say migration. RG And I’ll just say migration. SG All right. West US That’s fine. We’ll click, review and create. Click create and it’s now creating us an SDG.

So, an SDG that’s a network security group that supports IP filters and it basically just controls if we’re going to allow traffic to flow into that machine. So, we’ll click go to Resource. And as you can see, there is not an inbound rule currently for 3389. So, come over to inbound rule. We’ll click Add. All right. We’ll say source, any source port, any destination, any custom service. We’re going to do 33, 89. And allow, we’ll say, allow RDP. It’s going to be the name of it. We’ll click Add.

So, there’s the rule right there. The next thing we’ve got to do is have a public IP address for the virtual machine.

So, we’ll come over to the menu button, go to all services, and we’ll add we’ll just do a search for the word public and you’ll see public IP addresses. We’ll click to create one of those. All right, IP version four. I mean, you can go to the Azure calculator and see the cost of setting up a public address. I’m going to call this server 2019 IP. That be the name of it. And. This is server 2019 ELP. Exam lab practice and then resource group will be migration RG. I’m not going to worry about replication and we’ll click to create. All right.

So, we’re now creating the public IP address. We’ll click the menu button and go to virtual machines. Click on the server tells 19 Virtual Machine. All right. We’re going to go over here to here to networking. And you can see the network interface right here. And we’re going to click Network Security group. We’re going to select the new network security group and click Save. And we’re going to go over here to IP configuration. We’ve got to wait on this to finish. There we go.

Now, I’m going to click on the virtual machine here and or go to the menu. Sorry, and go to resource groups. And click on my migration rig and I’m going to go to my public address. And let me find it. There it is, server IP, and just make sure that I’ve associated which I already have done this, but click associate and I’m just going to associate it to that virtual Nick All right. Which it is.

So, then I should now the next thing I need to do is go to my menu button. We’re going to go to virtual machines and I’m going to click Server 2019. And the IP address is showing up. And I’m going to go. Let’s see. Back over to networking. And there is our network security group that’s there. All right.

So, I’m going to I’m going to add another inbound rule. So, I say add inbound rule, and we will just add that for HTTP, port 80. Allow priority. Let’s see. Anything else? I don’t think there’s anything else. So, we’ll click Add. All right.

So, we just added a port 80 rule to our virtual machine. I’m just going to wait on that to finish. All right. Finally, we can officially test this thing out. If you remember, we set up that server 2019 machine. We set up a little website on it, a little ISE website, and we should be able now to go to this address, this public address and or this DNS address as well that it’s given us. And we should be able to reach that website so we can go to this address or that DNS address, either one. All right. I’m just going to paste this in here. And oh, and lo and behold, it actually works. As you can see, we have gone to the website says this is my VM from on-premises.

So, it has been officially migrated into the cloud. And this is going to conclude the migration demonstration. I know it’s been a long, drawn out process, but we finally made it to this point. Everything is working and we’re good to go. All right.

So, hopefully now understanding the concepts of Azure migration, appliances and all that makes sense. And it does take some time, but well worth it. Making life easier for migrating services into Azure. It’s definitely well worth the trouble once you get it all working. All right, now that I’m done with the migration appliance stuff, I am going to revert my NYC-DC1.

Now, if you remember earlier, I ended up removing Active Directory off of my NYC-DC1 because I couldn’t install the tool in order to do the migration. So, I am going to now revert that checkpoint back. Now, that I’m done with all that. That way I will have Active Directory back on this domain controller.

So, I’m just going to right click and I’m going to tell it to revert. And it is now going to revert back to the way it was. And so at that point, we’ll now have Active Directory back on the machine.

So, as you can see, it’s going through the process of restoring everything back up to the way things were. Prior to removing Active Directory. All right. And looks like we’re at 100%, so I’m just going to connect in. I just want to verify that Active Directory is back to. The way it was supposed to be. All right. Slowly but surely here, booting back up. All right. And looks like it is because it is detecting exam lab practice. The resolution’s a little bit small, but that’s just because I’m logging on. As soon as I log back in, though, it should go. Full screen again. Here. There we are. And I am just going to shut down. The servers. And I’m also going to shut down. NYC, D.C. one and I’m going to just the memory back to the way things were. Which which NYC-DC1 is supposed to have four gigs and then I was giving Server1 for gigs and so I’m just going to take care of that.

So, I’m going to go ahead and just make sure that Server1 is still good. Yes, Server1 still has four gigs and we’re going to make NYC-DC1. Set it down to four gigs. All right. And we’re going to go.