aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/host_virtual.sh
diff options
context:
space:
mode:
authorwutianwei <wutianwei1@huawei.com>2018-01-27 18:08:34 +0800
committerwutianwei <wutianwei1@huawei.com>2018-01-27 18:08:34 +0800
commit3907d59a072d158de67e3cc94bc6ea0ed747d390 (patch)
tree441271197d405e7ca50ca90e10b83c3f30ab708b /deploy/host_virtual.sh
parent2c93fa28f1f1e78f4135f096f0c59e82963fd847 (diff)
Compass4nfv virtual deploy support direct connection
compass4nfv using nat for VM external network currently, this patch add the direct connection method. if want to use it ,you need set the NAT_EXTERNAL to false, and configure the network.yml according to you environment Change-Id: I5a1a2f96b8c32a00eaef4d591c4452b555f0c9a2 Signed-off-by: wutianwei <wutianwei1@huawei.com>
Diffstat (limited to 'deploy/host_virtual.sh')
-rwxr-xr-xdeploy/host_virtual.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/deploy/host_virtual.sh b/deploy/host_virtual.sh
index 03a1230f..d955b747 100755
--- a/deploy/host_virtual.sh
+++ b/deploy/host_virtual.sh
@@ -52,6 +52,11 @@ function launch_host_vms() {
vm_template_file="$vm_template_dir/host.xml"
vm_template_arch="$vm_template_dir/host-$COMPASS_ARCH.xml"
[ -f $vm_template_arch ] && vm_template_file=$vm_template_arch
+ if [[ "$NAT_EXTERNAL" == "false" ]]; then
+ NET_IAAS="external"
+ else
+ NET_IAAS="external_nat"
+ fi
log_info "bringing up pxe boot vms"
i=0
@@ -67,7 +72,7 @@ function launch_host_vms() {
-e "s#REPLACE_IMAGE#$vm_dir/disk.img#g" \
-e "s/REPLACE_BOOT_MAC/${mac_array[i]}/g" \
-e "s/REPLACE_NET_INSTALL/install/g" \
- -e "s/REPLACE_NET_IAAS/external_nat/g" \
+ -e "s/REPLACE_NET_IAAS/$NET_IAAS/g" \
"$vm_template_file" \
> $vm_dir/libvirt.xml