#!/bin/sh echo $# [ $# < 4 ] && { echo "error" exit 1 } instance_name=$1 instance_ip=$2 vdb_volume_id=$3 hypervisor_host=$4 flavor_id=026a4f21-d047-4aa2-aeab-a0708b70fa10 first_net_id=83d41ae9-b93e-4874-b113-55c916523bed availability_zone=nova security_group=default image_id=2dc846c3-5ff7-48a1-9d3f-47e1bc083b56 key_name=key2 volume_type=SATA nova boot --flavor $flavor_id --nic net-id=$first_net_id,v4-fixed-ip=$instance_ip --availability-zone $availability_zone:$hypervisor_host --security-groups $security_group --block-device id=$image_id,source=image,dest=volume,size=40,shutdown=remove,bootindex=0,volume_type=$volume_type --block-device id=$vdb_volume_id,source=volume,dest=volume,device=vdb --config-drive true --user-data /root/passwd.sh --key-name $key_name $instance_name