|
# A dummy plugin for Barge to set hostname and network correctly at the very first `vagrant up` |
|
module VagrantPlugins |
|
module GuestLinux |
|
class Plugin < Vagrant.plugin("2") |
|
guest_capability("linux", "change_host_name") { Cap::ChangeHostName } |
|
guest_capability("linux", "configure_networks") { Cap::ConfigureNetworks } |
|
end |
|
end |
|
end |
|
|
|
PWD=Dir.pwd |
|
|
|
Vagrant.configure(2) do |config| |
|
config.vm.define "barge-veertu" |
|
|
|
config.vm.box = "ailispaw/barge" |
|
config.vm.box_version = ">= 2.2.1" |
|
|
|
config.vm.provider :virtualbox do |vb, override| |
|
override.vm.network :private_network, ip: "192.168.33.10" |
|
end |
|
|
|
config.vm.synced_folder ".", "/vagrant", type: "nfs", |
|
mount_options: ["nolock", "vers=3", "udp", "noatime", "actimeo=1"] |
|
|
|
config.vm.provision :shell, run: "always" do |sh| |
|
sh.inline = <<-EOT |
|
pkg install bindfs |
|
_UID=$(ls -ld /vagrant | awk '{print $3}') |
|
_GID=$(ls -ld /vagrant | awk '{print $4}') |
|
if mountpoint -q '/vagrant' && ! mountpoint -q '#{PWD}/.data/db'; then |
|
mkdir -p '/vagrant/.data/db' |
|
mkdir -p '#{PWD}/.data/db' |
|
bindfs --map=${_UID}/999:@${_GID}/@999 '/vagrant/.data/db' '#{PWD}/.data/db' |
|
fi |
|
if mountpoint -q '/vagrant' && ! mountpoint -q '#{PWD}/.data/wp'; then |
|
mkdir -p '/vagrant/.data/wp' |
|
mkdir -p '#{PWD}/.data/wp' |
|
bindfs --map=${_UID}/33:@${_GID}/@33 '/vagrant/.data/wp' '#{PWD}/.data/wp' |
|
fi |
|
EOT |
|
end |
|
end |
While I SSH into the VM, CPU usage of the VM goes 100%. - Veertu - Run Windows and Linux on your Mac
https://veertu.com/forums/topic/while-i-ssh-into-the-vm-cpu-usage-of-the-vm-goes-100/