Raise proper error if there aren't any NIC slots available
This commit is contained in:
parent
7cd663391e
commit
48eaa93745
|
@ -437,6 +437,10 @@ module Vagrant
|
|||
error_key(:virtualbox_invalid_version)
|
||||
end
|
||||
|
||||
class VirtualBoxNoRoomForHighLevelNetwork < VagrantError
|
||||
error_key(:virtualbox_no_room_for_high_level_network)
|
||||
end
|
||||
|
||||
class VirtualBoxNotDetected < VagrantError
|
||||
status_code(8)
|
||||
error_key(:virtualbox_not_detected)
|
||||
|
|
|
@ -51,7 +51,7 @@ module VagrantPlugins
|
|||
slot = options[:adapter]
|
||||
if !slot
|
||||
if available_slots.empty?
|
||||
# TODO: Error that we have no room for this adapter
|
||||
raise Vagrant::Errors::VirtualBoxNoRoomForHighLevelNetwork
|
||||
end
|
||||
|
||||
slot = available_slots.shift
|
||||
|
|
|
@ -280,6 +280,13 @@ 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_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"
|
||||
network configurations consume a single network adapter slot on the
|
||||
VirtualBox VM. VirtualBox limits the number of slots to 8, and it
|
||||
appears that every slot is in use. Please lower the number of used
|
||||
network adapters.
|
||||
virtualbox_not_detected: |-
|
||||
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
|
||||
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
|
||||
|
|
Loading…
Reference in New Issue