Skip to content

Instantly share code, notes, and snippets.

@kjelly
Created February 12, 2020 12:29
Show Gist options
  • Save kjelly/e2103720d6d1ff5697e724389cdc3217 to your computer and use it in GitHub Desktop.
Save kjelly/e2103720d6d1ff5697e724389cdc3217 to your computer and use it in GitHub Desktop.
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether d0:50:99:0c:35:20 brd ff:ff:ff:ff:ff:ff
inet 192.168.11.2/24 brd 172.22.104.255 scope global noprefixroute br0
valid_lft forever preferred_lft forever
inet6 fe80::dc09:b9ff:fe5d:756c/64 scope link
valid_lft forever preferred_lft forever
---
network:
version: 2
# if specified globally, can only realistically have that value,
# as networkd cannot render wifi/3G.
ethernets:
enp4s0:
dhcp4: false
bridges:
br0:
dhcp4: false
mtu: 1500
gateway4: 192.168.11.254
addresses: [192.168.11.2/24]
interfaces: [eth0]
parameters:
stp: true
forward-delay: 4
nameservers:
addresses: [1.1.1.1]
Vagrant.configure("2") do |config|
config.ssh.private_key_path = ["~/.vagrant.d/insecure_private_key", "~/.ssh/id_rsa"]
config.ssh.insert_key = false
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/me.pub"
config.vm.provision "shell", inline: "cat ~vagrant/.ssh/me.pub >> ~vagrant/.ssh/authorized_keys"
config.vm.provision "shell", path: "bootstrap.sh"
config.disksize.size = '60GB'
config.vm.provider :libvirt do |domain|
domain.nested = true
domain.machine_virtual_size = 60
domain.volume_cache = "unsafe"
domain.cpu_mode = "host-passthrough"
domain.nested = true
domain.memory = 1024*2
domain.cpus = 2
end
config.vm.define :instance1 do |instance|
instance.vm.box = "centos/7"
instance.vm.hostname = 'c1'
config.vm.provider :libvirt do |domain|
domain.memory = 1024*4
end
instance.vm.network :public_network,
:dev => "br0",
:mode => "bridge",
:ip => "192.168.11.78",
:type => "bridge"
instance.vm.network :public_network,
:dev => "br0",
:mode => "bridge",
:ip => "192.168.11.79",
:type => "bridge"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment