[libvirt] Serial console on a qemu image through virt-manager

ClaesBas libvir-list at clabbe.com
Mon May 19 12:22:56 UTC 2008


I give up!

How should the xml-file look?

In http://libvirt.org/formatdomain.html#elementsConsole it says
something like:

</devices>
    <console type='pty'>
          <source path='/dev/pts/4'/>
        <target port='0'/>
    </console>
</devices>

But in Xen example (http://libvirt.org/drvxen.html) it looks like:

<devices>
    <console tty='/dev/pts/5'/>
</devices>


I have latest versions from source on both libvirt (Mercurial) and
virt-manager (CVS).

Before I updated virt-manager (from Ubuntus Hardy-version) I had a
choice for serial
console which opened a console window which was all "Black" inside.
After upgrade of
virt-manager I got no contact with any serial console at all.

My guest is a qemu image of OpenBSD with console configured to first
serial port.
I could see that the image is ok, if I reconfig the xml-file to use vnc
instead.
Then I see that OpenBSD is trying to use serial port as console.

Output from /var/log/libvirt/qemu/obsd64.log:
/usr/bin/kvm -M pc -m 512 -smp 1 -name obsd64 -nographic -monitor pty
-no-acpi -boot c -drive
file=/home/cs/kvm/OpenBSD/obsd64.hda,if=ide,index=0,boot=on -net
nic,macaddr=00:16:3e:17:9d:f7,vlan=0 -net user,vlan=0 -serial pty
-parallel none -usb
char device redirected to /dev/pts/1
char device redirected to /dev/pts/2

When I have the following xml-fil (/etc/libvirt/qemu/obsd64.xml):

<domain type='qemu'>
  <name>obsd64</name>
  <uuid>5b315a1a-530a-1f13-fcb7-54098c9968a7</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/home/cs/kvm/OpenBSD/obsd64.hda'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='user'>
      <mac address='00:16:3e:17:9d:f7'/>
    </interface>
     <console tty='/dev/pts/1'/>
  </devices>
</domain>


And the log from virt-manager says:

[Mon, 19 May 2008 13:11:32 virt-manager 3973] DEBUG (manager:413) VM
obsd64 started
[Mon, 19 May 2008 13:11:36 virt-manager 3973] DEBUG (details:1010)
Trying console login
[Mon, 19 May 2008 13:11:36 virt-manager 3973] DEBUG (details:1015) No
graphics configured in guest
[Mon, 19 May 2008 13:11:36 virt-manager 3973] DEBUG (details:528) In
hw_selected with null tree iter
[Mon, 19 May 2008 13:11:36 virt-manager 3973] DEBUG (details:528) In
hw_selected with null tree iter
[Mon, 19 May 2008 13:11:36 virt-manager 3973] DEBUG (details:1010)
Trying console login
[Mon, 19 May 2008 13:11:37 virt-manager 3973] DEBUG (details:1015) No
graphics configured in guest


Is this working/tested?


Regards
Claes


PS
I have tried many many variants on <console>.......




More information about the libvir-list mailing list