create vm

#!/bin/sh

echo $#
[ $# < ] && {
echo "error"
exit
} instance_name=$
instance_ip=$
vdb_volume_id=$
hypervisor_host=$ flavor_id=026a4f21-d047-4aa2-aeab-a0708b70fa10
first_net_id=83d41ae9-b93e--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=,shutdown=remove,bootindex=,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
上一篇:spring集成redis,集成redis集群


下一篇:Maximum Depth of Binary Tree 解答