Skip to content

Commit

Permalink
adding hyperv support to build variables
Browse files Browse the repository at this point in the history
  • Loading branch information
elreydetoda committed Nov 21, 2021
1 parent 9d213cb commit aba69a4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ Vagrant.configure("2") do |config|
end
end

main.vm.provider "hyperv" do |h, override|
# override.vm.allowed_synced_folder_types = [:libvirt, :nfs]
override.vm.box = "generic/ubuntu2004"
# override.vm.synced_folder ".", "/vagrant", nfs_version: 4, nfs_udp: false
# override.vm.synced_folder ".", "/home/vagrant/project", nfs_version: 4, nfs_udp: false
override.vm.provision 'fix-dns', type: "shell", run: 'never' do |script|
script.inline = <<-SHELL
sudo sed -i -e '/nameservers:/d' -e '/addresses:/d' /etc/netplan/01-netcfg.yaml
sudo netplan generate && sudo netplan apply
sudo sed -i 's/^[[:alpha:]]/#&/' /etc/systemd/resolved.conf
sudo systemctl restart systemd-resolved.service
SHELL
end
end

main.vm.provider "virtualbox" do |vb, override|
override.vm.network "private_network", ip: "192.168.34.22", virtualbox__intnet: "building_network"
end
Expand Down

0 comments on commit aba69a4

Please sign in to comment.