qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QEMU IPMI support


From: Longever, Joseph
Subject: Re: [Qemu-devel] QEMU IPMI support
Date: Tue, 7 Apr 2015 11:05:53 -0400

Hi Corey,

I got it working now.   The port wasn't listening on the correct address when 
set to localhost but when I set the address to 0.0.0.0 it started listening on 
127.0.0.1.

Set serial parameters to:
serial 15 0.0.0.0 9002 codec VM ipmb 0x20

[   10.025336] ipmi message handler version 39.2
[   10.026097] ipmi device interface
[   10.027495] IPMI System Interface driver.
[   10.028333] ipmi_si: Trying SMBIOS-specified bt state machine at i/o address 
0xe4, slave address 0x20, irq 5
[   10.044514] IRQ 5/ipmi_si: IRQF_DISABLED is not guaranteed on shared IRQs
[   10.045493]   Using irq 5
[   10.100474] IPMI BT: req2rsp=10 secs retries=0
[   10.232824] ipmi: Found new BMC (man_id: 0x001291,  prod_id: 0x0f02, dev_id: 
0x00)
[   10.234981] IPMI bt interface initialized
[   10.245082] IPMI Watchdog: driver initialized

Thanks,
  Joel 

-----Original Message-----
From: Longever, Joseph 
Sent: Tuesday, April 07, 2015 8:52 AM
To: 'address@hidden'; 'qemu-devel'
Subject: RE: QEMU IPMI support

I'm sure this all works and it's just me... Attached is the config,   I also 
pasted the text below:

The startcmd starts a QEMU instance which then PXE boots Linux kernel 2.6.34 
with IPMI drivers enabled in the kernel:

  startcmd "qemu-system-x86_64 -vnc :1 --enable-kvm -chardev 
socket,id=ipmi0,host=localhost,port=9002,reconnect=10 -device 
isa-ipmi,chardev=ipmi0,interface=bt,irq=5 -device 
e1000,netdev=net0,mac=${VNETMAC} -netdev tap,id=net0 -device ich9-usb-ehci1 
-daemonize -serial mon:tcp::9003,server,telnet,nowait -m ${VMEM} -smp ${VSMP} 
${STARTCMD_OPTS}"

I'm running the latest version from sourceforge: OpenIPMI-2.0.21.


# vbmc.conf
# A configuration file for lanserv or ipmi_sim to configure the various # 
communication parameters for the device.

# This is a name used to identify this instance, and used to create # the 
default name of the emulator startup command file and eventually # the storage 
facility for permanent storage.
name "vbmc"

#
# Work on the BMC first
set_working_mc 0x20

  # Define a LAN channel on channel 1
  startlan 1
    # Define an IP address and port to listen on.  You can define more
    # than one address/port to listen on multiple addresses.  The ::
    # listens on all addresses.
    addr :: 623

    # Maximum privilege limit on the channel.
    priv_limit admin

    # Allowed IPMI 1.5 authorization types
    allowed_auths_callback none md2 md5 straight
    allowed_auths_user none md2 md5 straight
    allowed_auths_operator none md2 md5 straight
    allowed_auths_admin none md2 md5 straight

    # guid for IPMI 2.0 authorization  You can also use a string
    guid a123456789abcdefa123456789abcdef
    #guid "I_AM_A_REAL_BMC!"

    # You can specify a BMC key for IPMI 2.0 authorization.  See the
    # spec for details.
    #bmc_key "abcdefghijklmnopqrst"

    # A program to get and set the LAN configuration of the interface.
    #lan_config_program "/usr/local/bin/ipmi_sim_lancontrol eth0"
    lan_config_program "./ipmi_sim_lancontrol eth0"
  endlan

  #chassis_control "./ipmi_sim_chassiscontrol 0x20"

  # Define a serial VM inteface for channel 15 (the system interface) on
  # port 9002, just available to the local system (localhost).
  serial bt localhost 9002 codec VM ipmb 0x20

  # startcmd is what to execute to start a VM associated with the
  # codec above (localhost 9002).  It also starts a console serial port
  # on port 9003 that is also used as the monitor interface.

  startcmd "qemu-system-x86_64 -vnc :1 --enable-kvm -chardev 
