[ovirt-users] ovirt-vmconsole serial

Nathanaël Blanchet blanchet at abes.fr
Mon Apr 25 08:06:22 UTC 2016


Le 24/04/2016 19:49, Paul Groeneweg | Pazion a écrit :
> I have followed the setup on 
> http://www.ovirt.org/documentation/admin-guide/serial-console-setup/
>
> I am able to ssh to the hosted engine and select a VM.
> A VM with console enabled and permissions set gives a blank screen ( 
> freezes ).
Many reasons can lead to this, depending on the guest os.
Have you modified all needed files into the guest OS?

  This is what I did for my vms (tty0 is to get the boot sequence into 
the spice/vnc console insted of a black screen)

CentOS 5:

  * grub.conf

for i in $(cat /tmp/update_grub); do ssh root@$i 'sed -e 
"s/^\\t\(kernel\).*$/&*console\=tty0 console\=ttyS0*/g" -i 
/etc/grub.conf'; done

  * inittab

for i in $(cat /tmp/liste) ; do echo $i; ssh root@$i "sed -i \"/tty6/a 
*S0:2345:respawn:/sbin/mingetty ttyS0*\" /etc/inittab"; done

  * securetty

for i in $(cat /tmp/liste) ; do echo $i; ssh root@$i "sed -i \"/tty11/a 
*ttyS0*\" /etc/securetty"; done

CentOS 6:

  * grub.conf

for i in $(cat /tmp/update_grub); do ssh root@$i 'sed -e 
"s/^\\t\(kernel\).*$/&*console\=tty0 console\=ttyS0*/g" -i 
/etc/grub.conf'; done

  * securetty

for i in $(cat /tmp/liste) ; do echo $i; ssh root@$i "sed -i \"/tty11/a 
*ttyS0*\" /etc/securetty"; done

CentOS 7 : securetty file already includes ttyS0 by default

  * grub2.cfg

for i in $(cat /tmp/update_grub2);do echo -e "$i:\n"; ssh root@$i 'sed 
-e "s/^\\t\(linux16\).*$/&*console\=tty0 console\=ttyS0*/g" -i 
/boot/grub2/grub.cfg'; done
for i in $(cat /tmp/update_grub2);do echo -e "$i:\n"; ssh root@$i 
'grub2-mkconfig -o /boot/grub2/grub.cfg'; done

As a last alternative, grubby does the staff on every OS and grub 
versions, but doesn't modify the securetty file.

  * grubby

for i in $(cat /tmp/update_grub2);do echo -e "$i:\n"; ssh root@$i 
"grubby --update-kernel=ALL --args=\"console=tty0 console=ttyS0\""; done
>
> So I checked serial-getty at .service
So you run el7 :)
> Am I right this service should run on a host?
Sure, but not enough
>
> When I check status, I get this:
>
> ... systemd[1]: *Dependency failed for Serial Getty on hvc0.*
>
> .. systemd[1]: *Job serial-getty at hvc0.service/start failed with result 
> 'dependency'.*
>
> *
> *
>
> What needs to be done? When I restart the service it takes a long tine 
> and looks like a timeout is triggered.
>
you can check if ttyS0 is opened with  stty < /dev/ttyS0
If true, the issue might come from a right permission.
Did you add the wanted user (doesn't work with group) per vm with the 
minimum UserVmManager role?
if the user is SuperUser, it still can't connect to the console due to a 
bug.
>
> Looking forward to use the serial console feature.
>
it works very well and it is very convinient:)

Just a last tip : the default escape character to escape from ssh is "~."

Good luck!
>
> *
> *
>
>
>
> _______________________________________________
> Users mailing list
> Users at 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 at abes.fr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160425/21f92845/attachment-0001.html>


More information about the Users mailing list