Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hello, everyone. I'm a newbie of firecracker.

I'm following this.
After I run ssh -i ./ubuntu-22.04.id_rsa root@172.16.0.2 , ping, apt, ... all commands don't work.
image

I added nameserver 8.8.8.8 to /etc/resolv.conf, but it doesn't work. Any other solutions?

You must be logged in to vote

Hi @choiyhking, getting started guide just covers how to quickly bootup a uVM and test it locally. To connect the uVM to the internet you'll have to follow some more steps from https://github.com/firecracker-microvm/firecracker/blob/main/docs/network-setup.md.

Sharing reference steps to follow along with the getting started page:

  1. Before starting Firecracker, run the On The Host steps.
  2. In the steps from Getting started guide, make sure to use "eth0" instead of "net1" (shared command below for reference)

curl -X PUT --unix-socket "${API_SOCKET}"
--data "{
"iface_id": "eth0",
"guest_mac": "$FC_MAC",
"host_dev_name": "$TAP_DEV"
}"
"http://localhost/network-interfaces/eth0"

  1. After the uV…

Replies: 1 comment · 5 replies

Comment options

Hi @choiyhking, getting started guide just covers how to quickly bootup a uVM and test it locally. To connect the uVM to the internet you'll have to follow some more steps from https://github.com/firecracker-microvm/firecracker/blob/main/docs/network-setup.md.

Sharing reference steps to follow along with the getting started page:

  1. Before starting Firecracker, run the On The Host steps.
  2. In the steps from Getting started guide, make sure to use "eth0" instead of "net1" (shared command below for reference)

curl -X PUT --unix-socket "${API_SOCKET}"
--data "{
"iface_id": "eth0",
"guest_mac": "$FC_MAC",
"host_dev_name": "$TAP_DEV"
}"
"http://localhost/network-interfaces/eth0"

  1. After the uVM boots up run the In The Guest steps along with echo nameserver 8.8.8.8 > /etc/resolv.conf

Let me know if this helps.

You must be logged in to vote
5 replies
@imyunha
Comment options

Hi @sudanl0, Thank you so much for your detail reply.
Originally guest to host ping didn't work either, but this now works fine.
But ping google.com, apt update still doesn't work.

Should I proceed with the advanced part?
(Actually, I'm not good at linux network..it's more difficult to solve)

For now, I'm connected to wi-fi. Is this can be a problem?

@wearyzen
Comment options

Hi @choiyhking,
The current steps should have worked to get the ping started.
The networking guide assumes that eth0 is the internet-facing interface but since you use wifi you might need to modify the On Host steps to replace eth0 with the name of your wifi interface as below (it probably would be wlan0):

sudo iptables -t nat -A POSTROUTING -o `YOUR_WIFI_INTERFACE_NAME` -j MASQUERADE
sudo iptables -A FORWARD -i tap0 -o `YOUR_WIFI_INTERFACE_NAME` -j ACCEPT

Could you confirm if using the right wifi interface name on the host works for you?

@imyunha
Comment options

After I connected my device to ethernet, I followed getting-started and network-setup.

But in getting-started, I modified MASK_SHORT="/30" to MASK_SHORT="/24" and used eth0 instead of net1.
And in network-setup, I only used in the guest part.

As a result, network problem is solved.

But, apt update made E: You don't have enough free space in /var/cache/apt/archives/.

image
It looks like rootfs size is too small...how can I size-up?
Should I reference this?

I really appreciate to @sudanl0.😊😊

@wearyzen
Comment options

The rootfs mentioned here should already be up to date but yes, in general if you want to try a custom rootfs the link mentioned is the right one.

@imyunha
Comment options

Thank you so much. I'll try it. :)

Answer selected by imyunha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.