[libvirt] Libvirt Support Virtio-serail

HI all, I wanted to know whether libvirt has any kind of support for virt-io serial or not If yes then how can I use it? Regards Pankaj Rawat DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

Hi Pankaj, On Mon, May 14, 2012 at 03:52:54AM +0000, Pankaj Rawat wrote:
I wanted to know whether libvirt has any kind of support for virt-io serial or not If yes then how can I use it?
I think http://libvirt.org/formatdomain.html#elementCharChannel is what you are looking for, if it's not, please describe in more details what setup you want to achieve. Christophe

Thanks for the input Actually I wanted to have private communication channel b/w host and guest By default I cannot have multiple console on guest through virsh console guestname ( they all are dependent on each other , if I execute a command on one shell its output is reflected on all of them ). I wanted to login into guest from multiple shells(and the console should be independent of each other) Virtio-serial have this feature ,I have gone through various install option on web , but they don't seem to work. Our kernel version for host and guest is 2.6.32-220.4.1.el6.x86_64 We goes through the mentioned link And edit our xml file by adding <channel type='pty'> <target type='virtio' name='arbitrary.virtio.serial.port.name'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> Then we tried to access the channel device through virsh console guest_name dev_name It gives error :- # virsh console serial vport0p1 Connected to domain serial Escape character is ^] error: internal error cannot find character device vport0p1 but the vport #ls -l /dev/virtio-ports/arbitrary.virtio.serial.port.name lrwxrwxrwx. 1 root root 11 May 14 05:01 /dev/virtio-ports/arbitrary.virtio.serial.port.name -> ../vport0p1 Regards Pankaj Rawat -----Original Message----- From: Christophe Fergeau [mailto:cfergeau@redhat.com] Sent: Monday, May 14, 2012 1:55 PM To: Pankaj Rawat Cc: libvir-list@redhat.com Subject: Re: [libvirt] Libvirt Support Virtio-serail Hi Pankaj, On Mon, May 14, 2012 at 03:52:54AM +0000, Pankaj Rawat wrote:
I wanted to know whether libvirt has any kind of support for virt-io serial or not If yes then how can I use it?
I think http://libvirt.org/formatdomain.html#elementCharChannel is what you are looking for, if it's not, please describe in more details what setup you want to achieve. Christophe DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

On Mon, May 14, 2012 at 10:03:11AM +0000, Pankaj Rawat wrote:
Actually I wanted to have private communication channel b/w host and guest By default I cannot have multiple console on guest through virsh console guestname ( they all are dependent on each other , if I execute a command on one shell its output is reflected on all of them ). I wanted to login into guest from multiple shells(and the console should be independent of each other)
If you want multiple interactive consoles, you need to configure multiple <console> devices.
Virtio-serial have this feature ,I have gone through various install option on web , but they don't seem to work.
virtio-serial is not intended for consoles - it is for application communication channels.
Our kernel version for host and guest is 2.6.32-220.4.1.el6.x86_64
We goes through the mentioned link And edit our xml file by adding
<channel type='pty'> <target type='virtio' name='arbitrary.virtio.serial.port.name'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> Then we tried to access the channel device through virsh console guest_name dev_name
It gives error :-
# virsh console serial vport0p1 Connected to domain serial Escape character is ^] error: internal error cannot find character device vport0p1
The 'virsh consolve' command is only intended for use with interactive consoles for administrators. As such it completely ignores any <channel> devices which are for non-interactive use. So what you see here is normal. The vkirtio serial port is definitely available for use by your application What you actually want is to configure multiple <consolke> devices <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> They will be given names console0, console1, etc so with virsh console # virsh console --device console1 serial 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 :|

Well I tried it but it doesn’t work <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> All above are merged into one <console type='pty'> <target type='virtio' port='0'/> </console> When I define the guest xml Following error received when I tried to execute the command # virsh console --device console1 serial error: command 'console' doesn't support option --device Regards Pankaj Rawat -----Original Message----- From: Daniel P. Berrange [mailto:berrange@redhat.com] Sent: Monday, May 14, 2012 3:55 PM To: Pankaj Rawat Cc: Christophe Fergeau; libvir-list@redhat.com Subject: Re: [libvirt] Libvirt Support Virtio-serail On Mon, May 14, 2012 at 10:03:11AM +0000, Pankaj Rawat wrote:
Actually I wanted to have private communication channel b/w host and guest By default I cannot have multiple console on guest through virsh console guestname ( they all are dependent on each other , if I execute a command on one shell its output is reflected on all of them ). I wanted to login into guest from multiple shells(and the console should be independent of each other)
If you want multiple interactive consoles, you need to configure multiple <console> devices.
Virtio-serial have this feature ,I have gone through various install option on web , but they don't seem to work.
virtio-serial is not intended for consoles - it is for application communication channels.
Our kernel version for host and guest is 2.6.32-220.4.1.el6.x86_64
We goes through the mentioned link And edit our xml file by adding
<channel type='pty'> <target type='virtio' name='arbitrary.virtio.serial.port.name'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> Then we tried to access the channel device through virsh console guest_name dev_name
It gives error :-
# virsh console serial vport0p1 Connected to domain serial Escape character is ^] error: internal error cannot find character device vport0p1
The 'virsh consolve' command is only intended for use with interactive consoles for administrators. As such it completely ignores any <channel> devices which are for non-interactive use. So what you see here is normal. The vkirtio serial port is definitely available for use by your application What you actually want is to configure multiple <consolke> devices <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> They will be given names console0, console1, etc so with virsh console # virsh console --device console1 serial 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 :| DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

