mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-09-03 20:31:30 +00:00
Download OVMF if it doesn't exist
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
This commit is contained in:
committed by
Manohar Castelino
parent
4e82cf411d
commit
d688cbb693
Vendored
+6
-1
@@ -13,7 +13,7 @@ $disks = 2
|
||||
$disk_prefix = File.basename(File.dirname(__FILE__), "/")
|
||||
$disk_size = "10G"
|
||||
$box = "AntonioMeireles/ClearLinux"
|
||||
$loader = File.join(File.dirname(__FILE__), "OVMF.fd")
|
||||
File.exists?("/usr/share/qemu/OVMF.fd") ? $loader = "/usr/share/qemu/OVMF.fd" : $loader = File.join(File.dirname(__FILE__), "OVMF.fd")
|
||||
$vm_name_prefix = "clr"
|
||||
$base_ip = IPAddr.new("192.52.100.10")
|
||||
$hosts = {}
|
||||
@@ -21,6 +21,10 @@ $proxy_ip_list = ""
|
||||
$driveletters = ('a'..'z').to_a
|
||||
$setup_fc = true ? (['true', '1'].include? ENV['SETUP_FC'].to_s) : false
|
||||
|
||||
if not File.exists?($loader)
|
||||
system('curl -O https://download.clearlinux.org/image/OVMF.fd')
|
||||
end
|
||||
|
||||
# We need v 1.0.14 or above for this vagrantfile to work.
|
||||
unless Vagrant.has_plugin?("vagrant-guests-clearlinux")
|
||||
system "vagrant plugin install vagrant-guests-clearlinux"
|
||||
@@ -61,6 +65,7 @@ Vagrant.configure("2") do |config|
|
||||
c.vm.provider :libvirt do |lv|
|
||||
lv.cpu_mode = "host-passthrough"
|
||||
lv.nested = true
|
||||
lv.loader = $loader
|
||||
lv.cpus = $cpus
|
||||
lv.memory = $memory
|
||||
(1..$disks).each do |d|
|
||||
|
||||
Reference in New Issue
Block a user