Below you will find pages that utilize the taxonomy term “Virtualization”
LXC Project Part 3: Starting and logging into my first container
Continuing my LXC project, let’s list the installed containers:
lxc-ls
That just shows the name of the container - lemmy. For completion’s sake, I’m going to start it as a daemon in the background rather than being sent straight into the console:
lxc-start -n lemmy -d
As per usual Linux SOP, it produced no output. Now to jump in:
lxc-console -n lemmy
That told me I was connected to tty1, but did not present a login. Quitting out via Ctrl-a q let me go back to the VM’s tty, but trying again did not get me login. There’s some weird issue that doesn’t allow it to work, however, this did:
LXC Project Part 2: Setting up LXC
I’m continuing on from yesterday’s post to get the VM ready to host LXC. I’m starting with Centos 7 so the first thing I had to do was enable the epel repos:
yum install epel-release
Then, according to the guide I was following, I had to also install these package:
yum install debootstrap perl libvirt
That installed a bunch of stuff. I also get that they’re trying to break out what they’re doing, but they probably could have installed both that and the LXC stuff below in one blow:
LXC Project Part 1: Bridging the Connection
As I mentioned before, I’m looking at Linux Containers (LXC) to have a higher density virtualization. To get ready for that, I had to create a network bridge to allow the containers to be accessible on the network.
First I installed bridge-utils:
yum install bridge-utils -y
After that, I had to create the network script:
vi /etc/sysconfig/network-scripts/ifcfg-virbr0
In there I placed:
DEVICE="virbr0"
BOOTPROTO="static"
IPADDR="192.168.1.35" #IP address of the VM
NETMASK="255.255.255.0"
GATEWAY="192.168.1.1"
DNS1="192.168.1.7"
ONBOOT="yes"
TYPE="Bridge"
Then, since my ethernet on this machine is eth0
How did I not know about LXC Containers?
Back when I first was working on replacing my Pogoplug (the original BabyLuigi), I was looking at potentially using it to learn about Docker in addition to creating virtual machines that were actually useful instead of just playing around with VMs for looking at Linux distros. The benefit of Docker was to have the isolation of VMs without the overhead of VMs. Also, since it was trending pretty hard, I figured it’d be good for my career to have some experience with it. So I spent a few weeks researching Docker and playing around with some of the online demos. I read lots about how it was used and how to avoid the usual pitfalls. But in the end I went with a VM that did a bit more than I wanted; I’d wanted to separate services so that updating one thing wouldn’t cause me to lose everything. However, the more I looked into it, the more it looked like unnecessary headache without enough of a benefit. Dockers were SO isolated that if you wanted to run a LAMP stack you had to run at least 3 Docker containers and find a way to string them together and have a separate pool of storage they could all access.
How to add more RAM to a KVM Virtual Machine
I have VM running Emby that I set up a while ago on an low spec machine that had been the guest computer before everyone got Chromebooks and tablets. But it only had 2GB of RAM and I gave 1GB to the VM. So I added some new RAM to bring the system up to 8GB and wanted to start off by giving the VM 4GB to see if that improved performance.
In case you're having issues creating a new VM in Virt-manager
Tried to use virt-manager again (more about that in a future post), but kept getting the error:
qemu-system-x86_64: error while loading shared libraries: libGL.so.1: failed to map segment from shared object: Permission denied
Well, turns out this blog post had the answer for me:
sudo setsebool -P virt_use_execmem=on
That blog appears to be a great place for KVM virtualization info on Fedora, so I’ll be checking it out again in the future, I’m sure.
Free Windows VMs!
For once I found a way to run Windows for free that wasn’t a scam! Turns out the Microsoft makes VMs of Windows XP through Windows 8 available for free. The point is for you to be able to test how your websites will look in different versions of IE and different versions of Windows. Now, because of this, they’re time-limited - you can renew them ever 30 days until 90 days and then you need to regenerate them. So you can’t really use it as a complete replacement for buying a Windows license. However, if you wanted to test how well Windows would run on your Linux computer it’s perfect for that. My short-term goal is to be able to run Windows within a VM for everything but video games and therefore not have to run two computers if I want to, say, work on my photos. (I use Lightroom although Digikam is pretty awesome if you don’t already have your workflow setup in Lightroom) So to me this is the perfect way to make sure all the programs I want to run on Windows (mostly Lightroom, but occasionally some others) will work well in a VM with my current hardware (before I spend the money to buy a Windows license). Another nice thing about running windows in a VM instead of its own computer is that it’s easy to create a new VM when a new version of Windows comes out and then have the VMs side-by-side as you migrate over to a fresh install. It actually wouldn’t be a horrible idea for my main Linux distro either, but then I wouldn’t have ANY OS taking advantage of being the main OS that’s not virtualized.
Oracle's Virtualbox vs Red Hat's Virtual Machine Manager
I’ve been using Virtualbox for a long time to run virtual machines when I want to check out other distros before I install them on one of my computers or to review them. It’s MOSTLY open source, although some of the key parts like USB 2.0 are free to use, but not open source. So now that Red Hat’s Virtual Machine Manager is starting to look pretty useful I figured I should check it out. That way I could be using a FLOSS virtual machine program - assuming the features were good enough to match Oracle’s offerings. Also, Virtualbox requires a kernel module that has to be recompiled every time a new kernel is installed and that’s annoying. I figured I’d test out both programs by installed a VM of Centos.