惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
A
About on SuperTechFans
N
Netflix TechBlog - Medium
阮一峰的网络日志
阮一峰的网络日志
H
Help Net Security
I
InfoQ
月光博客
月光博客
量子位
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
Engineering at Meta
Engineering at Meta
G
Google Developers Blog
D
DataBreaches.Net
宝玉的分享
宝玉的分享
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理

Rc-2020 on Julia Evans

Day 57: Trying to set up GitHub Actions Day 56: A little WebAssembly Day 53: a little nginx, IPv6, and wireguard Day 52: testing how many Firecracker VMs I can run Day 51: Fixed my logging and made a couple of puzzles Day 50: Building some tarballs for puzzles, and trying to make a kernel boot faster Day 49: making the VMs boot faster Day 48: Another Go program, and a little vim configuration Day 47: Using device mapper to manage Firecracker images Day 46: debugging an iptables problem Day 44: Building my VMs with Docker Day 42: Writing a Go program to manage Firecracker VMs Day 41: Trying to understand what a bridge is Day 40: screen flickering & a talk about containers Day 39: Customizing gotty's terminal Day 38: Modifying gotty to serve many different terminal applications at once Day 37: A new laptop and a little Vue Day 35: Launching my VMs more reliably Day 34: Learning about qemu Day 33: pairing is magic and beautiful git diffs Day 32: A Rails model that doesn't use the database with ActiveHash Day 24: a short talk about blogging myths, and a debugging tip Day 23: a little Rails testing Day 22: getting OAuth to work in Rails Day 21: wrangling systemd & setting up git deploys to a VM Day 19: Clustering faces (poorly) using an autoencoder Day 20: trying to figure out how Google Cloud IAM works Day 18: an answer to an autoencoder question Day 17: trying to wrap my head around autoencoders Day 13: BPTT, and debugging why a model isn't training is hard
Day 43: Building VM images
Julia Evans · 2021-01-21 · via Rc-2020 on Julia Evans

Julia Evans

I spent all day yesterday trying to build Ubuntu VM images that work with Firecracker without too much success.

some miscellaneous things I learned about manipulating images

At some point I was trying to extract the filesystem from the Ubuntu cloud image to use with Firecracker. This did not work

  • I can use sfdisk to view the partition table of a disk image
  • I can use dd to extract dd if=focal-server-cloudimg-amd64.img.orig.raw of=focal-image.ext4 skip=227328 count=4384735
  • Some Linux files are “sparse” which means that regions which are filled with 0s are collapsed. Very useful for disk images.
  • I can use fallocate -d to turn a non-sparse file into a sparse file

compiling the linux kernel isn’t that slow

The Firecracker instructions suggest building your own Linux kernel from source. This seemed intimidating to me because I hadn’t done it before but it was actually totally fine!

It only took me like 5 minutes to compile a Linux kernel from scratch (with make -j12 on an AMD Ryzen 5). I was really surprised by this, I thought it would take like 2 hours.

I found out that the Linux kernel I compiled didn’t have the ISO filesystem support, so I needed to reconfigure it to include ISO filesystem support. This was very easy.

the Ubuntu docker image doesn’t seem like the best base for a VM image

I’m still not sure what Ubuntu image I should use as a base for my VMs. I’ve been trying both the Ubuntu cloud image (https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img) and the Docker Ubuntu:20.04 image

Problems with the Ubuntu cloud image: I haven’t been able to get it to boot yet for some reason I haven’t worked out. It gets stuck on this A start job is running for /dev/disk/by-label/UEFI step that Idon’t understand.

Problems with the Docker image: it does boot, but I haven’t managed to convince cloud-init to successfully run in it yet. I also need to install a some basic things in it (like init and udev for some reason), and it’s not really designed to be a system to log into so I feel like it’s missing a lot of things

Maybe today I’ll go back to the cloud image and see what problems there are with getting it to boot.