2014-10-24 19:30:12 +00:00
|
|
|
---
|
2016-01-19 18:08:53 +00:00
|
|
|
layout: "docs"
|
2014-10-24 19:30:12 +00:00
|
|
|
page_title: "Kernel Upgrade - VMware Provider"
|
2016-01-19 18:08:53 +00:00
|
|
|
sidebar_current: "providers-vmware-kernel-upgrade"
|
|
|
|
description: |-
|
|
|
|
If as part of running your Vagrant environment with VMware, you perform
|
|
|
|
a kernel upgrade, it is likely that the VMware guest tools will stop working.
|
|
|
|
This breaks features of Vagrant such as synced folders and sometimes
|
|
|
|
networking as well.
|
2014-10-24 19:30:12 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Kernel Upgrade
|
|
|
|
|
|
|
|
If as part of running your Vagrant environment with VMware, you perform
|
|
|
|
a kernel upgrade, it is likely that the VMware guest tools will stop working.
|
|
|
|
This breaks features of Vagrant such as synced folders and sometimes
|
|
|
|
networking as well.
|
|
|
|
|
|
|
|
This page documents how to upgrade your kernel and keep your guest tools
|
2016-01-19 18:08:53 +00:00
|
|
|
functioning. If you are not planning to upgrade your kernel, then you can safely
|
2014-10-24 19:30:12 +00:00
|
|
|
skip this page.
|
|
|
|
|
|
|
|
## Enable Auto-Upgrade of VMware Tools
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
If you are running a common OS, VMware tools can often auto-upgrade themselves.
|
2014-10-24 19:30:12 +00:00
|
|
|
This setting is disabled by default. The Vagrantfile settings below will
|
|
|
|
enable auto-upgrading:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
# Ensure that VMWare Tools recompiles kernel modules
|
|
|
|
# when we update the linux images
|
|
|
|
$fix_vmware_tools_script = <<SCRIPT
|
|
|
|
sed -i.bak 's/answer AUTO_KMODS_ENABLED_ANSWER no/answer AUTO_KMODS_ENABLED_ANSWER yes/g' /etc/vmware-tools/locations
|
2015-03-31 22:20:42 +00:00
|
|
|
sed -i 's/answer AUTO_KMODS_ENABLED no/answer AUTO_KMODS_ENABLED yes/g' /etc/vmware-tools/locations
|
2014-10-24 19:30:12 +00:00
|
|
|
SCRIPT
|
|
|
|
|
2016-02-02 14:43:28 +00:00
|
|
|
Vagrant.configure("2") do |config|
|
2014-10-24 19:30:12 +00:00
|
|
|
# ...
|
|
|
|
|
|
|
|
config.vm.provision "shell", inline: $fix_vmware_tools_script
|
|
|
|
end
|
|
|
|
```
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
Note that this does not work for every OS, so `vagrant up` with the above
|
2014-10-24 19:30:12 +00:00
|
|
|
settings, do a kernel upgrade, and do a `vagrant reload`. If HGFS (synced
|
|
|
|
folders) and everything appears to be working, great! If not, then read on...
|
|
|
|
|
|
|
|
## Manually Reinstalling VMware Tools
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
At this point, you will have to manually reinstall VMware tools. The best
|
2014-10-24 19:30:12 +00:00
|
|
|
source of information for how to do this is the
|
2016-01-19 18:08:53 +00:00
|
|
|
[VMware documentation](https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1018414).
|
2014-10-24 19:30:12 +00:00
|
|
|
|
|
|
|
There are some gotchas:
|
|
|
|
|
|
|
|
* Make sure you have the kernel headers properly installed. This varies
|
|
|
|
by distro but is generally a package available via the package manager.
|
|
|
|
|
|
|
|
* Watch the installation output carefully. Even if HGFS (synced folders)
|
|
|
|
support failed to build, the installer will output that installing VMware
|
|
|
|
tools was successful. Read the output to find any error messages.
|