[libvirt] Rudimentary (basic) s390x architecture functions for libvirt

Daniel P. Berrange berrange at redhat.com
Wed Jan 26 12:41:13 UTC 2011


On Tue, Jan 25, 2011 at 08:34:03PM +0100, Patrick Siegl wrote:
> A few more details for s390x: why you can't set param '-S' and need
> '-chardev vc,id=cons -device virtio-serial-s390 -device
> virtconsole,chardev=cons' on s390x:
> 
> 1) qemu-system-s390x -M s390-virtio -vnc :0 -enable-kvm -smp 1 -m 1024
> -k de  -kernel /boot/image-2.6.34-tue01 -initrd
> /boot/initrd-2.6.34-tue01_GUEST -drive file=/data/sle11.img -append
> "root=/dev/vda1 rw"
> 
> => screenshot 1
>
> 2) qemu-system-s390x -S -M s390-virtio -vnc :0 -enable-kvm -smp 1 -m
> 1024 -k de  -kernel /boot/image-2.6.34-tue01 -initrd
> /boot/initrd-2.6.34-tue01_GUEST -drive file=/data/sle11.img -append
> "root=/dev/vda1 rw"
> 
> => screenshot 2

> 3) qemu-system-s390x -M s390-virtio -vnc :0 -enable-kvm -smp 1 -m 1024
> -k de  -kernel /boot/image-2.6.34-tue01 -initrd
> /boot/initrd-2.6.34-tue01_GUEST -drive file=/data/sle11.img -append
> "root=/dev/vda1 rw" -chardev vc,id=cons -device virtio-serial-s390
> -device virtconsole,chardev=cons
> 
>  => RUN
> 
> 4) qemu-system-s390x -S -M s390-virtio -vnc :0 -enable-kvm -smp 1 -m
> 1024 -k de  -kernel /boot/image-2.6.34-tue01 -initrd
> /boot/initrd-2.6.34-tue01_GUEST -drive file=/data/sle11.img -append
> "root=/dev/vda1 rw" -chardev vc,id=cons -device virtio-serial-s390
> -device virtconsole,chardev=cons
> 
> => screenshot 4

These screenshots are all showing the same thing, but for different
reasons.

IIUC, there is no 'VGA' graphics adapter in s390 world, hence
you need some form of text console. This is what virtio-serial-s390
is providing for you. This does not need to be hardcoded in the
QEMU arg generator. You can set this in the XML

  <console type='vc'>
    <target type='virtio'/>
  </console>

When you add the '-S' argument this tells QEMU to launch the binary
but *NOT* run the guest. When libvirt uses '-S', it launches QEMU
runs some monitor commands, and then runs 'cont' to start the
guest running. When you're running QEMU manually in your demo
above, I assume you never told QEMU to start the CPUs, hence you
see the screenshot 4. If you had issued 'cont' on the monitor it
would run normally as per example 3.

Regards,
Daniel




More information about the libvir-list mailing list