summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
Diffstat (limited to 'installer')
-rw-r--r--installer/vagrant/Vagrantfile-devel-vbox14
-rw-r--r--installer/vagrant/Vagrantfile-trunk-vbox14
2 files changed, 18 insertions, 10 deletions
diff --git a/installer/vagrant/Vagrantfile-devel-vbox b/installer/vagrant/Vagrantfile-devel-vbox
index ec6ab674..9cc70c56 100644
--- a/installer/vagrant/Vagrantfile-devel-vbox
+++ b/installer/vagrant/Vagrantfile-devel-vbox
@@ -107,10 +107,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.name = "ogAdministrator"
vb.memory = SERVERMEM
vb.cpus = 1
- # Get VM disk path
- line = `VBoxManage list systemproperties`.match("Default machine folder.*")[0]
- vb_machine_folder = line.split(':')[1].strip()
- second_disk = File.join(vb_machine_folder, vb.name, REPODISK)
+ # 2nd virtual disk path (current dir on Windows, VM dir on other OSes)
+ if Vagrant::Util::Platform.windows? then
+ second_disk = File.join(".", REPODISK)
+ else
+ line = `VBoxManage list systemproperties`.match("Default machine folder.*")[0]
+ vb_machine_folder = line.split(':')[1].strip()
+ second_disk = File.join(vb_machine_folder, vb.name, REPODISK)
+ end
# Create repo virtual disk, if needed.
unless File.exist?(second_disk)
vb.customize ['createhd', '--filename', second_disk, '--size', REPOSIZE * 1024]
@@ -122,7 +126,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
og.vm.box = "bento/ubuntu-16.04"
og.vm.hostname = "ogAdministrator"
# Network configuration: forward web port and attach new interface to VMs private network.
- og.vm.network "forwarded_port", guest: 443, host: 8443
+ og.vm.network "forwarded_port", guest: 443, host: LOCALWEBPORT, host_ip: "127.0.0.1"
og.vm.network "private_network", ip: "#{NETPREFIX}10", virtualbox__intnet: true
# Comment out to disable synced folder.
#og.vm.synced_folder ".", "/vagrant", disabled: true
diff --git a/installer/vagrant/Vagrantfile-trunk-vbox b/installer/vagrant/Vagrantfile-trunk-vbox
index e4ce99f3..646c3a62 100644
--- a/installer/vagrant/Vagrantfile-trunk-vbox
+++ b/installer/vagrant/Vagrantfile-trunk-vbox
@@ -78,10 +78,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.name = "ogAdministrator"
vb.memory = SERVERMEM
vb.cpus = 1
- # Get VM disk path
- line = `VBoxManage list systemproperties`.match("Default machine folder.*")[0]
- vb_machine_folder = line.split(':')[1].strip()
- second_disk = File.join(vb_machine_folder, vb.name, REPODISK)
+ # 2nd virtual disk path (current dir on Windows, VM dir on other OSes)
+ if Vagrant::Util::Platform.windows? then
+ second_disk = File.join(".", REPODISK)
+ else
+ line = `VBoxManage list systemproperties`.match("Default machine folder.*")[0]
+ vb_machine_folder = line.split(':')[1].strip()
+ second_disk = File.join(vb_machine_folder, vb.name, REPODISK)
+ end
# Create repo virtual disk, if needed.
unless File.exist?(second_disk)
vb.customize ['createhd', '--filename', second_disk, '--size', REPOSIZE * 1024]
@@ -93,7 +97,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
og.vm.box = "ubuntu/trusty64"
og.vm.hostname = "ogAdministrator"
# Network configuration: forward web port and attach new interface to VMs private network.
- og.vm.network "forwarded_port", guest: 443, host: 8443
+ og.vm.network "forwarded_port", guest: 443, host: LOCALWEBPORT, host_ip: "127.0.0.1"
og.vm.network "private_network", ip: "#{NETPREFIX}10", virtualbox__intnet: true
# Comment out to disable synced folder.
#og.vm.synced_folder ".", "/vagrant", disabled: true