On 02/22/2016 05:56 AM, Janne Huttunen wrote:
> Hi!
>
> For testing a certain tool, I need a group of virtual machines that
> can be at least somewhat controlled via IPMI network interface. While
> searching for a solution, I found 'ipmi_sim' that seems to do almost
> everything I need, which was great. However while trying it out, I
> found some behavior that I would consider to be bugs (patces in
> separate mails) and also got some questions (below).

Thank you, both are pushed into the repository now.

> So, I am currently using ipmi_sim and specifically the 'startcmd'
> feature of it to control qemu-system emulator to provide the needed
> functionality. While it seems to work quite nicely, there still are
> a few questions I'd like to ask:
>
> #1.
>
> I need to connect the Serial-over-LAN to a serial port of the started
> qemu-system process. Is there some nice way to do this? Obviously if
> QEMU is started by ipmi_sim, QEMU cannot be the process that creates
> the pty that is used for the communication (right?). I have tried to
> use an additional socat process for creating the pty and waiting for
> the qemu to start, but it feels quite awkward. Is there a better way?
> Or any plans to implement one?

That would be quite handy, wouldn't it?  Right now the SOL code
only works with a real serial port.  I have considered this in the
past, but I haven't gotten to it.  The socat way (or two real serial
ports) is the only thing that will work for now.

My plan on this would be to have something like sol "tcp:<addr>:<port>"
or something like that.  There are some things that would have to
be faked (DTR, RTS) but it shouldn't be too hard.

> #2.
>
> I'd like to configure the boot source (disk/pxe/etc.) of the QEMU via
> e.g. 'ipmitool chassis bootdev' command. Strictly speaking being able
> to _really_ configure it is not a must (I have hardcoded the order the
> tool tries to set as a workaround), but it would be nice to have and at
> least the IPMI command must not fail. Is there any plans to e.g. have
> ipmi_sim support setting the boot source also with 'startcmd'? How would
> it pass the setting to the actual start command? If not, could ipmi_sim
> at least ignore enough boot option setting commands so that the ipmitool
> would not fail (currently I'm locally using ipmi_sim patched just like
> that as a workaround)?

There is a way to do this, but it's a bit messy, and the code isn't
quite right to handle this.

To make something flexible enough for everyone would really be
too hard to do inside ipmi_sim itself, so it's done with external
scripts.

You can define a "chassis_control" command that will get called for
anything chassis related.  So you you do the boot command, it
should call your chassis control function.  See the file named
ipmi_sim_chassiscontrol for details on this.  The docs there are
not 100% correct, you may have to look at the code or experiment
for this.  You can use that script to save information and another
script to actually start qemu based upon the saved information.

The trouble with this is that it will override the standard power
and reset control that should go to qemu. If you look in the
"set_power()" function in bmc_chassis.c, the HW_OP things
are the ones that are used to talk over the channel, which
is how things get to qemu.

To fix this, I'm not sure if it's better to have the channel
commands override the external command, or to have the
external command return some value to say they don't
support the command and then try the channel
commands.  The first option removes some flexibility
from the scripts.  The second option is a bit harder to
implement.  I think I would prefer the second option.

-corey

>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Openipmi-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openipmi-developer


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to