From 192b30cb61403ddbac80533f8f6264a51aac1035 Mon Sep 17 00:00:00 2001 From: Vasiliy Pleshakov Date: Tue, 22 Sep 2015 19:24:24 +0300 Subject: [PATCH] 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 --- virtualbox/actions/slave-nodes-create-and-boot.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virtualbox/actions/slave-nodes-create-and-boot.sh b/virtualbox/actions/slave-nodes-create-and-boot.sh index 732f436dd..35e5819ba 100755 --- a/virtualbox/actions/slave-nodes-create-and-boot.sh +++ b/virtualbox/actions/slave-nodes-create-and-boot.sh @@ -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