several questions about serial console

This is a multi-part message in MIME format. --------------020703070607090404020701 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi all, About serial console: * how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there. * according to https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virt= ualization/3.6/html-single/Virtual_Machine_Management_Guide/index.html # ssh -t -p 2222 ovirt-vmconsole@/MANAGER_IP/ --vm-name/vm1 / should allow to connect directly to a vm on its serial port,=20 and it is very useful when there are a big number of vm. In reality, we=20 get a SSH issue : "unknown option -- -" * if we want to add 5 users with UserVmManager role on 150 vms and I can't use group for this stuff, this means I need to do this with an ovirt-shell script like : # for i in $(cat /tmp/ids.ovirt); do for j in $(cat /tmp/list_all);do ovirt-shell -E "add permission --parent-vm-name $j --user-id $i --role-name UserVmManager"; done; done and 5*150 API connections only because I can't add several user ids on the same "add permission" line ? It's doable, but not not very convinient and very long if I have many more users to add. * Why can't we add permission by user-name and not user-id ? Thnak you for your help. --=20 Nathana=C3=ABl Blanchet Supervision r=C3=A9seau P=C3=B4le Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 =09 T=C3=A9l. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr --------------020703070607090404020701 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf= -8"> </head> <body text=3D"#000000" bgcolor=3D"#FFFFFF"> Hi all,<br> <br> About serial console:<br> <ul> <li>how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there.</li> <li>according to <a class=3D"moz-txt-link-freetext" href=3D"https://access.redhat.= com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html-single= /Virtual_Machine_Management_Guide/index.html">https://access.redhat.com/d= ocumentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html-single/Virt= ual_Machine_Management_Guide/index.html</a> <br> <pre class=3D"screen"># ssh -t -p 2222 ovirt-vmconsole@<em class=3D= "replaceable">MANAGER_IP</em> --vm-name <em class=3D"replaceable">vm1 </e= m> </pre> </li> </ul> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 should allow to connect di= rectly to a vm on its serial port, and it is very useful when there are a big number of vm. In reality, we get a SSH issue : "unknown option -- -"<br> <ul> <li>if we want to add 5 users with UserVmManager role on 150 vms and I can't use group for this stuff, this means I need to do this with an ovirt-shell script like :<br> # for i in $(cat /tmp/ids.ovirt); do for j in $(cat /tmp/list_all);do ovirt-shell -E "add permission --parent-vm-name $j --user-id $i --role-name UserVmManager"; done; done<br> and 5*150 API connections only because I can't add several user ids on the same "add permission" line ? It's doable, but not not very convinient and very long if I have many more users to add.</= li> <li>Why can't we add permission by user-name and not user-id ?</li> </ul> <p>Thnak you for your help.<br> </p> <br> <pre class=3D"moz-signature" cols=3D"72">--=20 Nathana=C3=ABl Blanchet Supervision r=C3=A9seau P=C3=B4le Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 =09 T=C3=A9l. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:blanchet@abes.fr">bl= anchet@abes.fr</a> </pre> </body> </html> --------------020703070607090404020701--

