File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ wget http://dev.centos.org/centos/hyper-v/CentOS-6.4-x86_64-Minimal-OpenStack.image.qcow2.bz2
4
+ bunzip2 CentOS-6.4-x86_64-Minimal-OpenStack.image.qcow2.bz2
5
+ glance image-create --name=" CentOS-6.4-x86_64-Minimal-OpenStack" --disk-format=qcow2 --container-format=bare --property hypervisor_type=qemu < CentOS-6.4-x86_64-Minimal-OpenStack.image.qcow2
6
+
7
+ mkdir -p ~ /.ssh
8
+ nova keypair-add key1 > ~ /.ssh/id_rsa
9
+ chmod 600 ~ /.ssh/id_rsa
10
+
11
+ quantum net-create net1 | awk ' {if (NR == 6) {print $4}}' `
12
+ SUBNETID1=` quantum subnet-create net1 10.0.1.0/24 --dns_nameservers list=true 8.8.8.8 | awk ' {if (NR == 11) {print $4}}' `
13
+
14
+ ROUTERID1=` quantum router-create router1 | awk ' {if (NR == 7) {print $4}}' `
15
+
16
+ quantum router-interface-add $ROUTERID1 $SUBNETID1
17
+
18
+ EXTNETID1=` quantum net-create ext_net --router:external=True | awk ' {if (NR == 6) {print $4}}' `
19
+ quantum subnet-create ext_net --allocation-pool start=10.7.201.50,end=10.7.201.200 --gateway 10.7.1.1 10.7.0.0/16 --enable_dhcp=False
20
+
21
+ quantum router-gateway-set $ROUTERID1 $EXTNETID1
22
+
23
+ nova boot --flavor 1 --image " CentOS-6.4-x86_64-Minimal-OpenStack" --key-name key1 --nic net-id=$NETID1 vm1
24
+
You can’t perform that action at this time.
0 commit comments