openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT?
@ 2019-12-19  8:25 =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
  2019-12-19 13:37 ` Stephen Beckwith
  2019-12-19 21:22 ` how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT? Andrew Jeffery
  0 siblings, 2 replies; 5+ messages in thread
From: =?gb18030?B?xM/SsKXgpeult6WopemltA==?= @ 2019-12-19  8:25 UTC (permalink / raw)
  To: =?gb18030?B?b3BlbmJtYw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 836 bytes --]

Greetings!


I am a learner of openbmc, for some reason I do not have a real BMC nor a real server, I run openbmc in qemu. Recentlly I want to learn how BMC communicate with HOST System. But it seems qemu can not emulate this scenario. 
Can someone help tell me:
Is there a mechanism allow me to run openbmc in qemu1 and at the same time run OS in qemu2. And let qemu1 run as the qemu2's BMC hardware and communicate via KCS or BT interface? Like the following sequence:
[qemu1&nbsp; [openbmc&nbsp; [bt-bmc]]]<------LPC--------&gt;|-----system IPC-----|<------LPC--------&gt;[[[ipmi_si]&nbsp; host]&nbsp; qemu2]
And what can I do?
I have seen there is some code in qemu source code:
qemu/hw/ipmi/*
and in linux-5.3 source code:
drivers/char/ipmi/*
Dose this can help mitigate my problem?


Best Regards!
Liu Hongwei

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

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

* Re: how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT?
  2019-12-19  8:25 how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT? =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
@ 2019-12-19 13:37 ` Stephen Beckwith
  2019-12-19 21:20   ` Andrew Jeffery
  2019-12-19 21:22 ` how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT? Andrew Jeffery
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Beckwith @ 2019-12-19 13:37 UTC (permalink / raw)
  To: 南野ムルシエラゴ; +Cc: openbmc

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

Lui Hongwei;
   Here is how we handled our initial setup for OpenBMC:
1) all of this runs in a single VirtualMachine on a Host System (an Apple
Macbook in my case) - the VM is running an ubuntu 18.04 LTS OS.
2) Within this VM:
a) Build the OpenBMC image for AST2500
b) You will need to rebuild from downloaded source the QEMU version 4.1.0
to run the AST2500.  The "stock" version that is delivered with Ubuntu
18.03 is 2.11, and does not work.   Rebuild this and keep a copy to
re-install as necessary.
c) you will also need to install ipmitool on this system.
3)  In Terminal Window 1:   Use this command to run the image:
qemu-system-arm \
-machine ast2500-evb \
-m 256 \
-nographic \
-drive file=obmc-phosphor-image-evb-ast2500.static.mtd,format=raw,if=mtd \
-net nic \
-net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443
-:443,hostfwd=udp:127.0.0.1:2623-:623,hostname=qemu
3) In Terminal Window 2:  You can run the ipmitool to talk to the AST2500
BMC image:
ipmitool -H 127.0.0.1 -I lanplus -p 2623  -U root -P 0penBmc chassis power
status
Chassis Power is off

IPMI "raw" commands also work:
ipmitool -H 127.0.0.1 -I lanplus -p 2623  -U root -P 0penBmc raw 0x00 0x0f
 3c 00 00 00 00

Hope this helps.
Regards,
Stephen Beckwith




On Thu, Dec 19, 2019 at 3:26 AM 南野ムルシエラゴ <1181052146@qq.com> wrote:

> Greetings!
>
> I am a learner of openbmc, for some reason I do not have a real BMC nor a
> real server, I run openbmc in qemu. Recentlly I want to learn how BMC
> communicate with HOST System. But it seems qemu can not emulate this
> scenario.
> Can someone help tell me:
> Is there a mechanism allow me to run openbmc in qemu1 and at the same time
> run OS in qemu2. And let qemu1 run as the qemu2's BMC hardware and
> communicate via KCS or BT interface? Like the following sequence:
> [qemu1  [openbmc  [bt-bmc]]]<------LPC-------->|-----system
> IPC-----|<------LPC-------->[[[ipmi_si]  host]  qemu2]
> And what can I do?
> I have seen there is some code in qemu source code:
> qemu/hw/ipmi/*
> and in linux-5.3 source code:
> drivers/char/ipmi/*
> Dose this can help mitigate my problem?
>
> Best Regards!
> Liu Hongwei
>

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

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

* Re: how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT?
  2019-12-19 13:37 ` Stephen Beckwith
@ 2019-12-19 21:20   ` Andrew Jeffery
  2019-12-20  3:03     ` =?gb18030?B?u9i4tKO6IGhvdyB0aGUgb3BlbmJtYyBydW5uaW5nIGluIHFlbXUgY29tbXVuaWNhdGUgd2l0aCB0aGUgb3BlcmF0aW5nIHN5c3RlbSBydW5uaW5nIGluIGFub3RoZXIgcWVtdSB2aWEgS0NTL0JUPw==?= =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Jeffery @ 2019-12-19 21:20 UTC (permalink / raw)
  To: Stephen Beckwith,
	南野ムルシエラゴ,
	Cédric Le Goater
  Cc: openbmc



On Fri, 20 Dec 2019, at 00:07, Stephen Beckwith wrote:
> Lui Hongwei;
>  Here is how we handled our initial setup for OpenBMC:
> 1) all of this runs in a single VirtualMachine on a Host System (an 
> Apple Macbook in my case) - the VM is running an ubuntu 18.04 LTS OS.
> 2) Within this VM:
> a) Build the OpenBMC image for AST2500
> b) You will need to rebuild from downloaded source the QEMU version 
> 4.1.0 to run the AST2500. The "stock" version that is delivered with 
> Ubuntu 18.03 is 2.11, and does not work. Rebuild this and keep a copy 
> to re-install as necessary.
> c) you will also need to install ipmitool on this system.
> 3) In Terminal Window 1: Use this command to run the image:
> qemu-system-arm \
> -machine ast2500-evb \
> -m 256 \
> -nographic \
> -drive 
> file=obmc-phosphor-image-evb-ast2500.static.mtd,format=raw,if=mtd \
> -net nic \
> -net 
> user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostfwd=udp:127.0.0.1:2623-:623,hostname=qemu 
> 3) In Terminal Window 2: You can run the ipmitool to talk to the 
> AST2500 BMC image:
> ipmitool -H 127.0.0.1 -I lanplus -p 2623 -U root -P 0penBmc chassis 
> power status
> Chassis Power is off
> 
> IPMI "raw" commands also work:
> ipmitool -H 127.0.0.1 -I lanplus -p 2623 -U root -P 0penBmc raw 0x00 0x0f
>  3c 00 00 00 00
> 

I think what Liu was asking about was setting up in-band IPMI between two guests
(e.g. one BMC guest and one host guest). Your description covers network IPMI
between a management client and the BMC guest.

Andrew

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

* Re: how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT?
  2019-12-19  8:25 how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT? =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
  2019-12-19 13:37 ` Stephen Beckwith
@ 2019-12-19 21:22 ` Andrew Jeffery
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Jeffery @ 2019-12-19 21:22 UTC (permalink / raw)
  To: 南野ムルシエラゴ,
	openbmc, Cédric Le Goater



On Thu, 19 Dec 2019, at 18:55, 南野ムルシエラゴ wrote:
> Greetings!
> 
> I am a learner of openbmc, for some reason I do not have a real BMC nor 
> a real server, I run openbmc in qemu. Recentlly I want to learn how BMC 
> communicate with HOST System. But it seems qemu can not emulate this 
> scenario. 
> Can someone help tell me:
> Is there a mechanism allow me to run openbmc in qemu1 and at the same 
> time run OS in qemu2. And let qemu1 run as the qemu2's BMC hardware and 
> communicate via KCS or BT interface? Like the following sequence:
> [qemu1 [openbmc [bt-bmc]]]<------LPC-------->|-----system 
> IPC-----|<------LPC-------->[[[ipmi_si] host] qemu2]
> And what can I do?
> I have seen there is some code in qemu source code:
> qemu/hw/ipmi/*
> and in linux-5.3 source code:
> drivers/char/ipmi/*
> Dose this can help mitigate my problem?
> 

Liu Hongwei: Cédric has done this for Power hosts in the past, I've added him
on To:, hopefully give you some pointers.

(Cédric maintains our ASPEED QEMU models as well as the Power QEMU
models).

Andrew

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

* =?gb18030?B?u9i4tKO6IGhvdyB0aGUgb3BlbmJtYyBydW5uaW5nIGluIHFlbXUgY29tbXVuaWNhdGUgd2l0aCB0aGUgb3BlcmF0aW5nIHN5c3RlbSBydW5uaW5nIGluIGFub3RoZXIgcWVtdSB2aWEgS0NTL0JUPw==?=
  2019-12-19 21:20   ` Andrew Jeffery
@ 2019-12-20  3:03     ` =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
  0 siblings, 0 replies; 5+ messages in thread
From: =?gb18030?B?xM/SsKXgpeult6WopemltA==?= @ 2019-12-20  3:03 UTC (permalink / raw)
  To: =?gb18030?B?QW5kcmV3IEplZmZlcnk=?=,
	=?gb18030?B?U3RlcGhlbiBCZWNrd2l0aA==?=,
	=?gb18030?B?Q6imZHJpYyBMZSBHb2F0ZXI=?=
  Cc: =?gb18030?B?b3BlbmJtYw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 2471 bytes --]

Hi, Stephen


Thanks for your help, I have handled how the client like ipmitool to communicate with openbmc via net. As Andrew said my problem is how openbmc communicate with host in qemu environment.
ipmitool<------stage 1 OK-------&gt;openbmc<------stage 2 NOT OK------&gt;host


Best Regards!
Liu Hongwei


------------------&nbsp;ԭʼÓʼþ&nbsp;------------------
·¢¼þÈË:&nbsp;"Andrew Jeffery"<andrew@aj.id.au&gt;;
·¢ËÍʱ¼ä:&nbsp;2019Äê12ÔÂ20ÈÕ(ÐÇÆÚÎå) Á賿5:50
ÊÕ¼þÈË:&nbsp;"Stephen Beckwith"<embeddedsteve@gmail.com&gt;;"ÄÏÒ°¥à¥ë¥·¥¨¥é¥´"<1181052146@qq.com&gt;;"C¨¦dric Le Goater"<clg@kaod.org&gt;;
³­ËÍ:&nbsp;"openbmc"<openbmc@lists.ozlabs.org&gt;;
Ö÷Ìâ:&nbsp;Re: how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT?





On Fri, 20 Dec 2019, at 00:07, Stephen Beckwith wrote:
&gt; Lui Hongwei;
&gt;&nbsp; Here is how we handled our initial setup for OpenBMC:
&gt; 1) all of this runs in a single VirtualMachine on a Host System (an 
&gt; Apple Macbook in my case) - the VM is running an ubuntu 18.04 LTS OS.
&gt; 2) Within this VM:
&gt; a) Build the OpenBMC image for AST2500
&gt; b) You will need to rebuild from downloaded source the QEMU version 
&gt; 4.1.0 to run the AST2500. The "stock" version that is delivered with 
&gt; Ubuntu 18.03 is 2.11, and does not work. Rebuild this and keep a copy 
&gt; to re-install as necessary.
&gt; c) you will also need to install ipmitool on this system.
&gt; 3) In Terminal Window 1: Use this command to run the image:
&gt; qemu-system-arm \
&gt; -machine ast2500-evb \
&gt; -m 256 \
&gt; -nographic \
&gt; -drive 
&gt; file=obmc-phosphor-image-evb-ast2500.static.mtd,format=raw,if=mtd \
&gt; -net nic \
&gt; -net 
&gt; user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostfwd=udp:127.0.0.1:2623-:623,hostname=qemu 
&gt; 3) In Terminal Window 2: You can run the ipmitool to talk to the 
&gt; AST2500 BMC image:
&gt; ipmitool -H 127.0.0.1 -I lanplus -p 2623 -U root -P 0penBmc chassis 
&gt; power status
&gt; Chassis Power is off
&gt; 
&gt; IPMI "raw" commands also work:
&gt; ipmitool -H 127.0.0.1 -I lanplus -p 2623 -U root -P 0penBmc raw 0x00 0x0f
&gt;&nbsp; 3c 00 00 00 00
&gt; 

I think what Liu was asking about was setting up in-band IPMI between two guests
(e.g. one BMC guest and one host guest). Your description covers network IPMI
between a management client and the BMC guest.

Andrew

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

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

end of thread, other threads:[~2019-12-20  3:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19  8:25 how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT? =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
2019-12-19 13:37 ` Stephen Beckwith
2019-12-19 21:20   ` Andrew Jeffery
2019-12-20  3:03     ` =?gb18030?B?u9i4tKO6IGhvdyB0aGUgb3BlbmJtYyBydW5uaW5nIGluIHFlbXUgY29tbXVuaWNhdGUgd2l0aCB0aGUgb3BlcmF0aW5nIHN5c3RlbSBydW5uaW5nIGluIGFub3RoZXIgcWVtdSB2aWEgS0NTL0JUPw==?= =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
2019-12-19 21:22 ` how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT? Andrew Jeffery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).