This is a multi-part message in MIME format. --------------030507040202070400080700 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Le 15/04/2016 17:27, Nathana=EBl Blanchet a =E9crit :
Hi all,
About serial console:
* how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there= . * according to https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Vi= rtualization/3.6/html-single/Virtual_Machine_Management_Guide/index.html
# ssh -t -p 2222 ovirt-vmconsole@/MANAGER_IP/ --vm-name/vm1 /
should allow to connect directly to a vm on its serial port,=20 and it is very useful when there are a big number of vm. In reality,=20 we get a SSH issue : "unknown option -- -" An other question is : Why the vm order is not alphabetic? it could=20 simplify the search when too many vms are displayed. And a simple "sort=20 -k2" command should do the stuff...
* if we want to add 5 users with UserVmManager role on 150 vms and I can't use group for this stuff, this means I need to do this with an ovirt-shell script like : # for i in $(cat /tmp/ids.ovirt); do for j in $(cat /tmp/list_all);do ovirt-shell -E "add permission --parent-vm-name $j --user-id $i --role-name UserVmManager"; done; done and 5*150 API connections only because I can't add several user ids on the same "add permission" line ? It's doable, but not not very convinient and very long if I have many more users to add. * Why can't we add permission by user-name and not user-id ?
Thnak you for your help.
--=20 Nathana=EBl Blanchet
Supervision r=E9seau P=F4le Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 =09 T=E9l. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr =20
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--=20 Nathana=EBl Blanchet Supervision r=E9seau P=F4le Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 =09 T=E9l. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr --------------030507040202070400080700 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable <html> <head> <meta content=3D"text/html; charset=3Dwindows-1252" http-equiv=3D"Content-Type"> </head> <body text=3D"#000000" bgcolor=3D"#FFFFFF"> <br> <br> <div class=3D"moz-cite-prefix">Le 15/04/2016 17:27, Nathana=EBl Blanc= het a =E9crit=A0:<br> </div> <blockquote cite=3D"mid:57110852.5060208@abes.fr" type=3D"cite"> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dwindows-1252"> Hi all,<br> <br> About serial console:<br> <ul> <li>how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there.</li> <li>according to <a moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext" href=3D"https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_= Virtualization/3.6/html-single/Virtual_Machine_Management_Guide/index.htm= l">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtu= alization/3.6/html-single/Virtual_Machine_Management_Guide/index.html</a> <br> <pre class=3D"screen"># ssh -t -p 2222 ovirt-vmconsole@<em clas= s=3D"replaceable">MANAGER_IP</em> --vm-name <em class=3D"replaceable">vm1= </em> </pre> </li> </ul> =A0=A0=A0=A0=A0=A0=A0 should allow to connect directly to a vm on i= ts serial port, and it is very useful when there are a big number of vm. In reality, we get a SSH issue : "unknown option -- -"<br> </blockquote> An other question is : Why the vm order is not alphabetic? it could simplify the search when too many vms are displayed. And a simple "sort -k2" command should do the stuff...<br> <blockquote cite=3D"mid:57110852.5060208@abes.fr" type=3D"cite"> <ul> <li>if we want to add 5 users with UserVmManager role on 150 vms and I can't use group for this stuff, this means I need to do this with an ovirt-shell script like :<br> # for i in $(cat /tmp/ids.ovirt); do for j in $(cat /tmp/list_all);do ovirt-shell -E "add permission --parent-vm-name $j --user-id $i --role-name UserVmManager"; done; done<br> and 5*150 API connections only because I can't add several user ids on the same "add permission" line ? It's doable, but not not very convinient and very long if I have many more users to add.</li> <li>Why can't we add permission by user-name and not user-id ?</l= i> </ul> <p>Thnak you for your help.<br> </p> <br> <pre class=3D"moz-signature" cols=3D"72">--=20 Nathana=EBl Blanchet Supervision r=E9seau P=F4le Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 =09 T=E9l. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 <a moz-do-not-send=3D"true" class=3D"moz-txt-link-abbreviated" href=3D"ma= ilto:blanchet@abes.fr">blanchet@abes.fr</a> </pre> <br> <fieldset class=3D"mimeAttachmentHeader"></fieldset> <br> <pre wrap=3D"">_______________________________________________ Users mailing list <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:Users@ovirt.org">Use= rs@ovirt.org</a> <a class=3D"moz-txt-link-freetext" href=3D"http://lists.ovirt.org/mailman= /listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a> </pre> </blockquote> <br> <pre class=3D"moz-signature" cols=3D"72">--=20 Nathana=EBl Blanchet Supervision r=E9seau P=F4le Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 =09 T=E9l. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:blanchet@abes.fr">bl= anchet@abes.fr</a> </pre> </body> </html> --------------030507040202070400080700--

On Fri, Apr 15, 2016 at 7:18 PM, Nathanaël Blanchet <blanchet@abes.fr> wrote:
Le 15/04/2016 17:27, Nathanaël Blanchet a écrit :
Hi all,
About serial console:
how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there. according to https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualizat...
# ssh -t -p 2222 ovirt-vmconsole@MANAGER_IP --vm-name vm1
should allow to connect directly to a vm on its serial port, and it is very useful when there are a big number of vm. In reality, we get a SSH issue : "unknown option -- -"
Seems like a bug in the documentation. See also the README file: /usr/share/doc/ovirt-vmconsole/README on your machine, or https://gerrit.ovirt.org/gitweb?p=ovirt-vmconsole.git;a=blob;f=README
An other question is : Why the vm order is not alphabetic? it could simplify the search when too many vms are displayed. And a simple "sort -k2" command should do the stuff...
Please open an RFE for this. Thanks. I think you can do that yourself, by editing: /etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf
if we want to add 5 users with UserVmManager role on 150 vms and I can't use group for this stuff, this means I need to do this with an ovirt-shell script like : # for i in $(cat /tmp/ids.ovirt); do for j in $(cat /tmp/list_all);do ovirt-shell -E "add permission --parent-vm-name $j --user-id $i --role-name UserVmManager"; done; done and 5*150 API connections only because I can't add several user ids on the same "add permission" line ? It's doable, but not not very convinient and very long if I have many more users to add. Why can't we add permission by user-name and not user-id ?
Adding Francesco. Thanks and best regards, -- Didi

