-
Hi, I'm using firecracker as VM engine to register/run applications in the following project: For the purpose to support resume type apps I read about the vsock implementation in firecracker and how For my tests I used To run an app in a firecracker VM I simply registered a bash shell as follows:
after that I can call:
and get a shell inside of a firecracker VM. In the process table this provides:
The config file used for the instance looks like the following {
"boot-source":{
"kernel_image_path":"/var/lib/firecracker/images/leap/kernel",
"initrd_path":"/var/lib/firecracker/images/leap/initrd",
"boot_args":"run=\"/bin/bash\" PILOT_DEBUG=1 overlay_root=/dev/vdb init=/usr/sbin/sci console=ttyS0 root=/dev/vda acpi=off rd.neednet=1 ip=dhcp quiet sci_resume=1"
},
"drives":[
{
"drive_id":"rootfs",
"path_on_host":"/var/lib/firecracker/images/leap/rootfs",
"is_root_device":true,
"is_read_only":true,
"cache_type":"Writeback"
},
{
"drive_id":"overlay",
"path_on_host":"/var/lib/firecracker/storage/mybash.ext2",
"is_root_device":false,
"is_read_only":false,
"cache_type":"Writeback"
}
],
"network-interfaces":[
{
"iface_id":"eth0",
"guest_mac":"AA:FC:00:00:00:01",
"host_dev_name":"tap-mybash"
}
],
"machine-config":{
"vcpu_count":2,
"mem_size_mib":4096
},
"vsock":{
"guest_cid":3,
"uds_path":"/run/sci.sock"
}
} As you can see there is also a
From this point I tried to test the vsock communication between host and guest as it's documented.
and next on the host
Problem is, nothing happened. So no connection was established and I'm looking for a way to debug it better What I checked is:
At this point I was running out of ideas and a research on the web did not bring more answers. Thus I'm kindly asking for your help to identify the issue. I don't think it's related to firecracker itself Thanks much |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
For the record. I solved all my issues related to this topic |
Beta Was this translation helpful? Give feedback.
-
Hi @sudanl0, thanks for your reply. Indeed the log params you gave me are valuable information. Thanks
yep sorry I missed that. Ok the issue for me with regards to this topic was not a problem in firecracker itself. As you know for testing firecracker you need an image and I'm building my own ones. Thus one needs to understand which requirements are needed in the guest VM to make vsocks work. After reading how vsocks are implemented it was clear that the guest requires the If you ask me for a suggestion how to improve, I think it would be great if the documentation from here: https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md could mention very briefly about the host and guest requirements. Just very briefly such that a user can check if custom VM images meet the needs. Thanks much, for me it's working really nicely now :) |
Beta Was this translation helpful? Give feedback.
Hi @sudanl0,
thanks for your reply. Indeed the log params you gave me are valuable information. Thanks
yep sorry I missed that. Ok the issue for me with regards to this topic was not a problem in firecracker itself. As you know for testing firecracker you need an image and I'm building my own ones. Thus one needs to understand which requirements are needed in the guest VM to make vsocks work. After reading how vsocks are implemented it was clear that the guest requires the
vsock transport kernel code either compiled in or loaded. In my case the kernel offers it as…