Add basic Vagrant & Podman example
This commit is contained in:
commit
ee7f42e619
5 changed files with 86 additions and 0 deletions
0
.gitignore
vendored
Normal file
0
.gitignore
vendored
Normal file
1
vagrant-libvirt/.gitignore
vendored
Normal file
1
vagrant-libvirt/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.vagrant/
|
33
vagrant-libvirt/Vagrantfile
vendored
Normal file
33
vagrant-libvirt/Vagrantfile
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# -*- mode: ruby -*-
|
||||||
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
|
config.vm.box = "peru/windows-10-enterprise-x64-eval"
|
||||||
|
config.vm.box_version = "20210222.01"
|
||||||
|
|
||||||
|
config.vm.define :win_victim do |win_victim|
|
||||||
|
win_victim.vm.network :private_network,
|
||||||
|
:libvirt__network_name => "inetmock"
|
||||||
|
end
|
||||||
|
|
||||||
|
config.vm.box_check_update = false
|
||||||
|
|
||||||
|
# Create a forwarded port mapping which allows access to a specific port
|
||||||
|
# within the machine from a port on the host machine. In the example below,
|
||||||
|
# accessing "localhost:8080" will access port 80 on the guest machine.
|
||||||
|
# NOTE: This will enable public access to the opened port
|
||||||
|
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
||||||
|
|
||||||
|
# Create a forwarded port mapping which allows access to a specific port
|
||||||
|
# within the machine from a port on the host machine and only allow access
|
||||||
|
# via 127.0.0.1 to disable public access
|
||||||
|
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
|
||||||
|
|
||||||
|
# Share an additional folder to the guest VM. The first argument is
|
||||||
|
# the path on the host to the actual folder. The second argument is
|
||||||
|
# the path on the guest to mount the folder. And the optional third
|
||||||
|
# argument is a set of non-required options.
|
||||||
|
# config.vm.synced_folder "../data", "/vagrant_data"
|
||||||
|
|
||||||
|
end
|
42
vagrant-libvirt/inetmock.conflist
Normal file
42
vagrant-libvirt/inetmock.conflist
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"args": {
|
||||||
|
"podman_labels": {
|
||||||
|
"inetmock": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cniVersion": "0.4.0",
|
||||||
|
"name": "inetmock",
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"type": "bridge",
|
||||||
|
"bridge": "im0",
|
||||||
|
"isGateway": false,
|
||||||
|
"hairpinMode": true,
|
||||||
|
"ipam": {
|
||||||
|
"type": "host-local",
|
||||||
|
"routes": [],
|
||||||
|
"ranges": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"subnet": "172.25.10.0/24",
|
||||||
|
"gateway": "172.25.10.5"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "portmap",
|
||||||
|
"capabilities": {
|
||||||
|
"portMappings": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "firewall",
|
||||||
|
"backend": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "tuning"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
10
vagrant-libvirt/inetmock.xml
Normal file
10
vagrant-libvirt/inetmock.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<network>
|
||||||
|
<name>inetmock</name>
|
||||||
|
<bridge name='im0' stp='on' delay='0'/>
|
||||||
|
<mac address='BA:84:82:C5:AE:56'/>
|
||||||
|
<ip address='172.25.10.5' netmask='255.255.255.0'>
|
||||||
|
<dhcp>
|
||||||
|
<range start='172.25.10.100' end='172.25.10.150'/>
|
||||||
|
</dhcp>
|
||||||
|
</ip>
|
||||||
|
</network>
|
Loading…
Reference in a new issue