Walk through the process of creating a virtual machine and installing an OS into that VM.
- One of the most fun part of virtualization is making your first virtual machine. Now, we're gonna be using host-based hypervisors, and when it comes to hypervisors, you've got a lot of choices out there. Probably the two biggest names out there are VMware and Microsoft. VMware has a whole bunch of products, all kinds of different powerful tools for virtualization and the only downside is most of them cost money and some of them cost a lot of money. The Windows hypervisors usually come with Windows. If you Windows 7 or Windows 8, it comes with Windows, but depends on the version, but you have some really powerful tools there.
But there are other options out there. Now, the one I wanna show you is a completely free option and it comes from Oracle, and it's called VirtualBox. It's fairly simple to use, it's completely free, and it's a great way to show you how to make your first virtual machine. So let me fire this up. So here we are with VirtualBox and I've just installed it, and there are no virtual machines. You can see on the left-hand side it's completely blank. So let's make our first virtual machine. Now, we've got to give it a name, so I'm gonna call it Timmy. Now, what they're trying to do here is that they want to figure out how much RAM do you need, how much hard drive space do you need, because it's actually gonna be using the physical resources of this computer to make virtual resources.
So all of these guys do things like they ask for the type and stuff like that, not because they really care about you're using Windows but this helps them determine the hardware needs. So on this guy, if I hit the pull down, I can see I'm gonna select Linux there, that's kind of cool. It's got IBM OS/2. Anyway, so I'm gonna actually install a copy of Ubuntu Linux. So I click on Linux and it automatically goes to Ubuntu. However, you can see it's got lots of other Linux distros in there as well. But we're actually doing Ubuntu, so let's leave it as that.
So again, all that's doing is presetting a whole bunch of hardware requirements for us. So hit Next, and it says how much memory? So we can actually configure how much memory this guy needs. It's recommending because we said Ubuntu Linux, it says I'd like to have half a gig, but we can adjust that. You can see I've got a ton of memory in this computer. I can't put in any more memory on a virtual machine than the actual memory I have in the computer. So I'll go ahead and just go with the suggestion. Now, the next thing it says is, you need a hard drive. Now, I know we live in the world of multiple terabyte hard drives today, but we are trying to figure out how much hard drive we actually need, so he's recommending eight gigabytes.
Now, the cool part to this, if you take a look, it says Create a virtual hard drive now, and that's really the file that's being saved. So I'm gonna go ahead and hit Create. Now, this is actually one thing that's kind of unique to Oracle VirtualBox, is that there's a lot of different other brands of virtual machines out there, and what they're doing here is having you, other brands of virtual machines, but we're gonna stick with the VDI, which is, what their file type. And then the other thing is that that eight gigabytes can be dynamically allocated. So if we just install Ubuntu Linux on that virtual hard drive, it's not even gonna take up the full eight gigabytes, it's gonna take up a small part of that.
So we're gonna keep it trunk down and it'll be dynamically allocated. Therefore, that one file's gonna be a lot smaller than even eight gigabytes. And then it says where do you actually wanna put the file? So I don't care, I'm gonna let it go to its default folder, and we now have a virtual machine. Now, the cool part to this is that this is a real virtual machine. Just because we said Ubuntu Linux, we still have to go get a copy of it. If I tried to power this up, we're not gonna get too far.
Now, one of the things it's worried about here, it says I wanna make sure you're clicking inside the window, and if you want to get out, hit the right Ctrl button, so hit OK. Now, this is also kind of nice. It's going, hey man, you don't have any operating system installed here. I need a startup disk. So it's actually looking for my optical drive, which would be a common place for installation media. I'm gonna say start my optical drive, it's empty by the way. And it boots up and it fails, as it should, because there is nothing bootable in here yet.
We've got to actually go through the process of installing an operating system. Now, there's a billion ways to do this. If I wanted to, I could get installation media on my optical disk, and I could make an installation optical disk and put it in there and boot off that, as we just saw, but a lot of times what we'll do instead is we'll take ISO images. ISO images are nothing more than entire optical media images that are just stored as a file, and I've downloaded an ISO from the Ubuntu website. All right, so what we need to do then is tell this new Timmy virtual machine that we want you to boot off of an ISO.
So you've always got all these cool settings in here. So I'm gonna go here under Storage, and you can see that I've got a virtual drive right here, but here is my optical media. So trust me, it took me a little, couple tries to find this, so I go in here and it says, just go off the E drive, which is my actual physical optical media, or I can choose a disk file. So I'm gonna choose a disk file and what I'm gonna do is head over to my Downloads where I downloaded a copy of Ubuntu desktop.
You see that? So I can hit Open, and now instead of actually reading my optical media, it's going to pretend that that ISO file is my optical drive. So I'm gonna go ahead and start it again. Yeah, yeah, yeah. And we are now starting an Ubuntu installation. So I'm gonna let this run for a minute. Now, once I've got the operating system installed, I can do some pretty cool stuff.
Let me go ahead and let this installation finish up, and we're gonna dive back in, and actually look at a working Ubuntu virtual machine under the Oracle desktop. Here's my system and he's once again going through a boot, but I wanna minimize this for a minute and take a look. I even installed a second virtual machine in my attempts to get all this going. Now, now that these are up and running, now we can take a look at a couple of things. In particular, let's take a look at these settings, so I'm gonna look at this other one, not the one that I installed, but the other one that I kinda snuck in, and let's just take a look at its settings.
So when we look at the individual settings, there is a lot of information in here that's kind of important. For example, the amount of video memory that we want to use, but some of the things we're seeing now with virtual machines is for example, we can virtualize sound, we can virtualize USB, all kinds of extra toys like that. Most of these virtual machines require some kind of tool to be installed within the virtual machine itself. So you install a virtual machine, and you get the OS running, and then you have to install some tools to then go ahead and make it all work perfectly, but it works out pretty straightforward, it's pretty easy.
Okay, so everything's up and running, so there are some things we can do with the virtual machine itself. For example, one thing that's really important that we can do is called Take a Snapshot. When you take a snapshot, it's storing the exact state of the system as it is right now, so let's say I'm getting ready to try installing a new piece of software or something. I can do whatever I need to do, and I can store it, so that I have multiple images of this exact same virtual machine. So if I have a problem with it installed or whatever it might be, I can just go back to a previous snapshot, and I'm basically exactly where I left off.
So snapshots are really really important. We can also make some changes on devices. So for example, by default, I had this guy pointing at an ISO, but on the fly, I can change it to say stop looking at the ISO, now I want you to look at my optical drive, or something like that. So that's also a really really handy tool. The important thing to appreciate about your first virtual machine is that you're gonna have to get some kind of virtual machine host. You're gonna have to get some kind of hypervisor, and then you're going to have to install the operating system with that.
But you can do a lot of fun stuff. For example, a lot of people have premade virtual machines you can download and do all kinds of stuff with. You can have virtual machines, particularly in the Linux world, that are set up to be firewalls, for example, and you can download a premade virtual machine that's all set up exactly the way you want it to do that. So we see that all the time. The secret with virtual machines is you're not gonna just make one first virtual machine. You're gonna make a bunch of them. You need to play around with whatever hypervisor you choose to use, and be patient, and join the club.
This Total Seminars course covers the exam certification topics. For information on additional study resources—including practice tests, lab simulations, books, and discounted exam vouchers—visit totalsem.com/linkedin. LinkedIn Learning members receive special pricing.
This course was created by Total Seminars. We are pleased to offer this training in our library.
We are a CompTIA Partner. As such, we are able to offer CompTIA exam vouchers at a 10% discount. For more information on how to obtain this discount, please download these PDF instructions.
- Implementing wireless security
- Threats to your wireless network
- Wi-Fi Protected Setup
- Installing a wireless network
- Cloud ownership and implementation
- Creating a virtual machine
- PaaS, SaaS, and IaaS
- Mobile networking
- Deploying mobile devices