Getting Ubuntu 9.10 Karmic Koala working in OpenVZ

30 12 2009

If you're an Ubuntu fan like me and use (or want to use) OpenVZ, you might not be too excited that the OpenVZ site doesn't yet have the latest edition of Ubuntu, 9.10 Karmic Koala, available as a precreated template.  Luckily, you can find them here.


For my purposes, I downloaded ubuntu-9.10-minimal_9.10_amd64.tar.gz.  After setting up a virtual instance with Proxmox and opening up a VNC session, I found that this template is way more minimal than I ever expected.  In all reality, that isn't so bad.  The lighter, the better.  Unfortunately, since I was setting up this new instance as a server, I had a good bit of work ahead of me.


Firstly, networking wasn't working at all with my bridged setup out of the box.  The solution:


edit /etc/network/interfaces and configure your NICs.  I had to comment out some properties of the venet0 interface to get things working.  Here's my final config file:


CODE:
auto lo
iface lo inet loopback
auto eth0
# iface eth0 inet dhcp
iface eth0 inet static
        address 10.x.x.x
        netmask 255.255.255.0
        gateway 10.x.x.y

auto venet0
iface venet0 inet static
        address 127.0.0.1
        netmask 255.255.255.255
 


Notice that I'm using a static IP address.  You may want to try DHCP starting out since it'll make things easier.  Confirm network connectivity by pinging a remote host.  Don't forget to edit /etc/resolv.conf if you need to.


Now, I need to get some goodies installed on this thing.  In the end, I'm looking to install Virtualmin and host some websites, so I need to prep for that.  Luckily, Ubuntu makes it easy to get things started quickly.  Start off by issuing:



apt-get update && apt-get install tasksel && tasksel


An ncurses dialog should appear.  Go ahead and select what you need.  I can tell you that I learned the very hard way by not initially selecting "Basic Ubuntu Server."  If you don't select that (don't worry, it's only a couple of small packages), none of your services will start at boot-time and you'll have to start each of them manually.


From there, you should be on your way.  I strongly recommend Webmin (add the apt repo) to ease server administration tasks.


Also, before I leave you be, if you're not using Proxmox to perform all of this OpenVZ magic, you're definitely missing out.  Hurry up and convert already!






Setting up Virtualmin on Ubuntu 9.10 Karmic Koala

19 12 2009

According to the Virtualmin website, the latest version of Ubuntu that is supported is 8.04 LTS.  That's probably a safe stance to take since non-LTS versions of Ubuntu have a six-month lifecycle, and most serious hosting companies would stick with LTS versions.  For those of us who live on the bleeding edge and want to try Virtualmin on the latest version of Ubuntu, 9.10 (Karmic Koala), you'll find that the standard method of installation (the install.sh script on their site) will fail.


Luckily, the solution is simple.  


Add the following repository to your sources.list file:


deb http://software.virtualmin.com/gpl/debian virtualmin-universal main


Then run the following as root:


cd /root
wget http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin
wget http://software.virtualmin.com/lib/RPM-GPG-KEY-webmin
apt-key add RPM-GPG-KEY-virtualmin
apt-key add RPM-GPG-KEY-webmin
apt-get update ; apt-get install webmin webmin-virtual-server


Webmin and Virtualmin will now be installed.  Note that the repository may not be as up-to-date as the direct download link.  If that scenario arises, simply find the URL of the latest Virtualmin package from the link, and do:

wget http://download.webmin.com/download/virtualmin/webmin-virtual-server_3.77.gpl_all.deb ; dpkg -i webmin-virtual-server_3.77.gpl_all.deb