socket,id=ipmi0,host=localhost,port=9002,reconnect=10 -device 
isa-ipmi,chardev=ipmi0,interface=bt,irq=5 -device 
e1000,netdev=net0,mac=${VNETMAC} -netdev tap,id=net0 -device ich9-usb-ehci1 
-daemonize -serial mon:tcp::9003,server,telnet,nowait -m ${VMEM} -smp ${VSMP} 
${STARTCMD_OPTS}" 
  
  # Start startcmd at startup?  Default is false.
  startnow true

  # The amount of time to wait for the startcmd to do a graceful shutdown
  # on a powerdown request.  The simulator will send a request to the
  # target, wait this amount of time, and then do a SIGTERM kill on the
  # process.  If this is zero, a SIGTERM will not be done (nor will a SIGKILL).
  # Note that if the simulator does not have a connection to the VM, the
  # graceful shutdown is skipped and a SIGTERM is done immediately.
  # Default time is 60 seconds.
  #poweroff_wait 30
  
  # The amount of time to wait for SIGTERM to kill the process.  If the process
  # does not terminate in this period of time, send a SIGKILL kill.  If this
  # is zero, don't send the SIGKILL.  Default time is 20 seconds.
  #kill_wait 5

  # Now add some users.  User 0 is invalid, user 1 is the special "anonymous"
  # user and cannot take a username.  Note that the users here are only
  # used if the persistent user config doesn't exist.
  #    # valid name    passw      priv-lim max-sess allowed-auths
  user 1 true  ""      "test"     user     10       none md2 md5 straight
  user 2 true  "admin" "password" admin    10       none md2 md5 straight

 # sol "/dev/ttyS0" 115200 history=4000 historyfru=10




-----Original Message-----
From: Corey Minyard [mailto:address@hidden On Behalf Of Corey Minyard
Sent: Tuesday, April 07, 2015 8:44 AM
To: Longever, Joseph; qemu-devel
Subject: Re: QEMU IPMI support

On 04/07/2015 07:24 AM, Longever, Joseph wrote:
> Hi Corey,
>
> Thanks so much for the support.  I pulled down the 2.2-ipmi stable snapshot 
> and everything compiled with no issues.
>
> Could you help confirm my configuration?

Can you send your complete configuration file and startup command file? 
I'm guessing you haven't enabled things properly in the startup command file or 
in the configuration file, and if you don't do that you won't get a valid BMC.  
It looks like it's connecting, just not working right.

Also, what version of OpenIPMI did you try?  The latest git release is probably 
the best.

I just tried it out, BTW, and it worked ok for me.

-corey

> I ran lanserv with the serial parameter to create the socket that will 
> communicate with the QEMU IPMI device over port 9002:
>
> Host lanserv config:
>  addr :: 623
>
>   # Define a serial VM inteface for channel 15 (the system interface) on
>   # port 9002, just available to the local system (localhost).
>   serial bt localhost 9002 codec VM ipmb 0x20
>
>   # startcmd is what to execute to start a VM associated with the
>   # codec above (localhost 9002).  It also starts a console serial port
>   # on port 9003 that is also used as the monitor interface.
>
>   startcmd "qemu-system-x86_64 -vnc :1 --enable-kvm -chardev 
> socket,id=ipmi0,host=localhost,port=9002,reconnect=10 -device 
> isa-ipmi,chardev=ipmi0,interface=bt,irq=5 -device 
> e1000,netdev=net0,mac=${VNETMAC} -netdev tap,id=net0 -device ich9-usb-ehci1 
> -daemonize -serial mon:tcp::9003,server,telnet,nowait -m ${VMEM} -smp ${VSMP} 
> ${STARTCMD_OPTS}"
>
>   # Start startcmd at startup?  Default is false.
>   startnow true
>
>
> But the QEMU VM doesn't find the BMC over the BT channel.  I've tried KCS 
> channel as well,  similar problem.  I also set the serial parameter for 
> channel 15, same.
>
> On VM:
> [   10.199536] ipmi message handler version 39.2
> [   10.201363] ipmi device interface
> [   10.203908] IPMI System Interface driver.
> [   10.204739] ipmi_si: Trying SMBIOS-specified bt state machine at i/o 
> address 0xe4, slave address 0x20, irq 5
> [   10.206353] ipmi_si: There appears to be no BMC at this location
> [   10.342602] ipmi_si: Unable to find any System Interface(s)
> [   10.344943] IPMI Watchdog: driver initialized
>
> The socket is listening on the host at port 9002 (the LAN port is the default 
> 623):
>
> address@hidden:~$ netstat -ln
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
> tcp        0      0 0.0.0.0:9003            0.0.0.0:*               LISTEN
> tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN
> tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN
> tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
> tcp        0      0 ::1:9002                :::*                    LISTEN
> tcp        0      0 :::22                   :::*                    LISTEN
> tcp        0      0 :::23                   :::*                    LISTEN
> udp        0      0 :::623                  :::*
> Active UNIX domain sockets (only servers)
> Proto RefCnt Flags       Type       State         I-Node Path
>
> Thanks,
>   Joel
>
> -




reply via email to

[Prev in Thread] Current Thread [Next in Thread]