8.21

Launch an instance from an image

$ openstack server create --flavor 1 --image 397e713c-b95b-4186-ad46-6126863ea0a9 \
  --security-group default --key-name KeyPair01 --user-data cloudinit.file \
  myCirrosServer

Launch an instance from a volume

$ openstack volume create --size 8 my-volume

$ openstack server create --flavor 2 --image 98901246-af91-43d8-b5e6-a4506aa8f369 \
  --block-device source=volume,id=d620d971-b160-4c4e-8652-2513d74e2080,dest=volume,shutdown=preserve \
  myInstanceWithVolume  #附加新卷
$ nova boot --flavor FLAVOR --block-device \
  source=SOURCE,id=ID,dest=DEST,size=SIZE,shutdown=PRESERVE,bootindex=INDEX \
  NAME   #对应界面创建 id是前面的
SOURCE
 
上一篇:Android Studio 3.0及Gradle Plugin 3.0升级注意事项


下一篇:Openstack Horizon二次开发