create vm
Created 星期二 15 三月 2016
images_id
常: net_id subnet_id
变: 内型:flavor; 镜像:images_id; IP地址:ip_address; 虚拟机名:vm_name; 物理机:
一、创建网络: 测试网络 template_public 网络 id 47d15423-fb80-445b-8828-aea42ce43b55 subnet_id 子网 id 860057ff-16b7-4246-b76f-3ae8dab14fa9
neutron port-create --fixed-ip subnet_id=860057ff-16b7-4246-b76f-3ae8dab14fa9,ip_address=10.1.10.12 --name test12 47d15423-fb80-445b-8828-aea42ce43b55
二、创建 volume nova volume-create --volume-type sas --display-name volume-name-3 50
nova volume-create --image-id 7e3c38f8-e426-4f6e-b0c2-d35db7aaaec8 --volume-type sas --display-name xiecd 1 | grep " id " |cut -d "|" -f3 |cut -d " " -f2
nova volume-create --image-id "%s" \ --volume-type sas --display-name "%s" "%s" \ | grep " id " |cut -d "|" -f3 |cut -d " " -f2
三 、创建虚拟机: nova boot --config-drive true --flavor m1.tiny --block-device source=image,id=7e3c38f8-e426-4f6e-b0c2-d35db7aaaec8,dest=volume,size=50,bootindex=0 --nic port-id=6506a7cf-c196-40e4-80d7-071a19d79ee9 --security-group default --availability-zone nava:cc1 instance-name
nova boot --config-drive true --flavor 1 --boot-volume 5a25de58-acf3-4e17-8a58-1ac84d085abd(volume_id) --nic port-id=f370d408-6946-4142-9c29-f1438441c48c(port_id) --security-group default vm_name
指定物理机选用 --availability-zone nova:cc3
网络部分:--nic port-id
--nic net-id
id_pub_router=neutron router-create --ha true $NAME_PUBLIC_ROUTER \
| grep " id " |cut -d '|' -f3 |cut -d ' ' -f2