Class: VagrantPlugins::ProviderVirtualBox::Driver::Version_4_2
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderVirtualBox::Driver::Version_4_2
- Defined in:
- lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/driver/version_4_2.rb
Instance Method Summary collapse
Instance Method Details
#read_mac_addresses ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/driver/version_4_2.rb', line 5 def read_mac_addresses macs = {} info = execute("showvminfo", @uuid, "--machinereadable", :retryable => true) info.split("\n").each do |line| if matcher = /^macaddress(\d+)="(.+?)"$/.match(line) adapter = matcher[1].to_i mac = matcher[2].to_s macs[adapter] = mac end end macs end |