涛子 - 简单就是美

成单纯魁增,永继振国兴,克复宗清政,广开家必升

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
# 建立网络(provider)与子网
openstack network create  --share --external --provider-physical-network provider --provider-network-type flat provider
openstack subnet create --network provider --allocation-pool start=10.0.0.11,end=10.0.0.20 --dns-nameserver 10.0.0.100 --gateway 10.0.0.0.1 --subnet-range 10.0.0.0/24 provider

openstack network list
openstack subnet list
# 建立flavor
openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.tiny
openstack flavor create --id 1 --vcpus 1 --ram 2048 --disk 10 m1.middium
openstack flavor list
# 建立key pair
ssh-keygen -q -N ""
openstack keypair create --public-key ~/.sshid_rsa.pub mykey

openstack keypair list
# 建立security group rule
openstack security group rulesou create --proto icmp default
openstack security group rule create --proto tcp dst-port 22 default

openstack security group rule list
# 建立instance
openstack server create --flavor m1.tiny --image cirros --nic net-id=PROVIDER_NET_ID --security-group default --key-name mykey instance01
openstack server create --flavor m1.middium --image centos7_x86 --nic net-id=PROVIDER_NET_ID --security-group default --key-name mykey instance02

openstack server list
# 验证
openstack console url show instance01
openstack console url show instance02

cirros / gocubsgo
centos /
# horizon修改实例密码

/etc/openstack-dashboard/local_settings.py
变更
OPENSTACK_HYPERVISOR_FEATURES = {
...
    'can_set_password': False,
}

/etc/nova/nova.conf
[libvirt]添加
inject_password=true

实例默认密码
cirros / gocubsgo
centos /
posted on 2019-11-18 14:59  北京涛子  阅读(476)  评论(0编辑  收藏  举报