providers/virtualbox: error if can't read VM name [GH-4047]

This commit is contained in:
Mitchell Hashimoto 2014-08-08 10:49:07 -07:00
parent 0da5d7b650
commit ae1a03903e
3 changed files with 15 additions and 1 deletions

View File

@ -43,6 +43,7 @@ BUG FIXES:
- hosts/windows: RDP command works without crash. [GH-3962]
- providers/docker: Port on its own will choose random host port. [GH-3991]
- providers/virtualbox: Increase network device limit to 36. [GH-4206]
- providers/virtualbox: Error if can't detect VM name. [GH-4047]
- provisioners/chef: Chef client cleanup should work. [GH-4099]
- provisioners/puppet: Manifest file can be a directory. [GH-4169]
- provisioners/puppet: Properly escape facter variables for PowerShell

View File

@ -171,6 +171,9 @@ module VagrantPlugins
@logger.debug("Doing dry-run import to determine parallel-safe name...")
output = execute("import", "-n", ovf)
result = /Suggested VM name "(.+?)"/.match(output)
if !result
raise Vagrant::Errors::VirtualBoxNoName, output: output
end
suggested_name = result[1].to_s
# Append millisecond plus a random to the path in case we're

View File

@ -1166,6 +1166,16 @@ en:
VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.
virtualbox_no_name: |-
Vagrant was unable to determine the recommended name for your
VirtualBox VM. This is usually an issue with VirtualBox. The output
from VirtualBox is shown below, which may contain an error to fix.
The best way to fix this issue is usually to uninstall VirtualBox,
restart your computer, then reinstall VirtualBox.
VirtualBox output:
%{output}
virtualbox_no_room_for_high_level_network: |-
There is no available slots on the VirtualBox VM for the configured
high-level network interfaces. "private_network" and "public_network"