Skip to content

Commit

Permalink
Fixes additional disks with Virtualbox for Vagrant (#11091)
Browse files Browse the repository at this point in the history
When using the kube_node_instancers_with_disks* variables, there were
no configuration block using those to provision disks with the
VirtualBox provider.

This commit fixes it.
  • Loading branch information
kri5 committed May 3, 2024
1 parent e013558 commit 315cfe1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Vagrantfile
Expand Up @@ -185,6 +185,14 @@ Vagrant.configure("2") do |config|
lv.storage :file, :device => "hd#{driverletters[d]}", :path => "disk-#{i}-#{d}-#{DISK_UUID}.disk", :size => $kube_node_instances_with_disks_size, :bus => "scsi"
end
end
node.vm.provider :virtualbox do |vb|
# always make /dev/sd{a/b/c} so that CI can ensure that
# virtualbox and libvirt will have the same devices to use for OSDs
(1..$kube_node_instances_with_disks_number).each do |d|
vb.customize ['createhd', '--filename', "disk-#{i}-#{driverletters[d]}-#{DISK_UUID}.disk", '--size', $kube_node_instances_with_disks_size] # 10GB disk
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', d, '--device', 0, '--type', 'hdd', '--medium', "disk-#{i}-#{driverletters[d]}-#{DISK_UUID}.disk", '--nonrotational', 'on', '--mtype', 'normal']
end
end
end

if $expose_docker_tcp
Expand Down

0 comments on commit 315cfe1

Please sign in to comment.