Re: How to connect to console of domain on PowerPC?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 04, 2013 at 02:22:03AM +0000, Yin Olivia-R63875 wrote:
> For instance,
> /usr/bin/qemu-system-ppc -name demo -M ppce500v2 -enable-kvm -m 256 -nographic -kernel /media/ram/uImage -initrd /media/ram/ramdisk -append "root=/dev/ram rw console=ttyS0,115200" -serial tcp::4445,server
> 
> Then to run 'telnet 10.193.20.xxx 4445' could connect the guest.
> 
> 
> The temporary workaround is not add '-device' string after '-serial' option.

This is wrong. -serial is legacy command line syntax that libvirt should never
use for any QEMU released in the last 2 years. New syntax is uses a combination
of -device + -chardev.

> diff -Nur libvirt-0.10.1.orig/src/qemu/qemu_command.c libvirt-0.10.1/src/qemu/qemu_command.c
> --- libvirt-0.10.1.orig/src/qemu/qemu_command.c 2012-08-30 15:35:18.000000000 +0530
> +++ libvirt-0.10.1/src/qemu/qemu_command.c      2012-10-05 17:19:32.060368755 +0530
> @@ -5501,13 +5501,15 @@
>                  virCommandAddArg(cmd, devstr);
>                  VIR_FREE(devstr);
> 
> -                virCommandAddArg(cmd, "-device");
> -                if (!(devstr = qemuBuildChrDeviceStr(serial, qemuCaps,
> +                if (!STREQ(def->os.arch, "ppc")) {
> +                    virCommandAddArg(cmd, "-device");
> +                    if (!(devstr = qemuBuildChrDeviceStr(serial, 
> + qemuCaps,
>                                                       def->os.arch,
>                                                       def->os.machine)))
> -                   goto error;
> -                virCommandAddArg(cmd, devstr);
> -                VIR_FREE(devstr);
> +                    goto error;
> +                    virCommandAddArg(cmd, devstr);
> +                    VIR_FREE(devstr);
> +                }
>              } else {
>                  virCommandAddArg(cmd, "-serial");
>                  if (!(devstr = qemuBuildChrArgStr(&serial->source, NULL)))
> 
> Applying the above patch to libvirt, all the other domain control commands could work except 'virsh console domain'.
> 
> # cat >demo.args <<EOF
> > /usr/bin/qemu-system-ppc -name demo -M ppce500v2 -enable-kvm -m 256 
> > -nographic -kernel /media/ram/uImage -initrd /media/ram/ramdisk 
> > -append "root=/dev/ram rw console=ttyS0,115200" -serial 
> > tcp::4445,server -net nic EOF
> 
> # vi demo.args
> /usr/bin/qemu-system-ppc -name demo -M ppce500v2 -enable-kvm -m 256 -nographic -kernel /media/ram/uImage -initrd /media/ram/ramdisk -append "root=/dev/ram rw console=ttyS0,115200" -serial tcp::4445,server -net nic

If you think libvirt has a problem generating command line args, then
rather than telling us about some random command line args you've
created yourself, please provide the actual args that libvirt has
generated. See /var/log/libvirt/qemu/$GUESTNAME.log for those.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]