All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] QEMU IPMI support
       [not found]   ` <9C46C997A77C834C81ACBF2B3F67C31705657237D7@MX43A.corp.emc.com>
@ 2015-04-05  2:02     ` Corey Minyard
  2015-04-07 12:24       ` Longever, Joseph
  2015-04-07 12:31       ` Corey Minyard
  0 siblings, 2 replies; 7+ messages in thread
From: Corey Minyard @ 2015-04-05  2:02 UTC (permalink / raw)
  To: Longever, Joseph, qemu-devel

Ok, done.  It's at https://github.com/cminyard/qemu on github.  There
are two branches at the moment, stable-2.2-ipmi is based on the 2.2
release and will not rebase.  master-ipmi-rebase will rebase on master
as it moves.

I haven't done extensive testing yet, and it has a few experimental
things, like an SMBus IPMI interface and an I2C mux device.  I need to
split all that out at some point.  I also need to rework the ACPI
handling to use the new code to build the ACPI tables.

Copying qemu-devel so that group knows.

Thanks,

-corey

On 04/03/2015 01:17 PM, Longever, Joseph wrote:
> Hi Corey,
>
> Yes please,  setting up a git repo on git hub with IPMI support would be a tremendous help.   
>
> Thank you,
>   Joel
>
> -----Original Message-----
> From: Corey Minyard [mailto:tcminyard@gmail.com] On Behalf Of Corey Minyard
> Sent: Friday, April 03, 2015 2:16 PM
> To: Longever, Joseph
> Subject: Re: QEMU IPMI support
>
> On 04/01/2015 07:23 AM, Longever, Joseph wrote:
>> Hi Corey,
>>
>>  
>>
>> I noticed a lot of work you had done to add IPMI/BMC emulation to QEMU 
>> ... great work!
>>
>> http://sourceforge.net/p/openipmi/mailman/openipmi-developer/thread/13
>> 69865296-19584-1-git-send-email-minyard%40acm.org/#msg30911152
>>
>>
>>  
>>
>> I was wondering if they were going to push those features into an
>> official QEMU release?   To avoid porting the above patches over (not
>> sure which commit it's based on,  1.5.0?),  would you have the patch 
>> set to support the latest stable QEMU version?  I would like to use 
>> OpenIPMI's lanserv to spawn a QEMU KVM with IPMI char device enabled, 
>> however I think I need your patches to enable the device in QEMU.
>>
>>  
>>
>> Any suggestions or help is very much appreciated.
>>
>>  
>>
>> Thanks,
>>
>>   Joel   
>>
>>  
>>
> I'm not sure when I can get this pushed in.  It's really more up to the qemu maintainers, and they are pretty busy with bigger stuff.  Unless Redhat wants changes, which is how the qemu-char changes I needed for IPMI support got into the release.
>
> I can set up a git repository on github.  Would that help?
>
> -corey

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU IPMI support
  2015-04-05  2:02     ` [Qemu-devel] QEMU IPMI support Corey Minyard
@ 2015-04-07 12:24       ` Longever, Joseph
  2015-04-07 12:43         ` Corey Minyard
  2015-04-07 12:31       ` Corey Minyard
  1 sibling, 1 reply; 7+ messages in thread
From: Longever, Joseph @ 2015-04-07 12:24 UTC (permalink / raw)
  To: minyard, qemu-devel

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?

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):

root@vBMC1:~$ 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 

-----Original Message-----
From: Corey Minyard [mailto:tcminyard@gmail.com] On Behalf Of Corey Minyard
Sent: Saturday, April 04, 2015 10:02 PM
To: Longever, Joseph; qemu-devel
Subject: Re: QEMU IPMI support

Ok, done.  It's at https://github.com/cminyard/qemu on github.  There are two branches at the moment, stable-2.2-ipmi is based on the 2.2 release and will not rebase.  master-ipmi-rebase will rebase on master as it moves.

I haven't done extensive testing yet, and it has a few experimental things, like an SMBus IPMI interface and an I2C mux device.  I need to split all that out at some point.  I also need to rework the ACPI handling to use the new code to build the ACPI tables.

Copying qemu-devel so that group knows.

Thanks,

-corey

