Merge "Add examples of BIOS and BMC configuration"
[icn.git] / ci / jjb / shell / vagrant-verify.sh
index 65148aa..76ed59b 100644 (file)
@@ -6,18 +6,24 @@ echo "---> vagrant-verify.sh"
 set -exuf -o pipefail
 
 function clean_vm {{
-    vagrant destroy -f
+    # TODO Vagrant has a known issue
+    # (https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371)
+    # destroying the VMs, so destroy them manually here
+    vagrant destroy -f jump
+    virsh -c qemu:///system destroy vm-machine-1
+    virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1
+    virsh -c qemu:///system destroy vm-machine-2
+    virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2
 }}
 trap clean_vm EXIT
 
+# TODO Improve VM performance by only using cores on the same node
+#sed -i -e '/^\s\+libvirt.cpus/!b' -e "h;s/\S.*/libvirt.cpuset = '0-21,44-65'/;H;g" Vagrantfile
+
 vagrant destroy -f
-vagrant up
-vagrant ssh -c "
+vagrant up --no-parallel
+vagrant ssh jump -c "
 set -exuf
-sudo parted -a optimal /dev/sda ---pretend-input-tty resizepart 3 yes 100%
-sudo resize2fs /dev/sda3
-sudo apt update
-sudo apt install -y make
-cd /vagrant
+cd /icn
 sudo su -c 'make {target}'
 "