LoginSignup
0
0

More than 5 years have passed since last update.

Centos7でsystemd-nspawn

Last updated at Posted at 2017-12-18

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

Centos7でsystemd-nspawnやってみます
と言ってもほぼubuntuとかと同じでした
なので差分だけ

ネットワーク周り

systemd-networkdに切り替えました

systemctl disable network
systemctl disable NetworkManager
yum install bridge-utils systemd-networkd
systemctl enable systemd-networkd

コンテナの用意

wget https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1503.raw.xz
xz -d CentOS-7-x86_64-GenericCloud-1503.raw.xz
# パーティションの開始位置を確認
fdisk CentOS-7-x86_64-GenericCloud-1503.raw
# mountしてコピー
losetup -o 1048576 /dev/loop0 ./CentOS-7-x86_64-GenericCloud-1503.raw
mount /dev/loop0 /mnt/
rsync -a --numeric-ids /mnt/ /var/lib/machines/centos7/

あとはいつも通りに起動しました

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