Change Vagrantfile to virtualbox implementation

This commit is contained in:
vandomej 2025-10-01 15:09:07 -07:00
parent 78e470fa97
commit a790b58667

View file

@ -1,25 +1,41 @@
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vm.define "control-plane-node-1" do |vm| config.vm.define "control-plane-node-1" do |vm|
vm.vm.provider :virtualbox do |domain| vm.vm.provider :virtualbox do |vb|
domain.cpus = 2 vb.cpus = 2
domain.memory = 2048 vb.memory = 2048
domain.serial :type => "file", :source => {:path => "/tmp/vagrant/control-plane-node-1.log"} # Serial logging not directly supported in VirtualBox provider
domain.storage :file, :device => :cdrom, :path => "/tmp/vagrant/metal-amd64.iso" # Storage configuration handled differently in VirtualBox
domain.storage :file, :size => '4G', :type => 'raw' vb.customize ["modifyvm", :id, "--boot1", "disk"]
domain.boot 'hd' vb.customize ["modifyvm", :id, "--boot2", "dvd"]
domain.boot 'cdrom'
end end
# Add CD-ROM through Vagrant disk configuration
vm.vm.disk :disk, size: "4GB", primary: true
vm.disks = [{
type: :dvd,
device: :dvddrive,
port: '1',
device: '0',
path: "/tmp/vagrant/metal-amd64.iso"
}]
end end
config.vm.define "worker-node-1" do |vm| config.vm.define "worker-node-1" do |vm|
vm.vm.provider :virtualbox do |domain| vm.vm.provider :virtualbox do |vb|
domain.cpus = 2 vb.cpus = 2
domain.memory = 2048 vb.memory = 2048
domain.serial :type => "file", :source => {:path => "/tmp/vagrant/worker-node-1.log"} # Serial logging not directly supported in VirtualBox provider
domain.storage :file, :device => :cdrom, :path => "/tmp/vagrant/metal-amd64.iso" # Storage configuration handled differently in VirtualBox
domain.storage :file, :size => '4G', :type => 'raw' vb.customize ["modifyvm", :id, "--boot1", "disk"]
domain.boot 'hd' vb.customize ["modifyvm", :id, "--boot2", "dvd"]
domain.boot 'cdrom' end
end # Add CD-ROM through Vagrant disk configuration
vm.vm.disk :disk, size: "4GB", primary: true
vm.disks = [{
type: :dvd,
device: :dvddrive,
port: '1',
device: '0',
path: "/tmp/vagrant/metal-amd64.iso"
}]
end end
end end