On Mon, May 14, 2012 at 11:09:46AM +0000, Pankaj Rawat wrote:
Well I tried it but it doesn’t work
<console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
All above are merged into one <console type='pty'> <target type='virtio' port='0'/> </console>
When I define the guest xml
Hmm, what version of libvirt do you have ? This behaviour suggest that your version is too old to support multiple consoles.
Following error received when I tried to execute the command
# virsh console --device console1 serial error: command 'console' doesn't support option --device
Doh, I mean --devname 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 :|

# libvirtd --version libvirtd (libvirt) 0.9.4 Regards Pankaj Rawat -----Original Message----- From: Daniel P. Berrange [mailto:berrange@redhat.com] Sent: Monday, May 14, 2012 5:30 PM To: Pankaj Rawat Cc: Christophe Fergeau; libvir-list@redhat.com Subject: Re: [libvirt] Libvirt Support Virtio-serail On Mon, May 14, 2012 at 11:09:46AM +0000, Pankaj Rawat wrote:
Well I tried it but it doesnt work
<console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
All above are merged into one <console type='pty'> <target type='virtio' port='0'/> </console>
When I define the guest xml
Hmm, what version of libvirt do you have ? This behaviour suggest that your version is too old to support multiple consoles.
Following error received when I tried to execute the command
# virsh console --device console1 serial error: command 'console' doesn't support option --device
Doh, I mean --devname 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 :| DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

Hi , I installed fedora17 on my system, the libvirt version is 0.9.11 I configured guest.xml as specified <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> When I define the guest xml I can see the port assigned to it Now when I try to access the console via #virsh console --devname console0 guest Or #virsh console --devname console1 guest My console get stuck , I am not getting any prompt. Is something I am missing? Regards Pankaj Rawat -----Original Message----- From: libvir-list-bounces@redhat.com [mailto:libvir-list-bounces@redhat.com] On Behalf Of Pankaj Rawat Sent: Tuesday, May 15, 2012 9:56 AM To: Daniel P. Berrange Cc: libvir-list@redhat.com; Christophe Fergeau Subject: Re: [libvirt] Libvirt Support Virtio-serail # libvirtd --version libvirtd (libvirt) 0.9.4 Regards Pankaj Rawat -----Original Message----- From: Daniel P. Berrange [mailto:berrange@redhat.com] Sent: Monday, May 14, 2012 5:30 PM To: Pankaj Rawat Cc: Christophe Fergeau; libvir-list@redhat.com Subject: Re: [libvirt] Libvirt Support Virtio-serail On Mon, May 14, 2012 at 11:09:46AM +0000, Pankaj Rawat wrote:
Well I tried it but it doesnt work
<console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
All above are merged into one <console type='pty'> <target type='virtio' port='0'/> </console>
When I define the guest xml
Hmm, what version of libvirt do you have ? This behaviour suggest that your version is too old to support multiple consoles.
Following error received when I tried to execute the command
# virsh console --device console1 serial error: command 'console' doesn't support option --device
Doh, I mean --devname 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 :| DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ----------------------------------------------------------------------------------------------------------------------- -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

