Help us understand the problem. What is going on with this article?

CentOS7 に systemd-nspawn用 CentOS7 コンテナを作成する

NEW_MACHINE='centos7'
yum --releasever=7 \
    --nogpg \
    --installroot=/var/lib/machines/${NEW_MACHINE} \
    --disablerepo='*' \
    --enablerepo=base \
    install systemd passwd yum vim

sudo systemd-nspawn -D /var/lib/machines/${NEW_MACHINE}
passwd
useradd -m -r user
passwd user
exit

# 起動確認
sudo systemd-nspawn -bD /var/lib/machines/${NEW_MACHINE}
Ctrl+]
Ctrl+]
Ctrl+]

# unit file 
systemctl enable systemd-nspawn@${NEW_MACHINE}.service

(echo '[Service]'
 echo 'ExecStart='
 echo 'ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --machine=%I'
) | SYSTEMD_EDITOR=tee systemctl edit systemd-nspawn@${NEW_MACHINE}.service

cat /usr/lib/systemd/system/systemd-nspawn@.service.
cat /etc/systemd/system/machines.target.wants/systemd-nspawn@${NEW_MACHINE}.service
cat /etc/systemd/system/systemd-nspawn@${NEW_MACHINE}.service.d/override.conf

machinectl start ${NEW_MACHINE}
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした