Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lebron8dong opened this issue Apr 15, 2024 · 8 comments

Comments

@lebron8dong
Copy link

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?

@pb8o
Copy link
Contributor

pb8o commented Apr 15, 2024

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

@lebron8dong
Copy link
Author

lebron8dong commented Apr 15, 2024

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

@pb8o
Copy link
Contributor

pb8o commented Apr 16, 2024

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.

@lebron8dong
Copy link
Author

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
Copy link
Author

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

@lebron8dong
Copy link
Author

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 root@172.16.0.2:/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 root@172.16.0.2
error:
ssh: connect to host 172.16.0.2 port 22: Connection refused.

But I can ping
image

@pb8o
Copy link
Contributor

pb8o commented Apr 22, 2024

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.

@lebron8dong
Copy link
Author

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 root@172.16.0.2:/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 root@172.16.0.2
error:
ssh: connect to host 172.16.0.2 port 22: Connection refused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants