查看命令操作
openstack network agent list
openstack network list
openstack keypair list
openstack flavor list
openstack image list
openstack network list
openstack security group list
创建网络
openstack network create --share --external --provider-physical-network provider --provider-network-type flat provider
创建子网
openstack subnet create --network provider
--allocation-pool start=192.168.3.100,end=192.168.3.110
--dns-nameserver 202.96.128.166 --gateway 192.168.3.1
--subnet-range 192.168.3.0/24 provider-subnet
创建实例类型
openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
创建key并上传
source demo-openstack
ssh-keygen -q -N ""
openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
创建安全组
openstack security group rule create --proto icmp default
openstack security group rule create --proto tcp --dst-port 22 default
创建实例
openstack server create --flavor m1.nano --image cirros --nic net-id=[NETWORK_ID] --security-group default --key-name mykey demo-instance