Attempt to read guest additions version from showvminfo [GH-1575]
This commit is contained in:
parent
efcb25693e
commit
d8ff2cb5ad
|
@ -12,6 +12,8 @@ IMPROVEMENTS:
|
|||
- Better locking around handling the `box_url` parameter for
|
||||
parallel providers.
|
||||
- Solaris guest is now properly detected on SmartOS, OmniOS, etc. [GH-1639]
|
||||
- Guest addition version detection is more robust, attempting other
|
||||
routes to get the version, and also retrying a few times. [GH-1575]
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
|
|
|
@ -264,6 +264,13 @@ module VagrantPlugins
|
|||
return value.split("_").first
|
||||
end
|
||||
|
||||
# If we can't get the guest additions version by guest property, try
|
||||
# to get it from the VM info itself.
|
||||
info = execute("showvminfo", @uuid, "--machinereadable", :retryable => true)
|
||||
info.split("\n").each do |line|
|
||||
return $1.to_s if line =~ /^GuestAdditionsVersion="(.+?)"$/
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue