let process = FirecrackerProcessBuilder::new("/usr/local/bin/firecracker", "/tmp/firecracker.sock")
.id("firecracker")
.no_seccomp(true)
.cleanup_socket(true)
.spawn()
.await
.unwrap();
process.vm_builder()
.boot_source(BootSource {
kernel_image_path: "/Users/youri/vmlinux".into(),
boot_args: Some("console=ttyS0 reboot=k panic=1 pci=off init=/sbin/firecracker-init".into()),
initrd_path: None,
})
.drive(Drive {
drive_id: "rootfs".into(),
path_on_host: Some("/Users/youri/rootfs.ext4".into()),
is_root_device: true,
is_read_only: Some(false),
cache_type: DriveCacheType::Unsafe,
io_engine: DriveIoEngine::Sync,
partuuid: None,
rate_limiter: None,
socket: None,
})
.machine_config(MachineConfiguration {
vcpu_count: std::num::NonZeroU64::new(2).unwrap(),
mem_size_mib: 256,
smt: false,
track_dirty_pages: false,
cpu_template: None,
huge_pages: None,
})
.vsock(Vsock {
vsock_id: None,
guest_cid: 1,
uds_path: DEFAULT_UDS_PATH.into(),
})
.start()
.await
.unwrap();
Is working fine, the firecracker socket is cleaned before spawning. Problem is the vsock isn't.
Is working fine, the firecracker socket is cleaned before spawning. Problem is the vsock isn't.