On 17 Apr 2016, at 11:53, Yedidyah Bar David <didi@redhat.com> wrote:
On Fri, Apr 15, 2016 at 7:18 PM, Nathanaël Blanchet <blanchet@abes.fr> wrote:
Le 15/04/2016 17:27, Nathanaël Blanchet a écrit :
Hi all,
About serial console:
how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there. according to https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualizat...
# ssh -t -p 2222 ovirt-vmconsole@MANAGER_IP --vm-name vm1
should allow to connect directly to a vm on its serial port, and it is very useful when there are a big number of vm. In reality, we get a SSH issue : "unknown option -- -"
Seems like a bug in the documentation. See also the README file:
/usr/share/doc/ovirt-vmconsole/README on your machine, or
https://gerrit.ovirt.org/gitweb?p=ovirt-vmconsole.git;a=blob;f=README
An other question is : Why the vm order is not alphabetic? it could simplify the search when too many vms are displayed. And a simple "sort -k2" command should do the stuff...
Please open an RFE for this. Thanks.
I think you can do that yourself, by editing:
/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf
if we want to add 5 users with UserVmManager role on 150 vms and I can't use group for this stuff, this means I need to do this with an ovirt-shell script like : # for i in $(cat /tmp/ids.ovirt); do for j in $(cat /tmp/list_all);do ovirt-shell -E "add permission --parent-vm-name $j --user-id $i --role-name UserVmManager"; done; done and 5*150 API connections only because I can't add several user ids on the same "add permission" line ? It's doable, but not not very convinient and very long if I have many more users to add. Why can't we add permission by user-name and not user-id ?
That’s a limitation/design of REST API In the UI you can highlight multiple VMs and assign roles all in one go Note you don’t have to use the UserVmManager role, it’s just one of the predefined ones. If you want your own, different, role you can always define a new one and add the serial console permission Thanks, michal
Adding Francesco.
Thanks and best regards, -- Didi _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Le 19/04/2016 09:50, Michal Skrivanek a écrit :
On 17 Apr 2016, at 11:53, Yedidyah Bar David <didi@redhat.com> wrote:
On Fri, Apr 15, 2016 at 7:18 PM, Nathanaël Blanchet <blanchet@abes.fr> wrote:
Le 15/04/2016 17:27, Nathanaël Blanchet a écrit :
Hi all,
About serial console:
how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there. according to https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualizat...
# ssh -t -p 2222 ovirt-vmconsole@MANAGER_IP --vm-name vm1
should allow to connect directly to a vm on its serial port, and it is very useful when there are a big number of vm. In reality, we get a SSH issue : "unknown option -- -"
Seems like a bug in the documentation. See also the README file:
/usr/share/doc/ovirt-vmconsole/README on your machine, or
https://gerrit.ovirt.org/gitweb?p=ovirt-vmconsole.git;a=blob;f=README For those who are interested, the working way is
# ssh -t -p 2222 ovirt-vmconsole@MANAGER_IP connect --vm-name vm1 None of the official rhev doc or /usr/share/doc/ovirt-vmconsole/README tells about it. Connect is the implicit default argument, but we have to provide it so as to specify a vm name.
An other question is : Why the vm order is not alphabetic? it could simplify the search when too many vms are displayed. And a simple "sort -k2" command should do the stuff... Please open an RFE for this. Thanks.
I think you can do that yourself, by editing:
/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf
if we want to add 5 users with UserVmManager role on 150 vms and I can't use group for this stuff, this means I need to do this with an ovirt-shell script like : # for i in $(cat /tmp/ids.ovirt); do for j in $(cat /tmp/list_all);do ovirt-shell -E "add permission --parent-vm-name $j --user-id $i --role-name UserVmManager"; done; done and 5*150 API connections only because I can't add several user ids on the same "add permission" line ? It's doable, but not not very convinient and very long if I have many more users to add. Why can't we add permission by user-name and not user-id ?
That’s a limitation/design of REST API In the UI you can highlight multiple VMs and assign roles all in one go Note you don’t have to use the UserVmManager role, it’s just one of the predefined ones. If you want your own, different, role you can always define a new one and add the serial console permission
Thanks, michal
Adding Francesco.
Thanks and best regards, -- Didi _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- Nathanaël Blanchet Supervision réseau Pôle Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr

Nathanaël Blanchet <blanchet@abes.fr> writes:
* how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there.
You must use ssh escape sequences with ssh, ~. should work here. See ESCAPE CHARACTERS section in `man ssh' for more information.

thank you, it works, exactly what I need. Le 20/04/2016 09:12, Milan Zamazal a écrit :
Nathanaël Blanchet <blanchet@abes.fr> writes:
* how to get out of a selectionned vm where we are on the login prompt (why not backing up to the vm menu) rather than killing the ssh process or closing the terminal? Usual "^] " doesn't work there. You must use ssh escape sequences with ssh, ~. should work here. See ESCAPE CHARACTERS section in `man ssh' for more information.
-- Nathanaël Blanchet Supervision réseau Pôle Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr
participants (4)
-
Michal Skrivanek
-
Milan Zamazal
-
Nathanaël Blanchet
-
Yedidyah Bar David