summaryrefslogtreecommitdiffstats
path: root/pike/vagrant/create_vm.sh
diff options
context:
space:
mode:
authorHaibin Huang <haibin.huang@intel.com>2019-09-03 10:27:42 +0800
committersonggongjun <gongjun.song@intel.com>2019-09-03 15:34:49 +0800
commit65c7c6a5801df1c118a87f8741bc06b67dfaa919 (patch)
tree3618a87fc4c530df146dcc71a193aa0032bb2a93 /pike/vagrant/create_vm.sh
parentce4644f69838660c02afba6f6393e9705cddee40 (diff)
Merge onap and openstack_pike.
Issue-ID: MULTICLOUD-798 Signed-off-by: songgongjun <gongjun.song@intel.com> Change-Id: I13fe7461c0d9c173970b080cdd2cb73dbae930b0
Diffstat (limited to 'pike/vagrant/create_vm.sh')
-rwxr-xr-xpike/vagrant/create_vm.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/pike/vagrant/create_vm.sh b/pike/vagrant/create_vm.sh
new file mode 100755
index 00000000..c41c5dae
--- /dev/null
+++ b/pike/vagrant/create_vm.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+source ~/devstack/openrc admin admin
+nova-manage cell_v2 discover_hosts
+nova-manage cell_v2 map_cell_and_hosts
+netid=$(openstack network list --name private -f value | cut -f1 -d' ')
+openstack server create --flavor 1 --image=cirros-0.3.4-x86_64-uec --nic net-id=$netid vm1