Changes between Initial Version and Version 1 of setup_virtual_machine

Nov 4, 2012, 1:32:26 AM (8 years ago)
Patrick Gibbs



  • setup_virtual_machine

    v1 v1  
     1A virtual machine is a simulated computer that runs in an operating system. For example, you might want to [wiki:setup_development_workstation setup a development workstation] without modifying your current operating system, so you create a virtual machine that runs Debian GNU/Linux and use it as a development environment.
     3== Vocabulary and Basics ==
     4* Host: the operating system you start with, probably the one running on your hardware.
     5* Guest: the operating system that runs in the virtual machine.
     7There are a few types of virtualization / virtual machines, and each type has unique characteristics. See for an explanation of the different types. For example, "full virtualization" takes up more hard disk space than "operating system-level virtualization".
     9== Steps for full virtualization in GNU/Linux ==
     10* Check if your kernel supports virtualization.
     11** At a command prompt, type
     14egrep '(vmx|svm)' /proc/cpuinfo
     17If a result appears, then your kernel supports kernel-based virtualization. If nothing shows up, then your kernel doesn't support kernel-based virtualization.
     19* Enable virtualization in your BIOS.
     20** Restart your computer.
     21** When the computer first starts to boot, watch the screen and when it says "Press F1 for BIOS config" or something like that, press the indicated key.
     22** Look for CPU options, and look for something that mentions virtualization, and if it isn't already enabled, then enable it.
     23* Save changes to BIOS and exit.
     24* For the BIOS changes to take effect, you may have to turn off the computer (not just restart it -- actually turn it off) and turn it on again (maybe twice).
     26If those steps worked, your computer is ready to run a virtual machine.
     28=== Setting up a virtual machine for web development ===
     29Assuming GNU/Linux operating system:
     30* Install VirtualBox and Puppet. The most common GNU?Linux distributions have these available as packages for easy installation.
     31* Install Vagrant (it depends on VirtualBox and, optionally Puppet or Chef. I've emphasized Puppet here since the May First / People Link servers are configured using Puppet).
     32** Your distribution might have a vagrant package available, or you might have to download the package from the Vagrant website: .
     33* If you want to run Drupal websites, then you might find the [ Drupal-up] and [ Aegir-up] projects useful. They use Vagrant to create virtual machines with Drupal installed and configured.
     34* If you install Vagrant and get an error about failure to connect to the VM via SSH, then follow the instructions here:
     36== Steps for operating system-level virtualization ==
     37Operating system-level virtualization is also called "resource containers," and has different names in different operating systems: BSD has "jails"; OpenSolaris/OpenIndiana has "zones"; and GNU/Linux has "chroot", "openvz" (and in Debian the ProxMox interface for OpenVZ), and "lxc" (newer than openvz, more integrated with the mainline Linux kernel and therefore seems to have more future). This kind of virtualization can isolate a single process, a set of processes, or an entire other operating system from the host operating system.