create and associate Host-Only Network Interface for newly provisioned SUV

This commit is contained in:
Michael Becker 2024-11-01 22:59:05 -04:00
parent 13c02540b9
commit 8bf24dd7ac

View File

@ -96,8 +96,17 @@ if [ "$USE_VAGRANT" == "true" ]; then
else
# create a new Host-Only Network Interface
HOIFNAME=$(VBoxManage hostonlyif create | grep -o -P "(?<=').*(?=')" )
echo "Creating Host-Only Network IF '$HOIFNAME' with IP address $SUV_IP"
VBoxManage hostonlyif ipconfig $HOIFNAME --ip=$SUV_IP
# create the VM
VBoxManage clonevm mochasuv-base --mode=machine --name=mochasuv-$SUV_NAME --register
# assign the newly-created Host-Only Network Interface to the newly-created VM
VBoxManage modifyvm mochasuv-$SUV_NAME --nic2=hostonly --host-only-adapter2=$HOIFNAME
fi
if [ "$?" != "0" ]; then