firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

Error writing to file - write (28: No space left on device) [IP: 185.125.190.36 80]

Open lebron8dong opened this issue 1 year ago • 9 comments

Describe the bug

When I started firecracker according to getting-started, an error occurred when executing unminimize: Error writing to file - write (28: No space left on device) [IP: 185.125.190.36 80].

To Reproduce

getting-started tutorial.

  1. Running firecracker will require two terminals, the first one running the firecracker binary, and a second one for communicating with the firecracker process via HTTP requests.
  2. unminimize

Expected behaviour

Error writing to file - write (28: No space left on device) [IP: 185.125.190.36 80]. image

Environment

host: ubuntu22.04 mircoVm: ubuntu22.04 Firecracker v1.7.0

How to configure virtual disk size?

lebron8dong avatar Apr 15 '24 06:04 lebron8dong

The rootfs are small on purpose to avoid downloading/copying large files. You can tweak the ext4 rootfs with something like:

truncate -s 2G build/img/x86_64/ubuntu-22.04.ext4
resize2fs -f build/img/x86_64/ubuntu-22.04.ext4

pb8o avatar Apr 15 '24 08:04 pb8o

I have allocated 10G, but an error occurred when installing python3-pip :

[2077.545011] Out of memory: Killed process 2115 (apt-get) total-vm:84300kB, anon-rss:66288kB, file-rss:0kB, shmem-rss: 0kB, UID:0 pgtables:204kB oom_score_adj:0 Killed.

image

image

lebron8dong avatar Apr 15 '24 16:04 lebron8dong

Looks like the guest does not have enough memory to run apt-get. You would need to launch the guest with more memory, 256MB for example.

Just for the record, we have never tried unminimize in our rootfs. I am not sure it will work with the current one.

pb8o avatar Apr 16 '24 08:04 pb8o

Thank you so much. The command I executed is apt-get install python3 python3-pip, and the python3-pip installation process will be killed. How to increase memory in firecracker?

lebron8dong avatar Apr 16 '24 09:04 lebron8dong

Thank you so much. I have successfully used configuration files to change the memory size.

lebron8dong avatar Apr 16 '24 14:04 lebron8dong

When I use config-file to start firecracker and bring up the network, I get an error when trying to transfer files: scp /home/aiot/cat.jpg [email protected]:/root/firecracker error ssh: connect to host 172.16.0.2 port 22: Connection refused.

I get the same error using ssh connection: ssh -i ./ubuntu-22.04.id_rsa [email protected] error: ssh: connect to host 172.16.0.2 port 22: Connection refused.

But I can ping image

lebron8dong avatar Apr 17 '24 10:04 lebron8dong

When I use config-file to start firecracker and bring up the network

What config file are you using? if it's the one referenced here then that makes sense, there's no network interfaces configured. We should fix that.

pb8o avatar Apr 22 '24 10:04 pb8o

https://github.com/firecracker-microvm/firecracker/blob/main/docs/network-setup.md I configured the network according to the tutorial and can download it with git, but the host cannot transfer files through ssh connection or scp. scp /home/aiot/cat.jpg [email protected]:/root/firecracker error ssh: connect to host 172.16.0.2 port 22: Connection refused.

I get the same error using ssh connection: ssh -i ./ubuntu-22.04.id_rsa [email protected] error: ssh: connect to host 172.16.0.2 port 22: Connection refused.

lebron8dong avatar Apr 24 '24 06:04 lebron8dong

Hi @lebron8dong, we recently updated network setup doc with correct MAC address usage. If you use default rootfs from getting started, can you check if this update fixes your issue?

ShadowCurse avatar Jul 29 '24 09:07 ShadowCurse

Closing the issue due to the inactivity. Feel free to reopen if the issue still exists.

ShadowCurse avatar Sep 04 '24 16:09 ShadowCurse