Wednesday, May 1, 2013

ProLiant Virtual Serial Port

While working through the configuration of iLO3 for our HP DL380 G7 servers, I found a few pages talking about the Virtual Serial Port (VSP).

This sounded interesting so I though I would try it out. I was using this page as a guide but it was a bit out of date.

The first thing to mention was that this does indeed work with iLO3. When configuring your iLO3, remember that in order to ssh to iLO3 you must have a PTY (-t -t), use protocol version 2 (-2) and use DSA keys (ssh-keygen -t dsa). My old configuration for older versions of iLO used exactly the opposite for all of these settings which took some time to figure out (and HP only recently identified/fixed the bugs with ssh keys).

Once you can ssh to your iLO interface, you can issue the command
and it will start a terminal emulator (actually, it just passes everything through to your terminal program so you can use xterm if you want but safer to assume a vt102). To exit, press ESCape and then ( and you will return to the iLO prompt.

For the OS configuration, I found that I had to make a few alterations. First, RHEL6/CentOS6 uses upstarts and not inittab. If you are not booting with a serial console you must create your own init script:
# ttyS1 - agetty
# This service maintains a agetty on ttyS1 for iLO3 VSP.

stop on runlevel [S016]
start on runlevel [235]

exec agetty -8 -L -w /dev/ttyS1 115200 vt102

You can then enable the console with the command
start ttyS1
Next time you reboot it should start automatically.

In order to log in as root you must add the terminal it to the /etc/securetty file:
echo '/dev/ttyS1' >>  /etc/securetty

So that was all good. Now I want to roll this out to all my servers. To do this I needed some puppet magic. Not surprising, puppet let me down on most of the steps for this.
# Install the init script. This one is easy, just dump in the file 

file { "/etc/init/ttyS1.conf":

# Add the entry to securetty
augeas { "securetty_ttyS1":
# Ha ha. securetty has a special lens which is different to most other config files
context => "/files/etc/securetty",
changes => [ "ins 0 before /files/etc/securetty/1",
             "set /files/etc/securetty/0 ttyS1",
onlyif  => "match *[.='ttyS1'] size == 0",

# Enable & start the service. My version of puppet does not support upstarts on CentOS so I can't do this:
service { "ttyS1":
provider => upstart,
ensure => running,
enable => true,
# Instead I have created my own type
define upstart($ensure = "running", enable = "true") {
        service { "upstart-$name":
                provider => 'base',
                ensure => $ensure,
                enable => $enable,
                hasstatus => true,
                start  => "/sbin/initctl start $name",
                stop   => "/sbin/initctl stop $name",
                status => "/sbin/initctl status $name | /bin/grep -q '/running'",
upstart{"ttyS1": }

And finally, I need to make sure the server BIOS is configured with the VSP.

package { "hp-health": ensure => present } ->
service { "hp-health":
        ensure => running,
        hasstatus => true,
        hasrestart => true,
        enable => true,
} ->

exec { "vsp":
        logoutput => "true",
        path => ["/bin", "/sbin", "/usr/bin", "/usr/sbin"],
        command => "/sbin/hpasmcli -s 'SET SERIAL VIRTUAL COM2'",
        unless => "/sbin/hpasmcli -s 'SHOW SERIAL VIRTUAL' | grep 'The virtual serial port is currently COM2'",
        require => Class['hp_drivers::service'],
} ->

# while we are messing with the serial ports, make COM1 work as the physical device
exec { "com1":
        logoutput => "true",
        path => ["/bin", "/sbin", "/usr/bin", "/usr/sbin"],
        command => "/sbin/hpasmcli -s 'SET SERIAL EMBEDDED PORTA COM1'",
        unless => "/sbin/hpasmcli -s 'SHOW SERIAL EMBEDDED' | grep 'Embedded serial port A: COM1'",
        require => Class['hp_drivers::service'],


  1. Thank you very much for this post! HP's documentation is very confusing as it shows configuring upstart and inittab:

  2. Great info.
    How about when you want to use the embedded serial port and the the VSP?

  3. Thanx for sharing such useful post keep it up Nora

  4. When enabled, Virtual Serial Port provides remote access through the iLO management controller to BIOS Serial Console.

    download showbox apkxyz

  5. I actually agree with you!

  6. تسرب المياه تعتبر مشكلة تسرّب المياه من المشاكل التي تؤرق الأفراد بشكل كبير؛ وذلك لما تُلحقه من ضرر بالمباني والمنازل، لذلك لا بد من السعي الدؤوب للكشف عما إذا كان هناك تسريب مائي أم لا. ويُعرف تسريب المياه بأنّه خلل يطرأ على توصيلات المياه بمختلف أشكالها، سواء كان ذلك في مواسير الصرف أو أكواعها أو مختلف أجزاء مواسير المياه، ومنها: الحنفيات، والخزانات، والسخانات، فيتسبب ذلك الخلل بخروج المياه من المسار المحدد لها إلى محيط المواسير فتتجمع المياه بالقرب من الأماكن المحيطة بالتسريب كالأرضيات والجدران فتلحق الضرر بها نتيجة تفاعلها مع مواد البناء، وتآكل الحديد وتهالك الخرسانة، وبالتالي تفاقم المشاكل في حال التغاضي عن علاجها.
    شركة كشف تسربات المياه بمكة
    أنواع تسرب المياه التسربات الظاهرة: وذلك الخلل الذي يصيب التوصيلات البارزة أو القائمة في الجزء الخارجي من الحوائط والأرضيات ومُشاهدته بالعين المجردة كالحنفيات، والتوصيلات الخارجية، والسخانات، أو الخزانات العلوية، ويمتاز هذا النوع بسهولة الإصلاح والاكتشاف. التسربات المخفية: يصيب هذا النوع من التسريب الوصلات الداخلية للمياه والتي غالباً ما تكون داخل في الجدران والأرضيات، ويُلاحظ الاختلاف الكبير بينها وبين التسربات الظاهرة نظراً لصعوبة اكتشافها، حيث لا يمكن ذلك إلّا بالاعتماد على النتائج التي يمكن ملاحظتها في المكان المحيط بالتسريب على هيئة تشوهات وتشققات وبقع ذات لون متغير.
    تقدم شركة العطار خدمات كشف تسربات المياه وتعمل علي اصلاحها
    شركة كشف تسربات المياه بجدة
    من افضل واكبر الشركات المتخصصه فى مجال كشف تسربات المياه نعتبر من الشركات الرائده بمجال كشف تسربات المياه نستخدم افضل واحدث الوسائل والادوات المستخدمه للكشف عن الاسباب الرئيسيه فى تسربات المياه دون الحاجه للقيام باى اعمال تكسيرات او احداث اى خسائر ماديه نقوم بتقديم افضل الخدمات خدمات على اعلى مستوى
    شركة كشف تسربات المياه بالطائف

  7. Oh my goodness! an amazing article dude. Thank you However I am experiencing issue with ur rss. Don’t know why Unable to subscribe to it. Is there anyone getting identical rss problem? Anyone who knows kindly respond. Thnkx
    Click Here
    Visit Web

  8. Thank you for sharing the great information with us. this blog is
    very good and informative.
    ทางเข้า igoal

  9. Wow, What an Outstanding post. I found this too much informatics.I t is what I was seeking for whatsapp plus. It works very stable and good.

  10. Thanks for the detailed article on this topic.I would like to see more such awesome articles from you.


  11. Watch drama online in high quality. Free download high quality korean drama
    Various formats Full HD from 240p 360p 480p 720p even 1080p. free dramas hd.


  12. Star Plus Show, Production company, Premiere Date. Kabhi Kabhie Ittefaq Sey,
    Cockcrow Pictures Shaika Entertainment Magic Moments Motion Pictures, TBA.

    Bade Achhe Lagte Hain 2

  13. Star Plus Show, Production company, Premiere Date. Kabhi Kabhie Ittefaq Sey,
    Cockcrow Pictures Shaika Entertainment Magic Moments Motion Pictures, TBA.

    Ghum Hai Kisi Ke Pyar Mein

  14. Bigg Boss Season 16 will see the return of some of the country's biggest stars.
    The contestants include Salman Khan as Host. The show will air on all days of week.

    Bigg Boss 16 Online

  15. With the unlock, the small screen made sure the entertainment quotient
    for its loyal audience is not compromised. Anupama. When ratings made the
    Anupama Episode

  16. Apk UC browser is a suitable application for your requirements. Because of its easy download for any type of video