diff --git a/plugins/providers/virtualbox/driver/meta.rb b/plugins/providers/virtualbox/driver/meta.rb index 63af500c65a..7c0b2600652 100644 --- a/plugins/providers/virtualbox/driver/meta.rb +++ b/plugins/providers/virtualbox/driver/meta.rb @@ -197,7 +197,11 @@ def read_version end end - parts = output.split("_") + version_line = output.each_line.find do |line| + !line.start_with?("WARNING:") + end + + parts = version_line.to_s.split("_") return nil if parts.empty? parts[0].split("r")[0] end