LoginSignup
0
0

More than 5 years have passed since last update.

systemd-nspawnのイメージを用意するnspawn-bootstrap

Posted at

systemd-nspawn Advent Calendar 2017 22日目の記事です。

Githubにnspawn-bootstrapというのがあったので紹介

インストール

npm install -g nspawn-bootstrap

これだけ

使ってみる

# ubuntu
nspawn-bootstrap ./ubuntu-16.04.img --ubuntu xenial --size 4GB
# debian
nspawn-bootstrap ./debian.img --debian stretch
# arch
nspawn-bootstrap ./arch.img --arch --size 4GB

# import
machinectl import-raw ubuntu-16.04.img

サイズ省略すると4Gになります。

動作としては、サイズで指定したrawファイル作って,ext4でフォーマットして、debootstrap(archはpacstrap)でファイル入れるという挙動です
あんまりsystemd-nspawnをrawファイルで使わないからなぁ・・・
どっちかっていうとkvmとかで動かす場合に重宝しそう

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0