2010-03-28

Ubuntu Distribution Upgrade in a OpenVZ Container

If you use Debain Lenny on your OpenVZ host and your Container is a Ubuntu 9.04 and you want to do a apt-get dist-upgrade to 9.10 you will end on the host with this error:

# vzctl enter 1234
enter into VE 1234 failed
Unable to open pty: No such file or directory

What happend? In Ubuntu upstart is responsible for the initialization process but therefore it needs some kernel specific stuff which is not in the 2.6.26 kernel from Debian Lenny. There is a bug report on Launchpad describing the problem.

So on the blog of bodhizazen, the person who started the bug report, you can find the needed upstart script of Stéphane Graber. Like written in bodhizazen blog entry do the following on the host:

cd /var/lib/vz/private/[VZID]/etc/init/
wget http://bodhizazen.net/openvz.conf

Now you can connect again to your virtual ubuntu machine. But if you upgrade from Ubuntu 9.10 to 10.04 you will receive the error message like above.

The solution was found fast, again from Stéphane Graber.

Simply edit /etc/init/openvz.conf and remove the two mount lines for /proc and /sys.


Now you can enjoy your Ubuntu 10.04 LTS container on a Debian Lenny host.

2010-03-19

HTC Hero adb access under Ubuntu 9.10 amd64

When i connected my HTC Hero (formerly T-Mobile G2) with my Ubuntu 9.10 64bit to get shell access to it i had the following problem:

$ ./adb shell
error: insufficient permissions for device

$ ./adb devices
?????? no permissions

So i found a solution here: http://developer.android.com/guide/developing/device.html
First you should generate a new udev rule:

sudo vim /etc/udev/rules.d/51-android.rules
---
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
---

Now you have to change the rights:

sudo chmod a+r /etc/udev/rules.d/51-android.rules

Also you have to reload the udev rules:

sudo service udev reload

Now if you reconnect your HTC Hero you will have access with adb from the Android SDK Tools!

Installing Andriod SDK under Ubuntu 9.10 amd64

If you want to install the Android SDK under Ubuntu 64 bit you first have to install the 32bit libs:

apt-get install ia32-libs

Also you need the sun-java:

apt-get install sun-java6-bin

Now you can proceed like written on http://developer.android.com/sdk/index.html

1) Download the SDK for Linux from here: http://developer.android.com/sdk/download.html?v=android-sdk_r05-linux_86.tgz and extract it to a place you like.

2) apt-get install eclipse

3) in Eclipse -> Help -> Install new Software add the following location: https://dl-ssl.google.com/android/eclipse/ - most likely if you are using Ubuntu 9.10 and Eclipse from the repository you will suffer from this bug also: https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/460944?comments=all - a empty plugin list. In this case add
The Eclipse Project Updates - http://download.eclipse.org/eclipse/updates/3.5 and Galileo - http://download.eclipse.org/releases/galileo also.

4) Now install all stuff from the https://dl-ssl.google.com/android/eclipse/ location and restart Eclipse.

5) Now in Eclipse go to -> Window -> Preferences -> Android and Point to your Android SDK root directory.

6) Now it's time to add an SDK for your Android Platform - therefore in Eclipse go to -> Window -> Android SDK and AVD Manager -> Available Packages and choose your Android SDK Version

Voila! :)

2010-03-14

fosvm 0.03a

Working on the shell is not everyone's favorite way to interact with a computer, especially when it comes to the point to enter a long cryptographic command, which you only need once or twice a year, for example changing some parameters on a openvz container.

So I was searching for a free and open source management tool like the nice Proxmox Virtual Environment - but Proxmox VE is just available for 64bit Intel/AMD systems, which support Intel VT or AMD-V capable CPU.

On the OpenVZ homepage I found a page with control panels. I started at the first entry on the page: fosvm - Free Open Source Virtual Machine Manager

It looked like the thing I was searching for - a lightweight monitor. I'm running a fresh installed Debian Lenny, so for the installation I had to add the following packages: apache2, php5, php5-mysql, mysql.

For fosvm 0.03a to work, you need to create a mysql-user with some privileges. In the documentation I couldn't find the privileges which were exactly needed. Before you start the installation of fosvm 0.03a, you should fix the install script, install.sh, by changing the line "crontab -l > cron/tmp.cron" to "crontab cron/tmp.cron", or else you will write the actual crontab into the file, not the other way around. I also created a forum-post about this problem, hoping the maintainer of fosvm will response.

fosvm looks real promising, and like most of open source projects starting with a 0.0x version number and ending with a 'a' for alpha are not yet ready for productive systems - but i will keep an eye on it!