LoginSignup
0
0

More than 3 years have passed since last update.

Vagrant + Arch Linux で public_network または private_network を有効にすると vagrant up 時にエラーが出るときの対処法 → netctl をインストールする

Posted at

解決手順

$ sudo pacman -S netctl --noconfirm
パッケージ netctl をインストールする。(--noconfirm: 確認なしで実行するオプション)

困っている状況

ゲストOS archlinux/archlinuxVagrantfile の次の行を有効にした状態で vagrant up するとエラーが出る。

例1:public_network 有効化

config.vm.network "public_network"

例2:private_network 有効化

config.vm.network "private_network", ip: "192.168.33.10"

例1のエラー内容

==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

# Configure eth1
mv '/tmp/vagrant-network-eth1-xxxxxxxxxx-x' '/etc/netctl/eth1' &&
ip link set 'eth1' down &&
netctl restart 'eth1' &&
netctl enable 'eth1'

Stdout from the command:



Stderr from the command:

mv: cannot move '/tmp/vagrant-network-eth1-xxxxxxxxxx-x' to '/etc/netctl/eth1': No such file or directory

エラーの意味と解消のメカニズム

mv: cannot move '/tmp/vagrant-network-eth1-xxxxxxxxxx-x' to '/etc/netctl/eth1'
/etc/netctl/eth1 というディレクトリが見つからないと怒られている。

これは netctl をインストールすることで生成されるディレクトリである。

ゲストOS の box archlinux/archlinuxnetctl を含んでいない。
sudo pacman -S netctl でインストールすることで解決する。

環境

  • ホストOS: Windows 10 Pro (version 1809)
  • ゲストOS: archlinux/archlinux (virtualbox, 2020.02.04)
  • VirtualBox バージョン 6.0.16 r135674 (Qt5.6.2)
  • Vagrant 2.2.7
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