On 04/03/2015 01:17 PM, Longever, Joseph wrote:
> Hi Corey,
>
> Yes please,  setting up a git repo on git hub with IPMI support would be a tremendous help.   
>
> Thank you,
>   Joel
>
> -----Original Message-----
> From: Corey Minyard [mailto:tcminyard@gmail.com] On Behalf Of Corey 
> Minyard
> Sent: Friday, April 03, 2015 2:16 PM
> To: Longever, Joseph
> Subject: Re: QEMU IPMI support
>
> On 04/01/2015 07:23 AM, Longever, Joseph wrote:
>> Hi Corey,
>>
>>  
>>
>> I noticed a lot of work you had done to add IPMI/BMC emulation to 
>> QEMU ... great work!
>>
>> http://sourceforge.net/p/openipmi/mailman/openipmi-developer/thread/1
>> 3
>> 69865296-19584-1-git-send-email-minyard%40acm.org/#msg30911152
>>
>>
>>  
>>
>> I was wondering if they were going to push those features into an
>> official QEMU release?   To avoid porting the above patches over (not
>> sure which commit it's based on,  1.5.0?),  would you have the patch 
>> set to support the latest stable QEMU version?  I would like to use 
>> OpenIPMI's lanserv to spawn a QEMU KVM with IPMI char device enabled, 
>> however I think I need your patches to enable the device in QEMU.
>>
>>  
>>
>> Any suggestions or help is very much appreciated.
>>
>>  
>>
>> Thanks,
>>
>>   Joel   
>>
>>  
>>
> I'm not sure when I can get this pushed in.  It's really more up to the qemu maintainers, and they are pretty busy with bigger stuff.  Unless Redhat wants changes, which is how the qemu-char changes I needed for IPMI support got into the release.
>
> I can set up a git repository on github.  Would that help?
>
> -corey

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU IPMI support
  2015-04-05  2:02     ` [Qemu-devel] QEMU IPMI support Corey Minyard
  2015-04-07 12:24       ` Longever, Joseph
@ 2015-04-07 12:31       ` Corey Minyard
  1 sibling, 0 replies; 7+ messages in thread
From: Corey Minyard @ 2015-04-07 12:31 UTC (permalink / raw)
  To: Longever, Joseph, qemu-devel

On 04/04/2015 09:02 PM, Corey Minyard wrote:
> Ok, done.  It's at https://github.com/cminyard/qemu on github.  There
> are two branches at the moment, stable-2.2-ipmi is based on the 2.2
> release and will not rebase.  master-ipmi-rebase will rebase on master
> as it moves.
>
> I haven't done extensive testing yet, and it has a few experimental
> things, like an SMBus IPMI interface and an I2C mux device.  I need to
> split all that out at some point.  I also need to rework the ACPI
> handling to use the new code to build the ACPI tables.
>
> Copying qemu-devel so that group knows.
>
> Thanks,
>
> -corey
>
> On 04/03/2015 01:17 PM, Longever, Joseph wrote:
>> Hi Corey,
>>
>> Yes please,  setting up a git repo on git hub with IPMI support would be a tremendous help.   
>>
>> Thank you,
>>   Joel
>>
>> -----Original Message-----
>> From: Corey Minyard [mailto:tcminyard@gmail.com] On Behalf Of Corey Minyard
>> Sent: Friday, April 03, 2015 2:16 PM
>> To: Longever, Joseph
>> Subject: Re: QEMU IPMI support
>>
>> On 04/01/2015 07:23 AM, Longever, Joseph wrote:
>>> Hi Corey,
>>>
>>>  
>>>
>>> I noticed a lot of work you had done to add IPMI/BMC emulation to QEMU 
>>> ... great work!
>>>
>>> http://sourceforge.net/p/openipmi/mailman/openipmi-developer/thread/13
>>> 69865296-19584-1-git-send-email-minyard%40acm.org/#msg30911152
>>>
>>>
>>>  
>>>
>>> I was wondering if they were going to push those features into an
>>> official QEMU release?   To avoid porting the above patches over (not
>>> sure which commit it's based on,  1.5.0?),  would you have the patch 
>>> set to support the latest stable QEMU version?  I would like to use 
>>> OpenIPMI's lanserv to spawn a QEMU KVM with IPMI char device enabled, 
>>> however I think I need your patches to enable the device in QEMU.
>>>
>>>  
>>>
>>> Any suggestions or help is very much appreciated.
>>>
>>>  
>>>
>>> Thanks,
>>>
>>>   Joel   
>>>
>>>  
>>>
>> I'm not sure when I can get this pushed in.  It's really more up to the qemu maintainers, and they are pretty busy with bigger stuff.  Unless Redhat wants changes, which is how the qemu-char changes I needed for IPMI support got into the release.

As a note, that last comment was neither true nor fair.  I apologize for
this statement, and nobody should make disparaging remarks about the
maintainers that work so hard on this.

-corey

>>
>> I can set up a git repository on github.  Would that help?
>>
>> -corey

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU IPMI support
  2015-04-07 12:24       ` Longever, Joseph
@ 2015-04-07 12:43         ` Corey Minyard
  2015-04-07 12:51           ` Longever, Joseph
  2015-04-07 15:05           ` Longever, Joseph
  0 siblings, 2 replies; 7+ messages in thread
From: Corey Minyard @ 2015-04-07 12:43 UTC (permalink / raw)
  To: Longever, Joseph, qemu-devel

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):
>
> root@vBMC1:~$ 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 
>
> -

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU IPMI support
  2015-04-07 12:43         ` Corey Minyard
@ 2015-04-07 12:51           ` Longever, Joseph
  2015-04-07 15:05           ` Longever, Joseph
  1 sibling, 0 replies; 7+ messages in thread
From: Longever, Joseph @ 2015-04-07 12:51 UTC (permalink / raw)
  To: minyard, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 7679 bytes --]

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:tcminyard@gmail.com] 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):
>
> root@vBMC1:~$ 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
>
> -


