官网地址 https://docs.openstack.org/install-guide/launch-instance-networks-provider.html #:导入变量 [[email protected] ~]# source scripts/admin-stein.sh #:创建一个网络 [[email protected] ~]# openstack network create --share --internal --provider-physical-network external --provider-network-type flat external-net #:创建一个子网 [[email protected] ~]# openstack subnet create --network external-net --allocation-pool start=192.168.6.100,end=192.168.6.200 --dns-nameserver 172.16.0.1 --gateway 192.168.7.254 --subnet-range 192.168.0.0/21 external-sub
官网地址 https://docs.openstack.org/install-guide/launch-instance.html#launch-instance-networks #:创建一个镜像 [[email protected] ~]# openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano #:导入环境变量 [[email protected] ~]# source scripts/admin-stein.sh #:创建Key [[email protected] ~]# ssh-keygen -q -N "" [[email protected] ~]# openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey #:列出key [[email protected] ~]# openstack keypair list #:创建安全组 [[email protected] ~]# openstack security group rule create --proto icmp default [[email protected] ~]# openstack security group rule create --proto tcp --dst-port 22 default
官网地址 https://docs.openstack.org/install-guide/launch-instance-provider.html #:导入环境变量 [[email protected] ~]# source scripts/demo-stein.sh #:测试 [[email protected] ~]# openstack flavor list [[email protected] ~]# openstack image list [[email protected] ~]# openstack network list [[email protected] ~]# openstack security group list #:创建一个实例 [[email protected] ~]# openstack server create --flavor m1.nano --image cirros-0.4.0 --nic net-id=9c0a0cb4-73ee-4335-87d7-1baa93cd1db0 --security-group default --key-name mykey linux37-vm1 #:查看 [[email protected] ~]# openstack server list
原文地址:https://www.cnblogs.com/maxuebin/p/11438443.html
时间: 2024-10-30 09:07:31