制作cirros_raw镜像: openstack image create "cirros_raw" --file cirros-0.5.0-x86_64-disk.raw --disk-format raw --container-format bare --public glance image-list nova flavor-list nova network-list nova list cinder list nova show <instance-id> cinder show <instance-id> 创建虚拟机并挂载volume cinder create --volume-type basic-replica2 --name <name> --image cirros_raw <size in GB> nova boot --flavor <flavor> --boot-volume <vol_id> --nic net-id=<net_id> <name> cinder create --volume-type basic-replica2 --name <name> <size> nova volume-attach <server id> <volume id> 清除nova虚拟机和cinder盘: nova list | grep SHUTOFF | awk -F"|" '{print $2}' > tt.tx cat tt.txt | awk '{cmd="nova delete "$0;system(cmd)}' cinder list| grep in-use | awk -F"|" '{cmd="nova volume-detach "$8" "$2;system(cmd)}' cinder list| grep available | awk -F"|" '{cmd="cinder delete "$2;system(cmd)}' #awk : nova list | awk -F"|" '{if($4~/SHUTOFF/) print $2}' | awk '{if($1~/-7/) print $1}' lsblk -d -o name,rota