Intel-BMC/openbmc

How to mount image with Virtual Media Proxy Mode?

Closed this issue · 3 comments

Hi,
How to mount image using dbus service "xyz.openbmc_project.VirtualMedia" with "xyz.openbmc_project.VirtualMedia.Proxy" interfce and "Mount" method?

can anybody tell me plz?

Tejas, Someone from the team will respond early next week.

I'm sorry for the late answer.
First of all, you do not need to use Mount method directly. Bmcweb does it by itself.
To start, you need some kind NBD server, which opens iso/img file and creates websocket.
Websocket is in the format wss://<bmc_ip>/nbd/X where X is a number matching the slot in VM service. BmcWeb will match nbd slot with the one registered in VM service, opens matching unix socket and uses DBus Mount method to initiate service of nbd data comming through websocket.
Closing websocket or post unmount action will stop serving image.

I'm sorry for the late answer.
First of all, you do not need to use Mount method directly. Bmcweb does it by itself.
To start, you need some kind NBD server, which opens iso/img file and creates websocket.
Websocket is in the format wss://<bmc_ip>/nbd/X where X is a number matching the slot in VM service. BmcWeb will match nbd slot with the one registered in VM service, opens matching unix socket and uses DBus Mount method to initiate service of nbd data comming through websocket.
Closing websocket or post unmount action will stop serving image.

Thanks @JamesMihm and @phawryle for valuable information.