You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 17, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 17, 2023. It is now read-only.
Guest Additions version mismatch could be due to a logical issue in getting guest version #213
The latest version of vagrant-vbguest, at the time of writing this, is 1.11.0.
Looking at the master branch it seems we rely on the installer's guest_version method to determine the active version as reported by the Guest. I am using Ubuntu guest, so the Ubuntu installer delegates the responsibility to the Linux installer from which it inherits.
This method is calling super to load the driver determined guest version. But as a side effect it is also assigning the @guest_version instance variable. Note, the super method is delegating to the Base installer. The base installer reads the value from the driver and is in the format ''5.0.18 r106667'. This is then assigned to the @guest_version.
The logical issue with the guest_version method is we read the driver_version by altering the response of super; super.to_s[/^(\d+\.\d+.\d+)/, 1]. So the value assigned to driver_version is '5.0.18'.
When we go to determine the version reported by VBoxService, we also do the same altering of the response; data.to_s[/^(\d+\.\d+.\d+)/, 1]. So the check for the driver_version being different than fails since the versions are the same. When they are different we invoke a warning of their difference. This is expected behavior.
The problem is we rely on the driver version and VBoxService reported versions to be different to set the @guest_version. This assignment should be independent of version mismatch as it is still the guest version that we have calculated.
The method then completes and returns @guest_version'; which is still set to '5.0.18 r106667'.
I believe that the assignment of the @guest_version = v should be done outside and after the comparison of the versions.
So the fix might be to move the assignment outside below the if statement.
If I have made any assumptions that aren't correct please provide details. Thanks.
Activity
NeMO84 commentedon May 27, 2016
Please see my pull request: #214
Its a little more thorough than my description above.
@guest_version should be assigned in all cases whene service_version …
NeMO84 commentedon May 28, 2016
PR merged.
NeMO84 commentedon May 31, 2016
For those who are also affected by this issue, I wrote a quick script to help me sync the version if they change after I upgrade:
https://gist.github.com/NeMO84/95e93346e81dbb2b75dd677922addbda
Hope it helps.