Describe VM with MAC address [vbox-scripts]

Get NIC1 MAC address and write it into description field of virtualbox VM.

Closes-Bug: #1498894
Change-Id: If2fdc04c88fce222d4d3aa24a12094a4146df525
This commit is contained in:
Vasiliy Pleshakov 2015-09-22 19:24:24 +03:00
parent 59c4eea634
commit 192b30cb61

View File

@ -49,6 +49,9 @@ for idx in $(eval echo {1..$cluster_size}); do
add_disk_to_vm $name 1 $vm_slave_second_disk_mb
add_disk_to_vm $name 2 $vm_slave_third_disk_mb
#add NIC1 MAC to description
mac=$(vboxmanage showvminfo $name |awk -F ': ' '$1~/NIC 1/ {mac=gensub(/^.+ MAC: ([0-9A-F]{12}).+$/,"\\1","g",$0);print mac}')
vboxmanage modifyvm $name --description $mac
enable_network_boot_for_vm $name
# The delay required for downloading tftp boot image