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|
config.vm.define "control-plane-node-1" do |vm|
vm.vm.provider :virtualbox do |domain|
domain.cpus = 2
domain.memory = 2048
domain.serial :type => "file", :source => {:path => "/tmp/vagrant/control-plane-node-1.log"}
domain.storage :file, :device => :cdrom, :path => "/tmp/vagrant/metal-amd64.iso"
domain.storage :file, :size => '4G', :type => 'raw'
domain.boot 'hd'
domain.boot 'cdrom'
vm.vm.provider :virtualbox do |vb|
vb.cpus = 2
vb.memory = 2048
# Serial logging not directly supported in VirtualBox provider
# Storage configuration handled differently in VirtualBox
vb.customize ["modifyvm", :id, "--boot1", "disk"]
vb.customize ["modifyvm", :id, "--boot2", "dvd"]
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
config.vm.define "worker-node-1" do |vm|
vm.vm.provider :virtualbox do |domain|
domain.cpus = 2
domain.memory = 2048
domain.serial :type => "file", :source => {:path => "/tmp/vagrant/worker-node-1.log"}
domain.storage :file, :device => :cdrom, :path => "/tmp/vagrant/metal-amd64.iso"
domain.storage :file, :size => '4G', :type => 'raw'
domain.boot 'hd'
domain.boot 'cdrom'
end
vm.vm.provider :virtualbox do |vb|
vb.cpus = 2
vb.memory = 2048
# Serial logging not directly supported in VirtualBox provider
# Storage configuration handled differently in VirtualBox
vb.customize ["modifyvm", :id, "--boot1", "disk"]
vb.customize ["modifyvm", :id, "--boot2", "dvd"]
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