Filed under: Linux
I have seen a nasty issue with Xen; trying to connect to a vm guest console, and it spits out this error:
[root@server ~]# xm console myserver
xenconsole: Could not open tty `/dev/pts/4′: No such file or directory
The problem is fixed by running xenconsoled command
/Thomas
Filed under: Linux
This is just a note to self.. as I sometimes need to access USB devices on a KVM virtual guest. This time it’s actually for a freaking Scandisk USB device with something called U3. I need to use the USB stick to install easypeasy on my asus eeepc.. and I need to use the USB stick as a normal stick …
See this page for instructions
Filed under: Linux
KVM seems to be the hot thing for the future, so I had to dig into it.. giving up VMWare and Virtualbox (keeping Xen knowledge as I work with it daily).
KVM with virtual manager is a breeze on Ubuntu 9.04, but if you want bridging it’s a whole different story.
So, here’s a note-to-self;
1. Setup br0 on Ubuntu (https://help.ubuntu.com/community/KVM)
2. Add your user to group libvirt and tun (create if needed)
3. run virsh
4. dump xml file of virtual guest
5. change from ‘user’ to ‘bridge’:
6. import xml (define /path/to/xml/file)
7. start virtual machine
ta-ta
Filed under: Linux
Brother is really linux friendly, but using gscan2pdf is a bit of a pain when you have a webcam and two scanners.
My canon has an option called “calibration-cache”, which Brother doesn’t understand. If you run Ubuntu and gscan2pdf, just do this to get rid of the problem:
1. Open gscan2pdf
2. Click “scan”
3. If the new window starts by showing the canon scanner, change that to Brother.
4. Try to scan.. you will probably see the error “unknown option…”.
5. Close gscan2pdf and start it again..
After restarting gscan2pdf, it’ll default to the Brother scanner if that was the last one that you had chosen.. and only the Brother options are loaded.
Happy Linux’ing
/Thomas
Filed under: Linux
If you run out of diskspace on a xen virtual machine (guest), it’s quite easy to expand the image file. I stole this receipt from here, just to make sure that I have a copy in case his/her website goes offline:
1. Stop the virtual server that is using the loop filesystem
2. Add some extra space to your loop filesystem file
# dd if=/dev/zero bs=1024k count=1024 >> loop_image_file
This adds 1GB to the end of a file called loop_image_file (make sure to use the append output redirector >> not a single >, otherwise you’ll have an empty 1GB file!)
3. Force a check on the resized/increased filesystem
# e2fsck -f loop_image_file
4. Resize the filesystem within the loop filesystem file
# resize2fs loop_image_file
5. Start the virtual server again
Filed under: Linux
I have been trying to add a “shutdown icon” to the gnome desktop on Ubuntu 8.10. The goal is for the user to just double-click that icon, and the machine shuts down.
My issue was that triggering the /sbin/poweroff binary would only ask for my password:
myuser@mydesktop:/tmp$ sudo /sbin/poweroff
password:
So, I added myself to the /etc/sudoers file:
myuser ALL = NOPASSWD: /sbin/poweroff
and it simply DID NOT work!
I came across a post telling me why…
The reason is that /etc/sudoers is being read from the bottom and up. So, I was in a group that was mentioned on the bottom, which required passwords for everything. Now I move the line (myuser ALL = NOPASSWD: /sbin/poweroff) to the bottom of the file, and my gnome launcher works fine!
CentOS + Xen is driving me nuts! I came across a nasty issue, which makes me (try to) pull my hair:
xm create -c whateverdomain
Some pygrub output…
and then.. Error: (4, ‘Out of memory’, “xc_dom_boot_mem_init: can’t allocate low memory for domain\n”).
Googling this for a few hours and actually trying different distros (even trying out Lenny!) gave me nothing. One post (that I finally found) says this issue maybe caused by trying to start an image (created on a 64 bit Xen) on a 32bit Xen.
So now I am installing CentOS 5.3 64bit on my Vaio laptop. It comes with a Centrino (Core 2 Duo I believe).
and runs like a charm
So I got myself a new laptop and busy installing Xen. My problem is that the Sony Vaio comes with a Marvell PCI-E network card, and that isn’t supported by the default CentOS kernel.
Note that I am using the CentOS PLUS kernel with xen, so if you just want the normal kernel, you will have to find the correct package for your kernel.
More people seems to have some issues installing the driver for the network card, as you won’t have any network access (http://www.gossamer-threads.com/lists/atrpms/users/12484)
Here’s how to do it (with Xen kernel):
1. Get kernel sk98lin-kmdl-2.6.18-128.1.6.el5.centos.plusxen-10.50.1.3-12.el5.i686.rpm from http://atrpms.net/dist/el5/sk98lin/
2. Get the centos plus kernel http://mirror.centos.org/centos-5/5.3/centosplus/i386/RPMS/kernel-xen-2.6.18-128.1.6.el5.centos.plus.i686.rpm
3. Copy these to a USB stick and onto your PC (with the Marvell network card).
4. Install the kernel (rpm -ivh kernel-xen-2.6.18-128.1.6.el5.centos.plus.i686.rpm )
5. Install the sk98lin kernel module (rpm -Uvh sk98lin-kmdl-2.6.18-128.1.6.el5.centos.plusxen-10.50.1.3-12.el5.i686.rpm )
6. Reboot
PS: lspci says “Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller (rev 12).
PPS: Thanks to Axel Thimm for packaging the sk98lin kernel module!