0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

# WindowsでVagrant、VirtualBox、CnetOS

Posted at

インストール

Vagrant

HashiCorp Vagrant

VirtualBox

Oracle VirtualBox

Box

HashiCorp Atlas / Discover Vagrant Boxes

ユーザー登録を忘れずに!!

セットアップ

導入!

Proxy回避は何とか頑張る。。。

Vagrant Cloudにログイン

> vagrant login
もしくは、
> vagrant login --tokey ABCD1234
 > vagrant box add "bento/centos-6.7"
 
 > vagrant box list
bento/centos-6.7 (virtualbox, 2.2.7)
> cd C:\box
> mkdir centos6
> cd centos6
> vagrant init centos6

vagrantfileができるので、以下の内容のファイルにする。

Vagrant.configure(2) do |config|
  config.vm.define "controller" do |node|
        node.vm.box = "bento/centos-6.7"
        node.vm.hostname = "controller"
        node.vm.network :private_network, ip: "192.168.100.10"
        node.vm.network :forwarded_port, id: "ssh", guest: 22, host: 2210
  end
  config.vm.define "target" do |node|
        node.vm.box = "bento/centos-6.7"
        node.vm.hostname = "target"
        node.vm.network :private_network, ip: "192.168.100.20"
        node.vm.network :forwarded_port, id: "ssh", guest: 22, host: 2220
  end
end

さぁ起動だ!

エラー出ちゃった。。。

> vagrant up
Bringing machine 'controller' up with 'virtualbox' provider...
Bringing machine 'target' up with 'virtualbox' provider...
==> controller: Importing base box 'bento/centos-6.7'...
==> controller: Matching MAC address for NAT networking...
==> controller: Checking if box 'bento/centos-6.7' is up to date...
==> controller: Setting the name of the VM: centos6_controller_1483845981881_27956
==> controller: Clearing any previously set network interfaces...
==> controller: Preparing network interfaces based on configuration...
    controller: Adapter 1: nat
    controller: Adapter 2: hostonly
==> controller: Forwarding ports...
    controller: 22 (guest) => 2210 (host) (adapter 1)
==> controller: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "2ac1cc30-9ae2-442b-973b-7bfac6de0840", "--type", "headless"]

Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only
Ethernet Adapter #3' (VERR_INTNET_FLT_IF_NOT_FOUND).
VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?