This repository was archived by the owner on Jun 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathVagrantfile
More file actions
64 lines (54 loc) · 2.41 KB
/
Copy pathVagrantfile
File metadata and controls
64 lines (54 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Xenith - QEMU/KVM-based hypervisor toolkit
# Copyright (C) 2025-2026 Xenith contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
Vagrant.configure(2) do |config|
config.vm.box = "debian/bookworm64"
config.vm.define :xenith do |xenith|
xenith.vm.hostname = "xenith"
xenith.vm.network :private_network, :ip => "192.168.124.10"
end
config.vm.provider :libvirt do |libvirt|
libvirt.driver = "kvm"
libvirt.kvm_hidden = true # hide KVM from the guest (stealth dev)
libvirt.nested = true # enable nested KVM for running guest VMs
# Storage: OS disk + data disk for VM images and snapshots
libvirt.machine_virtual_size = 60
libvirt.storage :file, :size => '60G' # vdb, VM images and snapshots
# CPU and memory
libvirt.cpus = 8
# see https://libvirt.org/formatdomain.html#cpu-model-and-topology
libvirt.cpu_mode = 'host-model'
libvirt.cpu_fallback = 'forbid'
libvirt.memory = 8192
# Network
libvirt.nic_model_type = "virtio"
libvirt.management_network_name = 'xenith-network'
libvirt.management_network_address = '192.168.124.0/24'
# Graphics (SPICE for better performance than VNC)
libvirt.video_type = "qxl"
libvirt.graphics_type = "spice"
libvirt.memorybacking :access, :mode => "shared"
end
# Synced folders
config.vm.synced_folder "./", "/vagrant", type: "virtiofs"
# Provisioning — single pass, no reboot required
ANSIBLE_COMPATIBILITY_MODE = "2.0"
ANSIBLE_VERBOSITY = "" # can be up to "-vvv" for more verbosity
config.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = ANSIBLE_COMPATIBILITY_MODE
ansible.verbose = ANSIBLE_VERBOSITY
ansible.playbook = "ansible/provision.yml"
end
end