From de59f0e837c3c89c78a1d60e3fb70a630df9b318 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 26 Jul 2017 17:17:06 +0200 Subject: [PATCH] Vagrant: provision even if upgrading Parallels guest tools isn't possible right now refs #2896 --- .puppet/manifests/parallels-upgrade-guest-tools.sh | 14 ++++++++++++++ Vagrantfile | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 .puppet/manifests/parallels-upgrade-guest-tools.sh diff --git a/.puppet/manifests/parallels-upgrade-guest-tools.sh b/.puppet/manifests/parallels-upgrade-guest-tools.sh new file mode 100755 index 000000000..5d0233c59 --- /dev/null +++ b/.puppet/manifests/parallels-upgrade-guest-tools.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +# If the installed version is outdated, try to update. + +# The updater seems to try to install kernel-devel-$(uname -r) which is not +# available in case of an outdated kernel version. +# If the updater fails (for this reason), we try to upgrade the kernel in the +# hope that the updater will succeed on the next reboot. + +ptiagent-cmd --ver || \ +ptiagent-cmd --install || \ +yum update kernel -y diff --git a/Vagrantfile b/Vagrantfile index 57149dee7..18212ef1c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -28,8 +28,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| p.name = "Icinga Web 2 Development" - # Update Parallels Tools automatically - p.update_guest_tools = true + # Update Parallels Tools automatically ... + p.update_guest_tools = false + # ... but don't fail completely. (see the shell script) + override.vm.provision :shell, :run => "always", :path => ".puppet/manifests/parallels-upgrade-guest-tools.sh" # Set power consumption mode to "Better Performance" p.optimize_power_consumption = false