no xm console prompt after debootstrap debian or ubuntu
Bug #139046 reported by
Marsu42
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xen (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
xen-tools (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
xen-tools 3.5-1, gutsy tribe-6:
When creating a debian or ubuntu xen domu with xen-create-image and activating the domain, everything is ok except there is no prompt after running xm console. Only ssh connection is possible.
Searching the web, I found two possible solutions:
1. in the domu, in /etc/inittab replace tty1 with xvc0 (it is modified by xen-tools e.g. via /usr/lib/
2. in the domain config file, add extra='
Changed in xen-tools: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in xen (Ubuntu): | |
status: | Incomplete → Fix Released |
To post a comment you must log in.
I can confirm this bug on xen-tools version 3.1-1ubuntu1 for edgy guests.
This is a rather silly bug, though. The problem is in file 30-disable-gettys (/usr/lib/ xen-tools/ edgy.d/ ), in the following lines::
# /etc/event. d/tty[^ 1]
# Remove the links for upstart
#
rm ${prefix}
The command above would be perfectly correct in a bash shell! But this script uses /bin/bash, which in turn is a sym-link to dash. In dash, the command above would remove ONLY ${prefix} /etc/event. d/tty[^ 1], leaving all the other tty*.* files intact. Without a login process attached to tty1 there would be no login prompt after running xm console.
POSSIBLE FIXES:
1. use the command bellow:
find ${prefix} /etc/event. d -name 'tty?' | grep -v tty1 | xargs rm -v
2. use bash instead of /bin/sh in this script.
WORKAROUNDS:
1. Mont the guest image disk so you can edit its files directly. The guest vm should not be running.
export GUEST=/tmp/guest domains/ you_xen_ guest_hostname_ here/disk. img ${GUEST}
mkdir ${GUEST}
sudo mount -o loop /home/xen/
2. Add the tty1 file bak
cat ${GUEST} /etc/event. d/tty2 | sed -e 's/tty2/tty1/' > ${GUEST} /etc/event. d/tty1
3. Umount your guest image
cd /tmp
sudo umount ${GUEST}