Learn about opening and using Visual Studio on the virtual machine you created.
- [Instructor] If you click Pin to Dashboard, then your virtual machine will show up on your dashboard. We see our VM right here. Clicking on that will bring us to the Overview page for the virtual machine. I've let this run a couple minutes so that we can see that the graphs are showing some useful information. CPU usage, especially disk byte for disk usage, a little bit of network usage, and so forth. What we want however, is to connect to the virtual machine so that we can use Visual Studio.
We'll click Connect, and that's going to download a file to our Downloads folder with an RDP extension for remote desktop. Let's open that up, show it in the folder, and there is our jl-vm1, double-clicking on that will bring us to Enter your credentials. If it asks for your Microsoft credentials, go ahead and click More choices, and that will let you enter any credentials you like.
I'm going to enter the credentials that I created the virtual machine with, which you'll remember was jesseliberty and than the password that I used when I created the virtual machine, and I'll let it remember me. Once again, you don't want to do that in a public computer. We'll click Yes, and it brings us to our remote desktop. Give it a moment to settle down. Once you're logged in, which it will do for you automatically, it's going to ask what network you'd like to be on.
Do you want it publicly available? It really doesn't matter what you choose for this exercise but generally you're going to say Yes, if you're not at a public computer. Now we're at our remote desktop. Notice on top, that we can see the IP address of the remote desktop. We can pin this in place or let it move off of the desktop. What we care about here is Visual Studio 2017, let's come over to that and double-click to bring up Visual Studio 2017 in the vitural machine. Now because this is a virtual machine, it can take a few minutes for this to come up.
When Visual Studio comes up, it's going to treat it as a brand new usage of Visual Studio because as far as this virtual machine's concerned it is brand new, so we're going to go ahead and sign in. Here I'm going to sign in to my Microsoft account, because remember, I'm in the virtual machine. So I'll go ahead and put in my email address, as soon as I do, it's going to redirect me to the Microsoft account sign in page, and I'll sign in, and now it's going to setup Visual Studio for me.
Visual Studio goes through the preparation for first use, and if we look around the VM, we notice that there are the standard installed applications, but it is also added because we said Visual Studio in the virtual machine it has added Visual Studio for us. So we'll give it a few minutes to get started. Once Visual Studio does come up, it's indistinguishable for what would be on your desktop because in fact it's on the virtual desktop.
We're going to go ahead, just to see that this is working, and create a new project. So we'll click File, New, Project. Microsoft will initialize its templates, that again can take a couple minutes, and we're now ready to use those templates to create an application. Let's create a very simple Console App. We'll leave the default name of ConsoleApp1, we'll say OK, it's going to create our project within Visual Studio on the virtual machine, and notice that ConsoleApp1 is simply going to display Hello World.
Let's go up to Debug, Start Without Debugging, the application will start up, and sure enough, we see Hello World displayed. So we know that Visual Studio on our virtual machine is working as we would expect. Let's go ahead and close the display, and we can in fact close Visual Studio. We're back to our virtual desktop, let's minimize that, come back to the dashboard, and we should see a little bit of extra activity in our graphs.
If we want to see specifically what's been going on, let's come over to the menu, click on the hamburger to open things up, come over to the Activity log and click on that, and here we have our operation is Write to the virtual machine, Succeeded, and it gives us some information about the specific activities that have been happening in our virtual machine. You can download your log, you can narrow the time span, or other criteria for what you see in that log.
The next step is that we can shutdown the virtual machine. Let's close the logging, come to our virtual machines entry. Here's our virtual machine, come over to the three dots, and we're going to Stop the virtual machine. That will stop but preserve the virtual machine. Notice that it's Deallocating the space for the virtual machine, and this too can take a couple minutes.
And then, the status changes to Stop and the virtual machine has been deallocated. Let's go back to the Dashboard by clicking on the hamburger and choosing Dashboard, and we see that our virtual machine is Stopped. If we click on it, we come to the Overview, and we can once again review the activity that we did have with the virtual machine, and in this menu at the top, we can choose Delete to go ahead and delete the virtual machine all together.
Click Yes, and Azure will go ahead and delete that virtual machine, and once deleted of course, you will no longer be paying for its use. Notice that we get a notification that it's has been successfully deleted, and if we go back to the Dashboard, which we can do by clicking Microsoft Azure, we see that our VM has been Deleted. We can remove that from the Dashboard by simply hovering over it, coming up to the x, clicking the x, and it's gone from our Dashboard.
We have at this point a number of services that we have put under the same resource, and that it's time to cleanup. So let's go to our Resource groups. The top entry is our resource. If we click on that, we get an Overview and a list of the ten items that are in that Resource group. We can come up and delete them one at a time, or we can click here to open the context menu for the entire resource, that is the entire group of resources that we have given the same name, and click Delete.
As a safety check, it's going to want you to enter the name of the Resource group, which in this case is jl-aspnet1, and notice that that name is shown to you in the Are you sure you want to delete jl-aspnet1, so you only need to copy that name right into the box, we get a check mark, indicating that that is a match. Once again, it shows you there are 10 resources in the Resource group that will be deleted.
That's exactly what we want. So let's go ahead and click Delete. This also takes a few minutes while it deletes the Resource group, as you can see in the upper right. While we're waiting, notice that I have five notifications. We can click on that and see the notifications, and we see here that it did successfully delete the virtual machine. You'll remember that we did that, stopped and then deleted it, and now we're in the middle of deleting the Resource group.
Once it's deleted we're notified, note that in the upper right-hand corner, and it disappears from the list of Resource groups. So we have cleaned up all of the work we have done, and we're ready to go on to the next area of Azure.
Released
10/12/2017- Examining and personalizing the Azure portal
- Creating an app service
- Creating an ASP.NET application with Visual Studio
- Viewing your published app
- Creating a virtual machine
- Triggering Azure functions
Share this video
Embed this video
Video: Visual Studio on a VM