[-- Attachment #2: vbmc.conf --]
[-- Type: application/octet-stream, Size: 3437 bytes --]

# 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU IPMI support
  2015-04-07 12:43         ` Corey Minyard
  2015-04-07 12:51           ` Longever, Joseph
@ 2015-04-07 15:05           ` Longever, Joseph
  1 sibling, 0 replies; 7+ messages in thread
From: Longever, Joseph @ 2015-04-07 15:05 UTC (permalink / raw)
  To: minyard, qemu-devel

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: 'minyard@acm.org'; '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:tcminyard@gmail.com] 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):
>
> root@vBMC1:~$ 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
>
> -

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Qemu IPMI support
       [not found] ` <20131105135305.GA3696@redhat.com>
@ 2013-11-05 16:43   ` Bret Ketchum
  0 siblings, 0 replies; 7+ messages in thread
From: Bret Ketchum @ 2013-11-05 16:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

   Will do, thanks.


On Tue, Nov 5, 2013 at 7:53 AM, Michael S. Tsirkin <mst@redhat.com> wrote:

> On Tue, Nov 05, 2013 at 07:27:42AM -0600, Bret Ketchum wrote:
> > Gentlemen,
> >
> >     Hope this email finds you well and hope you can point me in the right
> > direction. I've a project which requires a VM to see a BMC at an IO Port
> on an
> > ISA bus. I've adapted (rather in the process of) the patches described
> here:
> >
> > http://lists.gnu.org/archive/html/qemu-devel/2013-05/msg04335.html
> >
> >     To 1.6.1 but am wondering about the process where a patch on
> qemu-devel
> > finds its way into a release. I'd like to see Corey's patch become
> reality for
> > obvious reasons. How may I facilitate this patch becoming a part of a
> future
> > release?
> >
> >     Any insight is appreciated and thanks in advance.
> >
> >     Bret
> >
> >
>
> I think it's a good idea to rebase this on top of latest bits.
>
> In particular, there's no need to add FW CFG interfaces
> anymore, now that we generate the ACPI tables in QEMU.
>
> Pls Cc me on the series when you post them,
> I'll try to help review.
>
> --
> MST
>

[-- Attachment #2: Type: text/html, Size: 1809 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-07 15:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <9C46C997A77C834C81ACBF2B3F67C31705657234BF@MX43A.corp.emc.com>
     [not found] ` <551ED8C5.7020003@acm.org>
     [not found]   ` <9C46C997A77C834C81ACBF2B3F67C31705657237D7@MX43A.corp.emc.com>
2015-04-05  2:02     ` [Qemu-devel] QEMU IPMI support Corey Minyard
2015-04-07 12:24       ` Longever, Joseph
2015-04-07 12:43         ` Corey Minyard
2015-04-07 12:51           ` Longever, Joseph
2015-04-07 15:05           ` Longever, Joseph
2015-04-07 12:31       ` Corey Minyard
     [not found] <CAGm6yaQdByfFu=8qv4+tt01jE=uDupFzDcXUBghFA0YJaRn1cQ@mail.gmail.com>
     [not found] ` <20131105135305.GA3696@redhat.com>
2013-11-05 16:43   ` [Qemu-devel] Qemu " Bret Ketchum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.