LoginSignup
9
9

More than 5 years have passed since last update.

Windows環境のVagrantでCentOS Atomic Hostを動かす

Posted at

1. 前提

VirtualBox, Vagrantはインストールされているものとします。

2. boxダウンロード

http://www.projectatomic.io/download/
の"CentOS Atomic Host(testing)"をクリックして

CentOS-7-x86_64-AtomicHost-Vagrant-VirtualBox.box

をダウンロードします。

3. add box

ダウンロードしたboxを適当な名前でaddします。

vagrant box add --name centos-atomic CentOS-7-x86_64-AtomicHost-Vagrant-VirtualBox.box

4. Vagrantfile作成

先ほどaddしたboxでVagrantfileを作ります。

vagrant init centos-atomic

5. vagrant up(ただしエラー)

vagrant up

とするとWindows環境ではrsyncがないというエラーが出ます。

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
"rsync" could not be found on your PATH. Make sure that rsync
is properly installed on your system and available on the PATH.

エラーの理由ですが、元のVagrantfileに共有フォルダーをrsyncタイプで共有する記述があるため、Windowsではrsyncがないと怒られていたのでした。

>more %USERPROFILE%\.vagrant.d\boxes\centos-atomic\0\virtualbox\Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.base_mac = "5254007c4727"
  config.vm.synced_folder ".", "/home/vagrant/sync", type: "rsync"
end

6. Vagrantfile修正

とりあえずsynced_folderをdisabledにします。

Vagrantfile
Vagrant.configure(2) do |config|
  #
  # ...
  config.vm.synced_folder ".", "/home/vagrant/sync", disabled: true
  # ...
end

7. vagrant up

今度は正常に起動します。

vagrant up

もちろんこのままでは共有フォルダーは使えません。
さてさて、どうしたものか。

9
9
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
9
9