-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HGFS issue after updating kernel drivers #4362
Comments
you need to reinstall vmware tools mount the iso then perl <vmwaretools_folder/vmware_toolsfile.pl> -default Alvaro. On Tue, Aug 19, 2014 at 12:12 PM, David Cramer notifications@github.com
|
FYI so far I've still yet to get this working with the upgraded kernel. I stuffed this into /etc/rc.local (based off some random searches):
|
FYI that script + upgrading the plugin and vagrant fixed my issues. On Mon, Aug 18, 2014 at 5:33 PM -0700, "Alvaro Miranda" notifications@github.com wrote: you need to reinstall vmware tools mount the iso untar the vmware tools then perl <vmwaretools_folder/vmware_toolsfile.pl> -default Alvaro. On Tue, Aug 19, 2014 at 12:12 PM, David Cramer notifications@github.com wrote:
— |
This same issue exists in VirtualBox. As Alvaro said (and you verified), you have to reconfigure/reinstall the tools, since they work via kernel modules that depend on the version you have. I'm not sure how in scope it is for Vagrant to handle this but Vagrant over time has been doing more and more for the user automatically so it probably isn't far off scope. Plus with the new capabilities systems in Vagrant 1.1+ we can probably do it without relative pain, although the maintenance overhead would be enormous most likely since we need to figure how to get the latest tools (VirtualBox/VMware don't have APIs for this) and automatically try to install them. |
@mitchellh fwiw VMWare's tools are already present on the system in my case. All I had to do was call out to them. (I didn't need to mount the cdrom/etc) I actually tried to resolve this w/ VirtualBox as well and it had seemingly more serious issues that I failed to grok. |
The more I think about it, the more I think this should be delegated to a plugin to detect. If a plugin can prove this feature out then I would merge it in but there are a lot of moving pieces to get there (detecting kernel versions, what version is supported by the installed tools/additions, downloading new versions, installing new versions, checking for errors in the install, getting the dependencies such as kernel headers), and I just wouldn't feel confident putting that sort of logic into Vagrant proper. Historically we've just asked that as you upgrade kernels you include scripts that also verify and reinstall the tools. As more of our users have moved to Packer-based workflows this has actually become less of an issue, but that is really just masking the real issue rather than solving it. I guess some questions related to VMware specifically to determine if this is the case:
Given all the edge cases I'm not realistically seeing any meaningful progress being made on this. Thoughts? |
I at least agree that it should be the responsibility of the provider plugin. Now that I think about it, the reason the tools exist on my images are because they’re all based off of the Hashicorp provided boxes. If there’s no way to trigger a download, and there’s no guarantee that they’ll exist somewhere on the machine, but this isn’t a solvable problem. Focusing on the VMWare case, when I went to mount the tools (which I expected to end up at /mnt/cdrom) nothing happened. I ended up running the commands provided from the help page (i.e. sudo mount /dev/sr0 /mnt/cdrom) and then was able to run everything headless. If that’s actually achievable for cases where the tools have already been downloaded it at least seems like a reasonable feature to adopt. I sort of agree that this can be better solved in the Packer case, but the problem is a lot of provisioning happens outside of Packer, and with the end goal being to replicate what can happen in production (our case) we just want to apply our provisioners from a base machine. On Monday, August 18, 2014 at 7:06 PM, Mitchell Hashimoto wrote:
|
Sorry to butt in. Want to add my 2 cents from my VMware experience. The HGFS (Host-Guest File System) driver is for VMware's shared folder support. Vagrant hangs & times out waiting for the HGFS driver to load when booting w/an upgraded kernel because the new kernel does not have that HGFS kernel driver available (yet). Two thoughts:
|
I figured it out. TL; DRSet Details
So the trick here is to just update that |
I ended up doing the following, and it's working perfectly:
|
This is fantastic. Great job. I think in the short term we can fix this by adding a "guides" or FAQ section to the docs and adding this there. |
@dcramer Cool! FWIW - I managed to optimize the solution a little bit:
This works because the key/values appended at the end of the I wrote this 'ish up at: http://dantehranian.wordpress.com/2014/08/19/vagrant-vmware-resolving-waiting-for-hgfs-kernel-module-timeouts/ |
you should be abkle to something like service vmware-tools status rkernel= echo "running vmware-config-tools.pl" echo "restarting vmware-tools" echo "restarting networking" fi to avoid doing on every single start.. On Tue, Aug 19, 2014 at 12:41 PM, David Cramer notifications@github.com
|
As a Vagrant newbie, I spent hours trying every suggestion I could find on the net to get this working. Just running a yum update on a fresh precise64 box would cause the problem on the next VM start. I was ready to give up when I reread this page a bit more carefully. What did work was following what dcramer spelled out for the Vagrantfile changes, and installing Perl on the VM. Just appending a line to /etc/vmware-tools/locations did not work in my attempts... perhaps I missed something. It may have taken an additional halt/up sequence, but now the VM is happy and so am I. Hope my elatation holds as I start to play around. That was a bit of a tough go for a first timer messing with a Vagrantfile! I would very much encourage this to be documented on the site. My Vagrant & VMware provider were brand spanking new, so it was pretty damn frustrating. |
hello, you are getting into a difficult path if you start trying to many things on the expectation is you get a base box that is usable, if you start doing that is after next boot update/compile vmfs drivers or virtualbox drivers once you get this new working box, after this couple fo reboots and Try to avoid multitask parallel things, since that will make harder those would be my advice to keep your vagrant experience simple as possible. alvaro. On Sat, Sep 20, 2014 at 5:53 AM, StannisSmith notifications@github.com
|
My comments were to encourage Vagrant management to document the "best" fix to this problem, and to point out that what dcramer suggested worked for me (while the locations file append did not.) Alvaro, if the fix you suggested is better (I confess I haven't tried that one) then it would be terrific if that would be clearly demonstrated. In my many attempts at a fix the problem, the VM start would often loop until failure at the SSH step, the boot process would appear hung, or when complete "vagrant ssh" would simply return nothing. Just running a yum update on a fresh box clearly isn't trying too many things at once, it is one of the simplest things to start off with. In fact the problem appears to be something everyone using the VMware provider will encounter right off the bat. I had no idea that one might need to "update/compile vmfs drivers" after VM kernel changes, nor did I know off the top of my head how to accomplish that. I'm guessing that many others Vagrant/VMware users will not either. Sadly, it even took me a while to figure out that I could manually hunt down and open the VM in workstation and directly watch for problems during the boot (D'oh!) Most users on the level of trying Vagrant with the VMware provider will be able to plod through it like I did... if they persevere through the frustrations. However, that could all be avoided if this were spelled out clearly in the Vagrant Dox (or is it and I've just missed it?) |
This might help, might not. When using vmware tools and auto-kmods - At the moment the new kernel gets installed, the system is going to need to have a set of development tools installed. These tools might have been installed, but then cleaned up, in the provisioning process. In my centos7/packer code, this amounted to removing a couple lines of 'cleanup' in the vmtools.sh and cleanup.sh scripts. My 'vagrant reload' behavior is now what I've come to expect, [and love]. cheers (I should note, I worked around this previously in Centos6.x by using the traditional esx packaged vmware tools offering. I can go back to open-vm-tools everywhere.) |
I've updated the website with a full page on how to handle kernel upgrades for VMware as well as @dcramer's helpful script. Please let me know any information I can add to this to improve it. It will be deployed with the next version of Vagrant. |
Just a note for anyone who comes back here with concerns that it no longer works under the latest kernel 3.13.0-46-generic on Ubuntu (and potentially other distros). This fix still works, the issue is that VMware Tools itself hasn't caught up to some code changes in the kernel. According to https://communities.vmware.com/message/2477575#2477575 it will be fixed soon for Workstation 11 and Fusion 7, and potentially backported to Workstation 10 and Fusion 6. This thread has some potential workarounds, the best of which is downgrading your kernel to -45 or earlier and rebuilding VMware Tools. If anybody is using dist-upgrade in their Vagrant or Packer scripts, this will probably bite them shortly. Here's an excellent article on why system administrators don't dist-upgrade automatically. http://askubuntu.com/a/226213 |
- see hashicorp/vagrant#4362 (comment: hashicorp/vagrant#4362 (comment)) for details
There has to be a better way to debug/troubleshoot this issue. It fundamentally destroys the usefulness of using Vagrant in the first place and at present, it takes massive amounts of time to fix. I would fully support any work to help make the functionality here and any glitches more transparent. |
The workaround for Kernel auto upgrade does not work for Ubuntu 14.04.4 version. Had to go back to 14.04.3. |
I've raised this issue before, but I'm now confident that the problem happens consistently when upgrading kernel drivers.
How to reproduce:
VMWare's GUI doesnt exhibit the same issues as Vagrant, but I believe the key issue is that VMWare Tools need to be reconfigured. I dont know how the GUI gets around this, but it does.
The text was updated successfully, but these errors were encountered: