Advertisement
Guest User

poor-windows-vagrant-performance

a guest
Jun 14th, 2021
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Vagrant.configure("2") do |config|
  2.     servers=[
  3.         {
  4.           :hostname => "ansible",
  5.           :box => "bento/ubuntu-20.04",
  6.           :ip => "172.16.1.10",
  7.           :ssh_port => '2200',
  8.           :ram => 512,
  9.           :vcpu => 1
  10.         },
  11.         {
  12.           :hostname => "server1",
  13.           :box => "bento/ubuntu-20.04",
  14.           :ip => "172.16.1.11",
  15.           :ssh_port => '2201',
  16.           :ram => 512,
  17.           :vcpu => 1
  18.         },
  19.         {
  20.           :hostname => "server2",
  21.           :box => "bento/ubuntu-20.04",
  22.           :ip => "172.16.1.12",
  23.           :ssh_port => '2202',
  24.           :ram => 512,
  25.           :vcpu => 1
  26.         },
  27.         {
  28.           :hostname => "server3",
  29.           :box => "bento/ubuntu-20.04",
  30.           :ip => "172.16.1.13",
  31.           :ssh_port => '2203',
  32.           :ram => 512,
  33.           :vcpu => 1
  34.         },
  35.       ]
  36.  
  37.     servers.each do |machine|
  38.         config.vm.define machine[:hostname] do |node|
  39.             node.vm.box = machine[:box]
  40.             node.vm.hostname = machine[:hostname]
  41.             node.vm.network :private_network, ip: machine[:ip]
  42.             node.vm.network "forwarded_port", guest: 22, host: machine[:ssh_port], id: "ssh"
  43.         end
  44.     end
  45.  
  46.         config.vm.define "win2019"
  47.         #config.vm.box = "StefanScherer/windows_2019"
  48.         config.vm.box = "gusztavvargadr/windows-server"
  49.         config.vm.hostname = "win2019"
  50.         config.vm.network :private_network, ip: "172.16.1.99"
  51.         config.vm.network "forwarded_port", guest: 3389, host: 33389, id: "rdp"
  52.         config.vm.network "forwarded_port", guest: 5985, host: 50985, id: "rdp"
  53.         config.vm.provider "virtualbox" do |vb|
  54.            vb.customize ["modifyvm", :id, "--memory", 8192]
  55.            vb.customize ["modifyvm", :id, "--cpus", 4]
  56.         end
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement