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
|
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
config.vm.box = 'valengus/windows11-22h2-x64'
config.vm.box_check_update = false
# config.vm.synced_folder './data', '/data'
# config.vm.synced_folder '~/shared', '/shared', type: '9p', disabled: false, accessmode: 'mapped'
config.vm.synced_folder '.', '/vagrant', type: '9p', accessmode: 'mapped'
config.vm.provider :libvirt do |libvirt|
libvirt.cpus = 8
libvirt.cputopology sockets: '1', cores: '4', threads: '2'
libvirt.memory = 32768
# libvirt.pci bus: '0x01', slot: '0x00', function: '0x00'
# libvirt.pci bus: '0x01', slot: '0x00', function: '0x01'
libvirt.machine_virtual_size = 60
libvirt.cpu_model = 'host-passthrough'
end
config.trigger.before :up do |t|
t.info = "Binding to VFIO"
t.run = {
path: '../scripts/bind-vfio.sh'
}
end
[ :destroy, :halt ].each do |action|
config.trigger.after action do |t|
t.info = "Unbinding VFIO"
t.run = {
path: '../scripts/unbind-vfio.sh'
}
end
end
end
|