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 3 years have passed since last update.

Vagrantで複数台同時起動する設定

Posted at

Vagrantで複数台同時起動するマルチマシン設定
自分PCの中で複数のサーバー動作実験をするときに使用する。

  • VirtualBox 6.1.16 r140961 (Qt5.6.2)
  • Vagrant 2.2.9
  • ホストOS:Windows10
  • ゲストOS:CentOS Linux release 8.3.2011
Vagranfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
  config.vm.define "server111" do |server|
    server.vm.box = "bento/centos-8"
    server.vm.hostname = "server111"
    server.vm.network "private_network", ip: "192.168.56.111"
    server.vm.synced_folder ".", "/vagrant", disabled: true
    server.vm.provider "virtualbox" do |vb|
      vb.gui = false
      vb.memory = "512"
    end
  end
  config.vm.define "server112" do |server|
    server.vm.box = "bento/centos-8"
    server.vm.hostname = "server112"
    server.vm.network "private_network", ip: "192.168.56.112"
    server.vm.synced_folder ".", "/vagrant", disabled: true
    server.vm.provider "virtualbox" do |vb|
      vb.gui = false
      vb.memory = "512"
    end
  end
end


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?