vagrant-xhyve
vagrant-xhyve copied to clipboard
Figure out why sometimes vmnet refuse to create interface
Vmnet notes:
-
vmnet
will refuse to create interface for some UUIDs.-
SecureRandom.uuid
(UUIDv4) hit the above bug every ~~10~~ 20 UUIDs or so created. -
XPC_TYPE_UUID
actually conforms DCE 1.1 UUIDs (peruuid(3)
)- Maybe just call
xpc_uuid_create
and sidestep this incompatibility altogether.
- Maybe just call
-
-
vmnet
limits single process to create only about 4-5 interfaces. -
vmnet
require codesign andcom.apple.vm.networking
entitlement (this is whysudo
is required). - generating about 100+
vmnet
interfaces will crash the host machine. (Don't)
Test with (sudo ruby -Ilib test.rb
):
require 'securerandom'
require 'vagrant-xhyve/support/vmnet_mac'
uuid = SecureRandom.uuid
puts "#{uuid} - #{VagrantPlugins::Xhyve::Support::VmnetMac.from_uuid(uuid)}"
For example, e083cf15-cbfc-4f31-a92b-0de72c86e857
reliably fails on my local machine.