On Tue, Jun 05, 2012 at 11:08:16AM +0000, Pankaj Rawat wrote:
Hi ,
I installed fedora17 on my system, the libvirt version is 0.9.11
I configured guest.xml as specified <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
When I define the guest xml I can see the port assigned to it
Now when I try to access the console via #virsh console --devname console0 guest Or #virsh console --devname console1 guest My console get stuck , I am not getting any prompt. Is something I am missing?
Without knowing anything about your setup, I'd guess you have no getty running. Dave
Regards Pankaj Rawat
-----Original Message----- From: libvir-list-bounces@redhat.com [mailto:libvir-list-bounces@redhat.com] On Behalf Of Pankaj Rawat Sent: Tuesday, May 15, 2012 9:56 AM To: Daniel P. Berrange Cc: libvir-list@redhat.com; Christophe Fergeau Subject: Re: [libvirt] Libvirt Support Virtio-serail
# libvirtd --version libvirtd (libvirt) 0.9.4
Regards Pankaj Rawat
-----Original Message----- From: Daniel P. Berrange [mailto:berrange@redhat.com] Sent: Monday, May 14, 2012 5:30 PM To: Pankaj Rawat Cc: Christophe Fergeau; libvir-list@redhat.com Subject: Re: [libvirt] Libvirt Support Virtio-serail
On Mon, May 14, 2012 at 11:09:46AM +0000, Pankaj Rawat wrote:
Well I tried it but it doesnt work
<console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
All above are merged into one <console type='pty'> <target type='virtio' port='0'/> </console>
When I define the guest xml
Hmm, what version of libvirt do you have ? This behaviour suggest that your version is too old to support multiple consoles.
Following error received when I tried to execute the command
# virsh console --device console1 serial error: command 'console' doesn't support option --device
Doh, I mean --devname
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 :|
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Well I tried many times. But result is still the same I am not able to connect to guest using this console , How can I ensure that the problem is getty , without entering into guest. And the main problem is if I use virtio-console alone , even ssh don't work.seems like there is some error Can you tell me if the problem is getty how can I resolve it, or it is something else ? The host is fedora17 And guest is rhel6.2, fedora17 The Host is running on a Intel I5 processor Regards Pankaj Rawat -----Original Message----- From: Dave Allan [mailto:dallan@redhat.com] Sent: Tuesday, June 05, 2012 5:56 PM To: Pankaj Rawat Cc: Daniel P. Berrange; libvir-list@redhat.com; Christophe Fergeau Subject: Re: [libvirt] Libvirt Support Virtio-serail On Tue, Jun 05, 2012 at 11:08:16AM +0000, Pankaj Rawat wrote:
Hi ,
I installed fedora17 on my system, the libvirt version is 0.9.11
I configured guest.xml as specified <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
When I define the guest xml I can see the port assigned to it
Now when I try to access the console via #virsh console --devname console0 guest Or #virsh console --devname console1 guest My console get stuck , I am not getting any prompt. Is something I am missing?
Without knowing anything about your setup, I'd guess you have no getty running. Dave
Regards Pankaj Rawat
-----Original Message----- From: libvir-list-bounces@redhat.com [mailto:libvir-list-bounces@redhat.com] On Behalf Of Pankaj Rawat Sent: Tuesday, May 15, 2012 9:56 AM To: Daniel P. Berrange Cc: libvir-list@redhat.com; Christophe Fergeau Subject: Re: [libvirt] Libvirt Support Virtio-serail
# libvirtd --version libvirtd (libvirt) 0.9.4
Regards Pankaj Rawat
-----Original Message----- From: Daniel P. Berrange [mailto:berrange@redhat.com] Sent: Monday, May 14, 2012 5:30 PM To: Pankaj Rawat Cc: Christophe Fergeau; libvir-list@redhat.com Subject: Re: [libvirt] Libvirt Support Virtio-serail
On Mon, May 14, 2012 at 11:09:46AM +0000, Pankaj Rawat wrote:
Well I tried it but it doesnt work
<console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
All above are merged into one <console type='pty'> <target type='virtio' port='0'/> </console>
When I define the guest xml
Hmm, what version of libvirt do you have ? This behaviour suggest that your version is too old to support multiple consoles.
Following error received when I tried to execute the command
# virsh console --device console1 serial error: command 'console' doesn't support option --device
Doh, I mean --devname
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 :|
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

