weaveworks / ignite

Ignite a Firecracker microVM
https://ignite.readthedocs.org
Apache License 2.0
3.49k stars 223 forks source link

Unable to access MMDS from inside guest OS #942

Open chrisyalamov opened 1 year ago

chrisyalamov commented 1 year ago

I'm not sure if this question is best suited to this repository or firecracker-microvm/firecracker but I'm hoping someone might be able to help out.

Using the socket (in /var/lib/firecracker/vm/{vm-id}/firecracker.sock, I'm able to successfully write to the metadata store. However, attempting to access this from inside the guest OS isn't behaving as expected.

Following Firecracker's MMDS Version 2 user guide, I've tried to obtain a session token by hitting the /latest/api/token endpoint:

curl -X PUT "http://169.254.169.254/latest/api/token" \
      -H "X-metadata-token-ttl-seconds: 21600"

which returns a 405 - Method Not Allowed error and the response body states that only GET and HEAD methods are allowed.

I tried following the Version 1 instructions instead, but I seem to get a 404 - Not Found error with this.

I'm able to hit some other endpoints (like GET / and GET /machine-config), so it's clear that the internal Firecracker API is functioning— does anyone know if there's a way to get the data from MMDS?

Possibly related issues/PRs:

77 #132