commit ee7f42e619712cb5b4ad0bf66ebb7e612f622b34 Author: Peter Kurfer Date: Tue Mar 9 10:40:42 2021 +0100 Add basic Vagrant & Podman example diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/vagrant-libvirt/.gitignore b/vagrant-libvirt/.gitignore new file mode 100644 index 0000000..94695ea --- /dev/null +++ b/vagrant-libvirt/.gitignore @@ -0,0 +1 @@ +.vagrant/ \ No newline at end of file diff --git a/vagrant-libvirt/Vagrantfile b/vagrant-libvirt/Vagrantfile new file mode 100644 index 0000000..8c58a49 --- /dev/null +++ b/vagrant-libvirt/Vagrantfile @@ -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 diff --git a/vagrant-libvirt/inetmock.conflist b/vagrant-libvirt/inetmock.conflist new file mode 100644 index 0000000..f294b82 --- /dev/null +++ b/vagrant-libvirt/inetmock.conflist @@ -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" + } + ] +} \ No newline at end of file diff --git a/vagrant-libvirt/inetmock.xml b/vagrant-libvirt/inetmock.xml new file mode 100644 index 0000000..9c8dc75 --- /dev/null +++ b/vagrant-libvirt/inetmock.xml @@ -0,0 +1,10 @@ + + inetmock + + + + + + + + \ No newline at end of file