Signed-off-by: RouxAntoine <antoinroux@hotmail.fr>
This commit is contained in:
RouxAntoine 2024-01-05 19:37:36 +01:00
parent bf5f33b116
commit 856954c2ab
Signed by: antoine
GPG Key ID: 098FB66FC0475E70

View File

@ -93,14 +93,14 @@ func setupEnv() int {
cfg := firecracker.Config{ cfg := firecracker.Config{
SocketPath: socketPath, SocketPath: socketPath,
KernelImagePath: "./vmlinux-5.10.204", KernelImagePath: "./out/vmlinux-5.10.204",
LogPath: "./firecracker.log", LogPath: "./out/firecracker.log",
LogLevel: "Debug", LogLevel: "Debug",
KernelArgs: "console=ttyS0 reboot=k panic=1 pci=off", KernelArgs: "console=ttyS0 reboot=k panic=1 pci=off",
Drives: []models.Drive{ Drives: []models.Drive{
{ {
DriveID: firecracker.String("rootfs"), DriveID: firecracker.String("rootfs"),
PathOnHost: firecracker.String("./rootfs.ext4"), PathOnHost: firecracker.String("./out/rootfs.ext4"),
IsReadOnly: firecracker.Bool(false), IsReadOnly: firecracker.Bool(false),
IsRootDevice: firecracker.Bool(true), IsRootDevice: firecracker.Bool(true),
}, },
@ -132,9 +132,9 @@ func setupEnv() int {
firecracker.VMCommandBuilder{}. firecracker.VMCommandBuilder{}.
WithBin("firecracker"). WithBin("firecracker").
WithSocketPath(socketPath). WithSocketPath(socketPath).
WithStdin(os.Stdin). //WithStdin(os.Stdin).
WithStdout(os.Stdout). //WithStdout(os.Stdout).
WithStderr(os.Stderr). //WithStderr(os.Stderr).
Build(ctx), Build(ctx),
), ),
firecracker.WithLogger(logrus.NewEntry(log)), firecracker.WithLogger(logrus.NewEntry(log)),