Scenario:- The host is fedora17 Libvirt:0.9.11 And guest is rhel6.2, fedora17 The Host is running on a Intel I5 processor Our xml file contain entry for 1 serial console , 2 virtio console The xml file get properly defined, and proper port assigned to each console Now when guest is started. I am not able to connect via virtio console #virsh console --devname console1 guest My console get stuck , I am not getting any prompt. #virsh console guest It works fine but it connect to guest via serial console , not by virtion console. Now in guest I look for the virtio_console driver which I found is not loaded, also not separate getty started for any virtio console When I manually load the virtio console , even then I am not able to login using the virtio console
From http://libvirt.org/formatdomain.html#elementCharChannel A virtio console device is exposed in the guest as /dev/hvc[0-7]
But /dev/hvc0 .. are already present. What does above mean? Is something special needed to be done. Does we have to even modify guest to support multiple console, Instead of modifying just the guest xml. Regards Pankaj Rawat -----Original Message----- From: Dave Allan [mailto:dallan@redhat.com] Sent: Tuesday, June 05, 2012 5:56 PM To: Pankaj Rawat Cc: Daniel P. Berrange; libvir-list@redhat.com; Christophe Fergeau Subject: Re: [libvirt] Libvirt Support Virtio-serail On Tue, Jun 05, 2012 at 11:08:16AM +0000, Pankaj Rawat wrote:
Hi ,
I installed fedora17 on my system, the libvirt version is 0.9.11
I configured guest.xml as specified <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
When I define the guest xml I can see the port assigned to it
Now when I try to access the console via #virsh console --devname console0 guest Or #virsh console --devname console1 guest My console get stuck , I am not getting any prompt. Is something I am missing?
Without knowing anything about your setup, I'd guess you have no getty running. Dave
Regards Pankaj Rawat
-----Original Message----- From: libvir-list-bounces@redhat.com [mailto:libvir-list-bounces@redhat.com] On Behalf Of Pankaj Rawat Sent: Tuesday, May 15, 2012 9:56 AM To: Daniel P. Berrange Cc: libvir-list@redhat.com; Christophe Fergeau Subject: Re: [libvirt] Libvirt Support Virtio-serail
# libvirtd --version libvirtd (libvirt) 0.9.4
Regards Pankaj Rawat
-----Original Message----- From: Daniel P. Berrange [mailto:berrange@redhat.com] Sent: Monday, May 14, 2012 5:30 PM To: Pankaj Rawat Cc: Christophe Fergeau; libvir-list@redhat.com Subject: Re: [libvirt] Libvirt Support Virtio-serail
On Mon, May 14, 2012 at 11:09:46AM +0000, Pankaj Rawat wrote:
Well I tried it but it doesnt work
<console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console>
All above are merged into one <console type='pty'> <target type='virtio' port='0'/> </console>
When I define the guest xml
Hmm, what version of libvirt do you have ? This behaviour suggest that your version is too old to support multiple consoles.
Following error received when I tried to execute the command
# virsh console --device console1 serial error: command 'console' doesn't support option --device
Doh, I mean --devname
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 :|
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

Hi, Can Anyone please tell me if there is any option in virt-install by which we can specify this many consoles I mean I don’t want to edit xml file and then define it as it is a post installation process. I want to enable the multiple console port when I install the guest using virt-install Regards Pankaj Rawat Regards Pankaj Rawat -----Original Message----- From: Daniel P. Berrange [mailto:berrange@redhat.com] Sent: Monday, May 14, 2012 3:55 PM To: Pankaj Rawat Cc: Christophe Fergeau; libvir-list@redhat.com Subject: Re: [libvirt] Libvirt Support Virtio-serail On Mon, May 14, 2012 at 10:03:11AM +0000, Pankaj Rawat wrote:
Actually I wanted to have private communication channel b/w host and guest By default I cannot have multiple console on guest through virsh console guestname ( they all are dependent on each other , if I execute a command on one shell its output is reflected on all of them ). I wanted to login into guest from multiple shells(and the console should be independent of each other)
If you want multiple interactive consoles, you need to configure multiple <console> devices.
Virtio-serial have this feature ,I have gone through various install option on web , but they don't seem to work.
virtio-serial is not intended for consoles - it is for application communication channels.
Our kernel version for host and guest is 2.6.32-220.4.1.el6.x86_64
We goes through the mentioned link And edit our xml file by adding
<channel type='pty'> <target type='virtio' name='arbitrary.virtio.serial.port.name'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> Then we tried to access the channel device through virsh console guest_name dev_name
It gives error :-
# virsh console serial vport0p1 Connected to domain serial Escape character is ^] error: internal error cannot find character device vport0p1
The 'virsh consolve' command is only intended for use with interactive consoles for administrators. As such it completely ignores any <channel> devices which are for non-interactive use. So what you see here is normal. The vkirtio serial port is definitely available for use by your application What you actually want is to configure multiple <consolke> devices <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> <console type='pty'> <target type='virtio'/> </console> They will be given names console0, console1, etc so with virsh console # virsh console --device console1 serial 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 :| DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

On Fri, May 18, 2012 at 10:57:34AM +0000, Pankaj Rawat wrote:
Hi,
Can Anyone please tell me if there is any option in virt-install by which we can specify this many consoles
I mean I don’t want to edit xml file and then define it as it is a post installation process. I want to enable the multiple console port when I install the guest using virt-install
Have you tried using multiple --console switches? Christophe
participants (4)
-
Christophe Fergeau
-
Daniel P. Berrange
-
Dave Allan
-
Pankaj Rawat