How to setup a Virtual Box

      Why you would want a Virtual Machine
A virtual machine allows you to run an operating system inside of another operating system. While not of immediate value to the average user, it is useful in a number of situations.

      I primarily use it to test out programs and visit questionable websites. For programs, I can run them and see if they do anything useful. All without having them impact my ‘real’ operating system. For websites, same idea. Copy in links from email, or other mysterious sources. Adds a whole system worth of protective layers to what you’re doing. And when you’re done, just discard the changes and you are ready for next time.

      Quick Overview
General Details and links
Installing VirtualBox
Create Virtual Machine Framework
Installing Virtual Linux
Configuring Linux and taking Snapshots
Suggested use of your Virtual Machine



      Safety first: Do NOT burn anything to disc. If you are doing anything with a physical disc for any of this, you have gotten lost and need to STOP IMMEDIATELY.



      General Details
      For purposes of this guide, we will be using Oracle’s VirtualBox (5.1.22) on a Windows Host to setup a Linux Mint Mate (18.1) Guest. General steps should be similar if you wanted to use a different Host or Guest. Also details will change as time goes by and versions change.

      Your System is the ‘Host’, the Virtual System is the ‘Guest’. One Host can have multiple Guest’s on it, much like you can have multiple programs on one computer.

      VirtualBox can be found at https://www.virtualbox.org/wiki/Downloads For purposes of this guide, you want the Windows hosts. That should be the first link under VirtualBox binaries, file is ~120MB
      Linux Mint Mate can be found at https://linuxmint.com/edition.php?id=228 In my testing, the Mate version of Mint has the lowest system requirements, which lends itself to usage as a Guest system. Any of the download mirrors should work, file is ~1.8GB.

      Installing VirtualBox
      When the download is complete, run the installer. It’s pretty straightforward, but a few details of note.

      First, as part of adding the network adapter for the Guest system, you will be momentarily disconnected from the internet. Only an issue if you are in the middle of downloading a file. Other then that, you’ll be right back on so it should be fine.

      Assuming you use ‘User Account Control’, you’ll get a prompt for that. Just make sure it says “Oracle Corporation”. Also, you’ll have 3 drivers to install. USB, Network Adapter, and Network Service. All three should have “Oracle Corporation” for publisher.

      Other then that, it’s an installer. Click next/continue until it’s done, changing any options you feel so inclined.



      Once the install is done, there are a few preferences you may want to change. Under File/Preferences (Ctrl+G).

      Under General, I change the Default Machine Folder. The default is under your user account, which can work. But due to the way I do backups, I don’t want ~50GB worth of virtual machines in my user folder. So I moved them to “C:\Virtual”. Exact location is all a matter of personal convenience.

      Other then that, the default preferences should be good enough. Feel free to change to fit your personal needs.

      At this point the VirtualBox software should be installed and ready. But you’ll need to create a Virtual Machine before it is useful.

      Create first Virtual Machine
      Blue “New” button starts on the process of making your Guest system. Give it whatever name you want, in this case I called mine “Virtual Mint Mate”. If your name includes ‘Mint’, Type and Version should be set automatically (Ubuntu is fine here).

      I generally give my virtual machines 2GB memory, or 2048MB. Adjustable later if needs be. This is how much memory the virtual machine will use when running.

      A virtual hard disk is really a file, so you’ll want to create one at the next step. While the other formats have their uses, the default option of VDI (VirtualBox Disk Image) works fine. And Dynamically allocated, the next default choice, has the benefit of minimizing disc usage up front.

      Which leaves the important question of how much space to dedicate to the virtual machine. As we are using Mint in this example, ~13GB should be plenty. If you anticipate a particular need, you can set that higher.

      At which point, click “Create” to finish making the framework for your virtual machine. Next is adjusting a few settings not handled by the creation process.



      Tweak Settings of Virtual Machine
      Yellow “Settings” gear, next to the “New” button used earlier, takes us to this machines settings. If you create additional machines in the future, each has it’s own settings.

      While there are many options in here, I am suggesting three (3) changes.

      First is setting the Shared Clipboard to Bidirectional, this is under General/Advanced. Making this change allows you to copy and paste to and from the virtual machine. Great for moving links.

      Second is loading the install media for the Guest system, Linux Mint Mate in our example. This is under Storage, Controller: IDE. Clicking on the “Empty” disc adds an icon on the right for choosing a virtual optical disk file (just past “IDE Secondary Master”). Point it at the Mint Mate .iso you should have downloaded earlier.

      Third is adding a shared folder, so that you can move files between the Guest and Host. Under “Shared Folders” you’ll want to click the +, over near the right edge of the window. Where you put this folder is up to you, I placed mine under the C:\Virtual I used above, so C:\Virtual\Shared. But it could be anywhere that is convenient for you. While your here, check the box to ‘Auto-Mount’ so that it is always available to the Guest.

      Feel free to look around at other options, but it should be good as is. Ok out of those windows and put yourself in ‘Snapshots’ view (Camera button in upper right of window).

      There should now be a view that contains “Current State”, but is otherwise empty. This is where future snapshots will be. This is also the beauty of a virtual machine, you can save the current state of the machine at any point. Then restore back to that point at your convenience.

      For now, make a snapshot of your empty system, should you ever need to get back here again. Click the blue camera above “Current State”, give the snapshot whatever name you want, and click Ok. Now you are ready for the long part, installing the Guest operating system.



      Install Virtual Linux Mint Mate
      Apart from the first step, clicking the green “Start” button, this is a standard Linux Mint install. Plenty of guides exist elsewhere for that, so I’m going to summarize most of this.

      Click Start, wait for Mint (in a window) to boot. Install Mint icon, continue on language, check ‘install third party software’ and continue.

      Safety warning: Right now, you should be able to see a window that is talking about erasing a disk to install Linux mint. Outside of that window you should also be able to see the Oracle VM VirtualBox Manager, and the rest of your Host system (desktop background, taskbar, etc). If you cannot see parts of your normal windows environment, press RCtrl+F. If you still can’t see parts of your normal windows environment, cancel out of the install: you’ve gotten yourself lost and you should STOP NOW.

      If you can see normal windows stuff outside of the Linux install, you’re fine to click “Install Now”. Continue on through timezone and keyboard. Makeup whatever username and password you want, but short is probably best, also want to check ‘log in automatically’ then continue.

      Now you wait for the install to complete. Or put better, the install runs in this window, you can still do whatever else you want in other windows. When the install finishes, it will ask you to ‘Restart Now’. Do so, then Enter (the media having been ‘ejected’ automatically).

      At which point it should boot into your virtual Linux Mint Mate. Congratulations, you are running an operating system inside of an operating system. Take a Snapshot (RCtrl+T) of your fresh install, before moving on to adjusting it for regular usage.



      Tweaks and adjustments inside the Box
      First think you probably want to do is change the virtual machine’s screen resolution. Menu (bottom left corner), then Display. Pick the resolution you want and Ok.

      Then you need to ‘fix’ the shared folder permissions. This is done from a Command Prompt (bottom left area, black icon to the left of Firefox). In the resulting window type “sudo adduser (yourusername) vboxsf”. Without the quotes and where (yourusername) is the user name you picked earlier. It will ask you for the password for that account and report “Done” when successful. At which point, type exit and hit enter to leave the command prompt.

      Next is choosing update policy and updating. Shield icon in the bottom right, then “Optimize Stability and Security”. Followed by ‘Install Updates’ (near top, middle of window). If prompted, enter password. ‘Refresh’ and ‘Install Updates’ until there are no updates left (probably need to do it a few times).

      If the updates didn’t cause a reboot (of the Guest), do one now. Then start Firefox and change it’s settings and plugins. I suggest changing the default download location to your shared folder, and adding the plugins uBlock Origin and NoScript (link to NoScript configuration guide). Other then that, adjust Firefox to your preferences.

      Now we shutdown Mint and make another Snapshot (using blue camera icon), calling it something like ‘updated’. Start Mint back up and get whatever other things you want set the way you want them. Maybe open the shared folder, or Firefox. Then let it sit for a bit, five minutes or so. You can still use the rest of the system, just leave the virtual machine alone. We want it to get any background tasks out of the way now.

      With that waiting done, take another Snapshot (RCtrl+T), calling it something like ‘running and ready for use’. Then shutdown and restore snapshot using the shortcut RCtrl+Q, making sure “Power Off the Machine” and “Restore Current Snapshot” are checked.



      How to use your new toy
      If all has gone well, you now have a fully functional installation of Mint, in a virtual environment, ready to experiment with. which means now we talk theory…



      There are various parts of the internet you may want to visit, but you don’t want anything left from that visit on your computer. Or programs you want to test out, that could damage your system. In other words, you need a computer you can throw away after each use. Congratulations, you just built one.

      If you always RCtrl+Q to leave the virtual Mint, it’s effectively the same as throwing away the computer. Use it for whatever you want, then restore back to a known good state.

      Should you need to move any files between the ‘host’ and ‘guest’, that’s what the shared folder is for. Just make sure the files are in the right place when you RCtrl+Q, as that wipes anything in the virtual environment.

      All of this provides protection only for your machine. It does nothing to prevent tracking of your activities online. But it does make it harder for a malicious website or program to compromise your system. The virtual machine gets compromised, but you’re tossing that so it’s not an issue.



      Ongoing Maintenance
      Periodically, you’ll want to start the virtual Mint and do updates. Update the system, change any personal settings, whatever. Doesn’t need to happen often, maybe once a year. Whenever is convenient for you.

      In order to maintain the usefulness of the system, it’s important to NOT do anything besides update at those times. No going to normal websites, no running strange programs, none of that. Just updates and setting changes. Then take a new snapshot.

      After that, use the new snapshot for all the other uses you may have. So long as regular use and updates don’t get mixed, a virtual machine is an incredible useful tool.





      Other Guides
      Some links to other guides for VirtualBox setup, as well as Linux installation. In case my directions above were inadequate.

http://www.everydaylinuxuser.com/2014/05/how-to-install-linux-mint-as-virtual.html
http://www.instructables.com/id/How-to-install-Linux-on-your-Windows/

https://www.virtualbox.org/manual/ch01.html#intro-installing
http://www.wikihow.com/Install-VirtualBox
https://www.youtube.com/watch?v=OeC-5Rnf7DQ

https://linuxmint.com/documentation.php
http://www.wikihow.com/Install-Linux-Mint
http://www.pcworld.com/article/2918397/how-to-get-started-with-linux-a-beginners-guide.html

Leave a Reply