-
Notifications
You must be signed in to change notification settings - Fork 5
/
Vagrantfile
40 lines (35 loc) · 1.43 KB
/
Vagrantfile
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
Vagrant.configure("2") do |config|
config.vm.hostname = "kubernetes-1.31"
config.vm.box = "alvistack/kubernetes-1.31"
config.vm.box_check_update = true
config.vm.provider :virtualbox do |virtualbox, override|
virtualbox.cpus = 2
virtualbox.memory = 8192
virtualbox.customize ["modifyvm", :id, "--cpu-profile", "host"]
virtualbox.customize ["modifyvm", :id, "--nested-hw-virt", "on"]
virtualbox.customize ["modifyvm", :id, "--nat-localhostreachable1", "on"]
virtualbox.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
virtualbox.customize ["modifyvm", :id, "--accelerate3d", "off"]
override.vm.disk :disk, name: "sdb", size: "10GB"
override.vm.synced_folder "./", "/vagrant"
end
config.vm.provider :libvirt do |libvirt, override|
libvirt.cpu_mode = "host-passthrough"
libvirt.cpus = 2
libvirt.disk_bus = "virtio"
libvirt.disk_driver :cache => "writeback"
libvirt.driver = "kvm"
libvirt.memory = 8192
libvirt.memorybacking :access, :mode => "shared"
libvirt.nested = true
libvirt.nic_model_type = "virtio"
libvirt.video_type = "virtio"
libvirt.storage :file, bus: "virtio", cache: "writeback"
override.vm.synced_folder "./", "/vagrant", type: "virtiofs"
end
config.vm.provision :shell, inline: <<-SHELL
systemctl stop guestfs-firstboot.service
systemctl disable guestfs-firstboot.service
/usr/local/bin/virt-sysprep-firstboot.sh
SHELL
end