Add serial console in xml configuration file generated by vm-builder

Bug #302880 reported by Lionel Porcheron
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

It may be a good idea to add in xml configuration file generated by vm-builder the definition of the serial port. Actually, we habe to add it by hand :(. I have to add in the xml file the following lines:
8<---------------------------
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
8<---------------------------

It would be even beter if we have a way (option in vmbuilder ?) to activate the serial console (getty listening on ttyS0 and grub beeing aware of this console).

Changed in vm-builder:
importance: Undecided → Wishlist
Revision history for this message
Nick Barcet (nijaba) wrote :

Even though an option would make sense, do you know that you can use the --templates option to set this in a more permanent way?

See https://help.ubuntu.com/community/JeOSVMBuilder#Modifying%20the%20libvirt%20template%20to%20use%20bridging for an example of how to use it

Thanks a lot for suggesting this in any case.

Nick Barcet (nijaba)
Changed in vm-builder:
status: New → Confirmed
Revision history for this message
seph (seph) wrote :

I'm just starting to play with 10.04, and ran into this. Not having easy console access for remote virtual servers is a big step backwards from xen. Sure, I can use templates, and work around all these, but there's a lot of extra work for what I think should be normal.

Revision history for this message
Sergey Svishchev (svs) wrote :

This still won't give full serial console access (BIOS and GRUB won't be configured).

In Karmic, replacing VGA BIOS with Google's SGABIOS works, and GRUB can be configured in --execscript. In Lucid, these workarounds don't work anymore (the latter is bug 703959).

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Sergey, the other bug notwithstanding, do you have a patch against vmbuilder which you've been using to always define a serial console, or have you been using templates (or doing it by hand)?

Revision history for this message
Sergey Svishchev (svs) wrote :

I've been using execscript, like this:

target=$1

(printf "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\nterminal --dumb serial\n\n"; cat $target/boot/grub/menu.lst) > $target/tmp/menu.lst && mv $target/tmp/menu.lst $target/boot/grub/menu.lst

chroot $target sed -i -e '/^# kopt=/s/^\(.*\)$/\1 console=ttyS0,115200n8/; /^# defoptions=/s/=.*$/=/' \
  /boot/grub/menu.lst
chroot $target update-grub

Revision history for this message
Sergey Svishchev (svs) wrote :

SGABIOS hack is:

sudo dpkg-divert --local --rename --add /usr/share/qemu/vgabios-cirrus.bin
sudo ln .../sgabios.bin /usr/share/qemu/vgabios-cirrus.bin

(symlink is not enough for some reason)

Revision history for this message
Sergey Svishchev (svs) wrote :

SGABIOS support was added to QEMU recently (07 June) -- http://patchwork.ozlabs.org/patch/95803/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.