Skip to content

[Snaps] Drive mounts for block device disk paths during snapshot loading #4014

@CuriousGeorgiy

Description

@CuriousGeorgiy

Feature Request

I am hacking on firecracker-containerd to support firecracker snapshots, and I am facing the following problems:

Firstly, the addVsocksHandler expectedly fails with the following error:

WARN[2023-08-08T06:28:05.886174648-04:00] Failed handler "fcinit.AddVsocks": [PUT /vsock][400] putGuestVsockBadRequest  &{FaultMessage:The requested operation is not supported after starting the microVM.}  runtime=aws.firecracker

If I comment this handler out, everything works okay and firecracker-containerd is able to connect to the agent. Seems like this handler is redundant, and should be simply removed (I can bring a patch to firecracker-go-sdk).

Secondly, I am trying to figure out a way to restore the disk backing files. The problem I am facing is that container image snapshot device paths are not deterministic (their assignment depend on the containerd snapshotter implementation). To overcome this, I tried to use the drive mounts feature of firecracker-containerd and mount the container snapshot device for the the snapshot reloaded VM to the path that the original device had, but it doesn’t work, since drives cannot be configured1 for snapshot booted VMs.

Describe the desired solution

Do you have any ideas as to how it would be possible to develop the approach with drive mounts?

Describe possible alternatives

Right now I am manually patching the block device path corresponding to container snapshot during micro VM state to a path provided from the LoadSnapshot request (which is obviously unfavorable).

Checks

  • Have you searched the Firecracker Issues database for similar requests?
  • Have you read all the existing relevant Firecracker documentation?
  • Have you read and understood Firecracker's core tenets?

Footnotes

  1. https://github.com/firecracker-microvm/firecracker/blob/807bd5a3ce949121f06234bf6308de33c14eb9ce/src/api_server/swagger/firecracker.yaml#L598-L599

Metadata

Metadata

Assignees

Labels

Status: ParkedIndicates that an issues or pull request will be revisited later

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions