 Hello there, welcome back to Daniel's Tech World on YouTube, Medium and DanielRosal.tech. So for today's video I want to discuss quickly virtualization and what virtualization is. So this is just a quick schematic that I pulled up. So if you're new to Ubuntu Linux and you want to basically run other operating systems and what you can do nowadays, and I'm saying nowadays sort of in a very loose way because this technology is not exactly brand new of the assembly line, but basically you have your computer, so let's say your actual, you know, Linux computer with hardware inside of it, then you have a CPU with hypervisor, and what the hypervisor does is basically allows you to actually give the resources. So your computer contains computer, contains, you know, a central processing unit, it contains a certain amount of RAM, and it contains, you know, other components, your network cards, your graphics card, etc., but you can't really change these. These are fixed. The only way to actually add more RAM to a computer or upgrade from an i3 to an i5 or an i7 processor would be to open up the computer and physically connect more components with your hands. But what you can do with virtualization is basically take a chunk of those resources and the hypervisor will basically allow a virtualized operating system. So you can say, let's give Windows, let's say we have 16 gigs of RAM on our computer, so let's say we're going to create a virtual, Windows virtual machine, a VM, and it's going to have, we're going to grant it access to up to 2 gigabytes of RAM, and we're going to cap its memory at, let's say, 50 gigabytes. So obviously in order to be able to do that, you need to have more than, you need to have more than basically all these virtual machines, so let's say we have a, we can't have a Windows virtual machine with 100 gigabytes of storage when we actually only have, sorry, 500, let's say, we only have 240 gigabytes of storage in the actual computer. So it's less than your resources, but in order to make this magic work, you need a, basically a virtualization tool. So there's a couple for Windows that are, you know, just the standard options basically. Most of these are free, so you don't need to pay to, you know, to use these. The first one is Oracle Virtual Box. So this is actually what I used for, I used this for a number of years, and it's regularly updated, and the other one is VMware, Workstation Player, and both of these are totally compatible with Ubuntu Linux. So to download Workstation Player, you just go for this option, Workstation Player for Linux, and you can see I've downloaded this bundle. You just need to give that bundle file, I think executable permissions, run it over the command line, that'll bring up this installation process, and a few minutes later you'll have your Windows. Then just to install the Windows VM, you just download Windows basically, and you just get that ISO file. It's a big download, it's, you know, something in the region of, it depends exactly now. I'm just picking up this Hebrew geolocal, I can actually just change it here at the bottom. Go to English, of some sort, indeed English is fine, still English, just straight in English. And you can just basically select your, you know, Windows 10, confirm and download that ISO file, and then basically, so you can have a totally free Windows virtual machine in Linux, and the only caveat for Windows is that you can't, because unless you have an activation key to actually activate that ISO, you can't really personalize the computer, but it's totally legal, and it's, you know, it's a Microsoft official download, and it's basically more than enough. So in terms of these two virtual box versus VMWare Workstation Player, this isn't the, I didn't, I'm not an expert, in fact I don't even know that much. I just prefer VMWare, as I said, I've used both, and after a few years I just, you know, kind of moved over to VMWare, and that's now where I do my virtualization. Now the other thing that's easy, so that's how to do Windows. So basically you install your virtual box or VMWare, download your Windows ISO, and then you have a fully functional Windows virtual machine on your Linux computer. The second one that is easy, and that's Android, and there are a few emulators, so I'm just showing you the ones I use personally. So GeniMotion Android Emulator, you can also actually do it in, you can actually use virtual box, just download an Android ISO, but this is, this is nicer, and then just click on the download button, and you can go for this, and again it's a free tool if you're using it for non-commercial use, so this download for Linux here is the one you'd need on Ubuntu, and then you basically create a machine from a template. So Android can be easily virtualized on Linux because of the fact that Android is a fork of Linux, and not actually for that reason more, more that the architecture is similar. Likewise, Windows can be easily virtualized, the ones that cannot be easily virtualized are common operating systems, of course that only really leaves iOS and macOS. MacOS, I really don't have much of a need to do these, I think for macOS there is a workaround, so someone else's video can explain this, so there is a tutorial here. I think iOS is impossible because of the fact that the architecture is so different, because it's for ARM-based processors, so there is one or two ARM-based desktop computers have come to market, and I believe that Ubuntu, certainly Debian has an ARM-based installation, so you can run it on ARM-based hardware, but for your average computer user, virtualizing iOS on VirtualBox on Ubuntu is not going to be feasible, so really your easy options for Linux for virtualization are Windows and Android. I think that's enough for most people, if you're really into mac, then you know you should probably just install Mac. Being able to virtualize Windows so easily has been kind of a game changer for Linux users because we used to have these awkward solutions, like I've been using Linux long enough to remember using wine, and that never worked particularly well, there's other things like play in Linux, none of these kind of things work that well. VirtualBox just gives you an actual Windows machine, so the only thing to point out, and this is why I'm just opening up my task manager here, is to say that basically these use a lot of RAM, so obviously when you're using a virtual machine, you're going to be using the RAM that is in the computer, so you know I have 16 gigabytes of RAM in this machine, I'm going to be building a new computer soon, I'm probably going to go for something more high spec than what I have currently, but you can see how far that's going to shoot up, so we're using, we can see this is memory here, this is CPU, 2,720 megabytes of our, this is basically 16 gigs, so we're using almost 3 gigabytes of RAM and you can see the process is consuming the most memory over here. So I just got ahead and popped up my VMware workstation player, non-commercial use only, and I'm using over here the version 1552, so that's the one that I have currently on my system, now it can be a little bit buggy, I found some bugs about this in terms of you know basically it will when I shut it down, it'll crash the whole system, I've opened a couple of threads about this on the VMware community forums, there's a couple of bugs, but overall I would say it works really well, so you may notice that I actually have an Ubuntu virtual machine here, and the reason you might want to do something like this, there's a couple of other things you might want to do with virtual machines, a popular one is to run Kali Linux, so Kali is used for you know penetration testing and security testing and stuff like that, so it's specialized distro of Ubuntu, a lot of people that are learning cyber tech prefer to actually just keep that as a virtual machine instead of you know because for your day-to-day OS it's easier to just use something like stock Ubuntu, so a lot of people would have a Kali virtual machine and just use boot into that, and so long as all the network interfaces are exposed, sorry so long as all the USB devices are exposed and it's connected over Ethernet on the software level, then it runs exactly like a real computer, and that's the kind of crazy thing about virtualization is they're just really mini computers, so basically if we just take a look here, here's Windows, and you can just click on power on, I've given this 4 gigabytes of my RAM as you can see, and you can actually go in and and again this is a beautiful thing about VMs because they are not real, they're not hardware based computers, but they are computers, it's kind of a weird concept to wrap your head around, but that's how virtualization works, so I can shut it down and once it's cold I can go ahead and give it 8 gigs of RAM, I can decide you know etc, and as I said you're really capped, practically capped, maximum recommended memory that's why it's giving, it's coming up here as 14 gigabytes because I only have 16 of my computer, so even doing that would leave me with only 2 gigabytes of RAM for my host, so this is called the host while you're running the stuff on and this is called the guest, so I'm going to go back to 4 as I had it, but obviously on a real computer you couldn't just use a slider and toggle RAM or add tiny increments, you would need to basically, as I said, unscrew the computer and you know actually put in more. The network adapter, these are all settings, you can actually also toggle how many processor cores it has, I'm not going to go for, and this is important, you can do a shared folder, I have mine disabled but that basically means you can create a folder on your host, on your host on Ubuntu and then basically just drop files and then they'll actually appear in Windows and on the Windows side it will appear as a networked device, so it's very cool and I just actually go ahead and set this up, I'm not sure why it's not set up on this, it might be a new virtual machine, so I use my Windows one for testing out, for the odd time I really need to use something Windows related and I also use it for like, and this is another point about the need for, and this is why I have Ubuntu as a sandbox environment, so let's say I'm testing out software, doing a project review and I don't really trust the product, I don't want to put that on my actual computer, so by putting it on a virtual machine it's kind of using it as a sandbox environment, so it's isolated from the actual rest of the file system, so I'm just going to go ahead and watch what happens to my memory here when I boot into my Windows, so about three gigs at the moment, okay, need to figure this out, and now we're up to, as we're going through the boot sequence, tiny, not really very significant jump, I'm just going to move this over here a bit, the other thing you might want to add or you might need to add I should say is guest tools and if you go into virtual machine VMware tools, so it's kind of specific by the OS, so now look what's going on, we're using Windows and I'm sure the people will be familiar with the Windows interface within Linux, so that is pretty cool, so if I can just get into this, so you need to do, as the screen says, control alt is how you basically escape your keyboard and mouse from the virtual machine, otherwise you're locked within it, so this is my Windows desktop, I was taking a look earlier in the week at fastest VPN for Windows and you can see, I'm surprised my memory hasn't jumped, hasn't jumped higher so far, we can actually toggle in the VMware, and we can see usually there's VMware player, so it might take a little bit to catch up, but the CPU as you can see has gone up to 55, 55% and basically the boot sequence puts a bit of pressure, so that's actually not as bad as it would have expected, it's only spiked a small bit, and you can see the process here VMware WMX, it is consuming 2.7 gigabytes here of memory and 4% of CPU, so now I'm going to go and I'm just going to go ahead and shut this down, you know I'll just minimize it, the second thing that I'm going to show before I end this video is GeniMotion, and as I said GeniMotion is the Android emulator that I use on Ubuntu, so just open my GeniMotion here and you can see I have a Galaxy S10 in this 4040x3040 screen resolution, now if you're installing GeniMotion and I showed you the website then you need to install VirtualBox, that's because it actually basically just runs off VirtualBox, so if I go into my VirtualBox I'll be able to basically see that there is a virtual machine to correspond with this virtual Android device, so we can see by popping into Oracle VirtualBox we have the Galaxy S10 and that corresponds with this guy over here, so GeniMotion is a really really cool tool, what you can do is if you go into, you can create new virtual devices really easily, so just just click on the plus menu here, and you can see look at this it's super cool. You can see the Android version, so Android 4.4, technically it's actually the Android API because that's what it's using to construct these machines, we can go all the way to five, all the way down to the latest version they have which is 10, so just make sure that you are going for the latest, generally you want to be going for the latest Android version, you can go for a tablet, Google Pixel, if I go next year and you can give it a name, choose the native display resolution, as you say you can even select the Android version here, how many processor, memory, kind of a similar process and whether you want to use bridge or NAT for network mode and just go for NAT unless you know what you're doing and you want to use bridge for a different reason, so this is it and watch what happens now, I can just go into the start and again we're using a virtual machine but this time we're virtualizing Android, so just remember these things are heavy so we probably will see a bigger spike and I think maybe that's why I went down to VM where I found that it was easier on the hardware so we've now gone up to four gigs of memory and I think the reason I run into difficulties with virtual machines sometimes is I typically have about a hundred Chrome times open and that's an exaggeration but typically I'm running these with a lot of browser tabs so I'm just running the system cold and we're now up to five gigs of memory but we are currently running two virtual machines, one Android and one Windows, now those virtual machines are both doing basically nothing at the moment but you know once you start running the software on them then clearly they're going to be that RAM overhead is going to add to your baseline RAM overhead, so we can go into them just to see how to curiosity, JennyMotion here, 1% CPU, 216 gigs, I'm not sure that's right there could be another process I'm missing but that's what's showing at the moment in terms of CPU and RAM consumption and the other thing you want to do for this is install, you can see this OpenGApps, so this basically allows you to install your, you know, I've just created a lock pattern, look how cool this is, it's a real Android device, I even configured a lock if I can make this work on my mouse, which I'm struggling with, there we go and I can pull down the notifications and this is all of course virtualized, it's not a real Android computer, it assigns it a, the virtual machine gives it a fake phone number like a virtual phone number and it pretends that it has a data and you can hear maybe the Android notifications going on and if I go into my, call up my apps you know I can go into, I can install apps through the Play Store, I can really associate this with my actual Google account and actually purchase apps with it, the camera clearly won't do anything, I can even spoof my geolocation by going on to GPS and going into the map option and turning on GPS and then selecting where I want to virtually be, this looks like somewhere in Denmark I'm guessing for some reason this is very weird, alright somewhere in Scandinavia but you know so you could, I don't want to say that there are nefarious uses for this but there are and you can go on to like Google Chrome and basically just use this and you can see it's not that slow, it's certainly usable, this is great that if you want to basically test out and I was testing out the VPN for Android yesterday and assessing the speed so this is why I have the YouTube open here on some Sky News Australia but you know it's fully functional and what you can do is just use this to, and I'm just typing in my keyboard here and typing on my keyboard using my mouse but it's as if I'm using a real Android I've taken off the VPN so I'm getting my local geolocation so that's it it's very cool this can be used to test out test products on Android it can be used to actually test if you're a software developer you want to test the app you're developing on Android you can just drop in your APK files here so very powerful very easy to virtualize both Windows and Android on an Ubuntu host so that's really all I have for this video I wanted to just show what's easy what's not and to recap Mac OS and iOS are more difficult but Android and Windows very doable anybody wants to get in touch my website can be found at DanielRosehill.com with two L's and my email is YouTube at DanielRosehill.com so thank you for watching this video