[libvirt-users] use of qemu-kvm --chardev pipe, id=X, path=... argument ?
Michal Privoznik
mprivozn at redhat.com
Mon Jan 5 14:13:17 UTC 2015
On 05.01.2015 15:03, Jason Vas Dias wrote:
> Please can anyone enlighten me as to why linux qemu-kvm always
> creates the console on my terminal, when I am trying to direct
> all of its input and output to a pipe ?
>
> I have created :
> $ mkfifo /tmp/el6x32{.in,.out,.monitor}
> and use the command:
> $ /usr/libexec/qemu-kvm -M rhel6.4.0 -cpu n270 -smp 1 \
> -hda /home/rpmbuild/OEL6/img/OEL6_32.img \
> -kernel /home/rpmbuild/OEL6/boot/vmlinuz-2.6.39-400.215.14.el6uek.i686 \
> -initrd /home/rpmbuild/OEL6/boot/initramfs
> 2.6.39-400.215.14.el6uek.i686.img \
> -append 'root=/dev/sda rw selinux=0 enforcing=0 console=0' \
> -m 2048 -k en-gb -nographic -vga none -vnc none -enable-kvm \
> -chardev pipe,id=0,path=/tmp/el6x32 -monitor pipe:/tmp/el6x32.monitor
>
> But this ends up with the kernel's console on qemu-kvm's STDIO .
>
> I actually want the console to be redirected to take input from
> /tmp/el6x32.in and direct output to /tmp/el6x32.out -
> I thought that was what the above '-chardev pipe,id=0,path=/tmp/el6x32'
> should do if kernel boot params 'console=0' is also supplied ?
> Why isn't this happening for me ? Anyone got a guest to read console input
> from a pipe and direct console output to a pipe ? If so, how?
>
> Thanks in advance for any replies, Jason.
That's probably because qemu by default creates some
serial/parallels/virtual console/... You may want to pass '-nodefaults'
onto qemu-kvm command line.
Michal
More information about the libvirt-users
mailing list