Creating a Gentoo Virtual Machine in VMware Player
Last Updated: 06/04/16
This techtorial is going to be a multi-part series, as this process is quite involved. It will cover configuring VMware Player, installing Gentoo, installing VMware Tools, and installing KDE. This series is designed as a starting point to help individuals interested in Gentoo, but not yet ready to install it as their main OS or in a multi-boot configuration. As such, it will be written in a very generic manner that *should* work in most configurations. The portions discussing the Gentoo installation will closely follow the Gentoo handbook.
- 64-bit host operating system (32-bit systems will have different installation files, compiler flags, etc…)
- Install the latest version of VMware Player
- Download it from here
- Note – If you are using AVAST you may have issues. The best solution I found was to uninstall AVAST, install VMware Player and reinstall AVAST.
- Download the current Gentoo minimal ISO
- Go to the Gentoo mirrors page
- Find the closest HTTP server near you
- Download the current, minimal, AMD64, ISO, i.e. releases/amd64/current-iso/install-amd64-minimal-*.iso
- VMware Player version: 6.0.7 build 2844087
- Gentoo: install-amd64-minimal-20130816.iso
This first article will cover how to create the actual virtual machine (VM). Begin by starting VMware Player and clicking on “Create a New Virtual Machine”.
Browse to the location of where the Gentoo minimal ISO that you previously downloaded is located.
When you find the ISO, select it and press “Open”.
Select “Linux” as the guest operating system, and select “Other Linux 2.6.x kernel 64-bit” for the version. Do not worry about it being 2.6.x, it will work with just fine with newer kernels (I will be demonstrating an install with 3.8.13, later).
Give the VM a useful name and select an appropriate location of where you would like to save it.
Make the disk size however large you feel is appropriate. For a basic Gentoo configuration, 8 GB will be more than enough. I opted to store the disk as a single file, as I plan to build an image from it; however, you may leave the default. Use your best judgment.
Click on “Customize Hardware”. Here will we select the actual hardware that we are going to give the system. Just like a physical computer, you can change these settings at any time. In fact, some of them you can change on the fly. For most of these settings, I recommend giving the machine as many resources as you can afford, initially. This is because with Gentoo you will be compiling pretty much everything directly from the source code, so the more resources you give it, the faster you will be up and running. Once you have the system built to your liking you can scale down the settings to something more appropriate for a shared environment.
Set the amount of RAM you want to give the virtual machine. 512 MB will be sufficient for normal use; however, to aid in the initial build process, try to be generous. Giving the virtual system a quarter of your host system’s RAM should be safe in most cases.
Go to “Processors”. You should initially leave these settings at their defaults, as VMware Player may have issues if you specify more than one core while it is reading from the virtual CD. After we are done using the virtual CD, it *should* be OK to come back and increase the number of cores. If you decide to increase this number, in the future, I recommend leaving at least one physical core reserved (if you have hyper threading this would be equivalent to two logical processors) for the host system. Note that VMware Player will restrict you to a maximum of four logical processors. Leave the virtualization engine settings at their default values.
Go to “Floppy” and click “Remove”. If you really want support for the floppy drive, you can leave that setting along.
Go to “Network Adapter” . Select either NAT or Bridged. NAT will cause your host to share the same IP address as your VM, and bridged will give the machine its own, unique IP address. If you plan to SSH into your VM then select bridged. If you are unsure or do not need SSH, then leave it as NAT.
Go to “USB Controller”. If you have USB 3.0 on your physical hardware, then change the compatibility from USB 2.0 to USB 3.0; otherwise, leave the setting at its default value. If you do not have Bluetooth devices or do not wish to share them, then uncheck the “Share Bluetooth devices…” option.
Go to “Display”. Select “Specify monitor settings”. Give some sort of reasonable resolution. Leave “Accelerate 3D graphics” unchecked, as this may cause issues. When you are happy with your settings press “Close”. Feel free to add/remove devices as you see fit.
Press “Finish” to complete the setup.
You should now see your new machine in the list of VMs. If you are ready to start installing Gentoo, press “Play virtual machine”. At this point, the process will be very similar to that of installing Gentoo on an actual host machine. As soon as you press play, you will start the machine and it will read and boot from the ISO we just downloaded.
When you are using the VM, if you need to force reboot your system, you may do so by pressing the down arrow next to the pause button and pressing reset. If you would like to take a break and continue later, you can use the suspend option. Suspending the VM will allow you to continue from exactly where you left off. This is a very useful feature, especially when installing the OS, as it means you do not have to do it all in one sitting.
My next techtorial in this series covers the installation process, up through partitioning the disks (chapter 4 of the Gentoo handbook). Click here to go to that article