Posts tagged ‘virtualization’

On virtualization…

Well, I quit using VirtualBox for my virtualization needs. I am now using kernel based virtualization, or kvm. Kvm offers many advantages, in my opinion, the key being the simplicity and ease of use. I did not like the VBox abstraction.

  • kvm’s core code is *in* the kernel, userspace tools are in a package. Kvm is part of Linux and uses the regular Linux scheduler and memory management. This means that kvm is much smaller and simpler to use. [1]
  • kvm is Free Software released under the GPL.
  • kvm uses processor extensions (HVM) for virtualization.
  • kvm supports 64bit guests out of the box.

Also, kvm is a breeze to setup. In a nutshell, create the img. kvm-img create gentoo-amd64.img 10G then boot the gentoo live cd. kvm -hda gentoo-amd64.img -cdrom /path/to/iso -boot d. Then follow the gentoo install handbook. Simple.

Lastly, kvm images are easily transportable and will run on other hosts (within reason, can’t run a 64bit guest on a 32bit host, etc). As a matter of fact, I present to a amd64 guest if you would like to use it*, here. Unpack it, and it will decompress to 15-16G (sparse files). Then you can start it by simply running kvm /path/to/img. In that guest you will find a pretty recent stage 3 install and emerge -e world done. There are a few other essential apps on there (vim & dhcpcd). From there, you can emerge xorg-x11, a DE, do whatever you want, really. I am using that guest to test out xfce development efforts and to be sure that we can bring you guys xfce-4.6 asap, once it is ready :) Cheers, and have fun playing with kvm!

*I do not wish to support this in ANY way, shape, or form. Use it how you wish, but do not expect help with it. Sorry.

Howto: Gentoo Guest OS in VirtualBox.

I spent a few tries on this as I have never used VirtualBox before. I think this may be randomly documented on the web but I am putting this here for archive purposes (myself) and in case other stumble upon this.

Step 1:
Create a VM in Virtual box and set the type as Gentoo Linux. I think anyone can handle this because there is a pretty nice wizard that helps you out. Some notables: Base Memory: 512, Boot hardisk: 20 gigs (8 is plenty for a minimal install and not much else).
Fire it up and it will ask for a boot disk. An .iso on the hard drive works fine. I choose to try out the new Gentoo Linux 2008.0 Minimal Install CD.

Step 2:
If you have never installed Gentoo before. Please follow the detailed install handbook. If you have installed Gentoo before, this is no different than any other Gentoo install, take your time and read the instructions!

Step 2a:
When you get to the compilation of your kernel step. You may have good luck with these notes:

1. Processor type and features

* Processor family->
* Enable Tickless System (Dynamic Ticks)
* Remove High Resolution Timer Support
* Remove Symmetric multi-processing support
* Subarchitecture Type->PC-compatible
* Remove Machine Check Exception
* Remove 64 bit Memory and IO resources
* High Memory Support (off)

2. Power Management Options

* Remove Suspend to RAM and standby
* Remove Hibernation
* Enable ACPI Support

3. Device Drivers

* Remove Macintosh device drivers
* Remove Virtualization

4. Device Drivers -> ATA/ATAPI/MFM/RLL support

* enable Generic PCI bus-master DMA support -> Intel PIIXn chipsets support
* enable PCI IDE chipset support

5. Device Drivers -> Serial ATA and Parallel ATA drivers

* enable Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support

6. Device Drivers -> Network device support

* Remove Ethernet (1000 Mbit)
* Remove Ethernet (10000 Mbit)

7. Device Drivers -> Ethernet device support -> Ethernet (10 or 100Mbit)

* Remove 3COM cards
* Remove “Tulip” family network device support
* Remove Broadcom 4400 ethernet support
* Remove nForce Ethernet support
* Remove Intel(R) PRO/100+ support
* Remove RealTek RTL-8139 C+ PCI Fast Ethernet Adapter Support
* Remove RealTek RTL-8129/8130/8139 PCI Fast Ethernet Adapter Support
* Enable AMD PCnet32 PCI support

8. Device Drivers -> Graphics support

* Remove Lowlevel video output switch controls
* Enable Support for frame buffer devices
* Enable Support for frame buffer devices -> VESA VGA graphics support

Step 3:
Continue with the install and when you get to the reboot step you should also unmount the boot cd from virtualbox.

Step 4:
Fire up your new VM and start configuring it how you like it. It should seem like a brand new Gentoo install which is pretty bare bones in itself. I would recommend picking a WM to install like GNOME, KDE, or Xfce4

Step 5:
Have fun. You may be interested in the ‘snapshot’ feature of virtualbox. I also hit “Save State’ when I close my VM. I guess you could analogue that to hibernating or ‘pausing’ as it literally comes back to where you were when you fire it up again.