openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
157 stars 131 forks source link

Virtual Media Failed #136

Closed chineweff closed 3 years ago

chineweff commented 4 years ago

I tried to upload images with virtual media and got errors from browser console.

擷取

And can curl or wscat commands do the same feature (virtual media)?

Does anyone have any ideas?

Thanks.

aambroze commented 4 years ago

Not sure what this error means but maybe you should start with basic checks...

Do you have https://github.com/openbmc/jsnbd set up in your system ? It sets up nbd-proxy application running in system as a backend for NBD device.

Your kernel also needs to have Network Block Device and USB Gadget Mass Storage modules enabled.

Also - bmcweb requires option BMCWEB_ENABLE_VM_WEBSOCKET enabled.

chineweff commented 4 years ago

Thanks for your help.

I have jsnbd in my system, bmcweb will run nbd-proxy (jsnbd) and my system has NBD devices in /dev folder.

I add four lines in my kernel config to enable USB Gadget Mass Storage and Network Block Device. CONFIG_USB_SUPPORT=y CONFIG_USB_GADGET=y CONFIG_USB_MASS_STORAGE=m CONFIG_BLK_DEV_NBD=m

I added some debug prints in jsnbd. After I started virtual media jsnbd received two sock_client events and then received SIGTERM event because of previous error in javascript (invalid option magic).

Should jsnbd receive udev events after I start virtual media?

aambroze commented 4 years ago

@jk-ozlabs would you care to comment?

edtanous commented 3 years ago

Is this still an issue?

gtmills commented 3 years ago

No response. Closing. @aambroze @chineweff Please reopen if still an issue. Thanks!