标签:nova
计算节点 跑虚拟机
[root@hequan ~]# yum install openstack-nova.noarch openstack-nova-api.noarch openstack-nova-conductor.noarch openstack-nova-novncproxy.noarch openstack-nova-scheduler.noarch openstack-nova-console.noarch ##控制节点 [root@hequan ~]# yum install openstack-nova-compute.noarch ##计算节点 keystone user-create --name nova --pass hequan keystone user-role-add --user nova --role admin --tenant services keystone service-create --name nova --type compute --description nova | 7708b5c40aec4cf3b59d6d84596a5f6b | nova | compute | Openstack Compute Service | | 017bdbf9f335436cbd7f65fe74089b28 | nova_ec2 | ec2 | EC2 Service | | 4f7b60427d304fd89658f4f8c23dd708 | novav3 | computev3 | Openstack Compute Service v3 | +----------------------------------+-----------+-------------------------------------------------+-------------------------------------------------+--------------------------------------------+----------------------------------+ | id | region | publicurl | internalurl | adminurl | service_id | +----------------------------------+-----------+-------------------------------------------------+-------------------------------------------------+--------------------------------------------+----------------------------------+ | 0bda7145ebc944a99112c53e97362fa1 | RegionOne | http://115.29.107.17:8774/v2/%(tenant_id)s | http://115.29.107.17:8774/v2/%(tenant_id)s | http://115.29.107.17:8774/v2/%(tenant_id)s | 7708b5c40aec4cf3b59d6d84596a5f6b | | 731be711c3be4497b57c8751ce111986 | RegionOne | http://115.29.107.17:8773/services/Cloud | http://115.29.107.17:8773/services/Cloud | http://115.29.107.17:8773/services/Admin | 017bdbf9f335436cbd7f65fe74089b28 | | 7ec9cb12959f4bedb7e0757c79b636fd | RegionOne | http://127.0.0.1:8774/v3 | http://127.0.0.1:8774/v3 | http://127.0.0.1:8774/v3 | 4f7b60427d304fd89658f4f8c23dd708 | keystone endpoint-create --service-id --publicul ‘‘ --internalurl ‘‘ --adminurl ‘‘ openstack-db --init --service nova --password hequan --root 123456 [root@hequan ~]# ls -ld /var/log/nova/ drwxr-x--- 2 nova root 4096 7月 23 00:08 /var/log/nova/ [root@hequan ~]# chown nova.nova /var/log/nova/ -R [root@hequan nova(keystone_admin)]# mv nova.conf nova.conf.bak [root@hequan nova(keystone_admin)]# systemctl list-unit-files | grep nova openstack-nova-api.service enabled openstack-nova-cert.service enabled openstack-nova-compute.service enabled openstack-nova-conductor.service enabled openstack-nova-console.service disabled openstack-nova-consoleauth.service enabled openstack-nova-metadata-api.service disabled openstack-nova-novncproxy.service enabled openstack-nova-scheduler.service enabled openstack-nova-xvpvncproxy.service disabled vncserver_proxyclient_address=115.29.107.17 ##改成本机的IP
vim nova.conf
[DEFAULT] internal_service_availability_zone=internal default_availability_zone=nova novncproxy_host=0.0.0.0 novncproxy_port=6080 notify_api_faults=False state_path=/var/lib/nova report_interval=10 enabled_apis=ec2,osapi_compute,metadata ec2_listen=0.0.0.0 ec2_listen_port=8773 ec2_workers=1 osapi_compute_listen=0.0.0.0 osapi_compute_listen_port=8774 osapi_compute_workers=1 metadata_listen=0.0.0.0 metadata_listen_port=8775 metadata_workers=1 compute_manager=nova.compute.manager.ComputeManager service_down_time=60 rootwrap_config=/etc/nova/rootwrap.conf volume_api_class=nova.volume.cinder.API auth_strategy=keystone use_forwarded_for=False heal_instance_info_cache_interval=60 reserved_host_memory_mb=512 cpu_allocation_ratio=16.0 ram_allocation_ratio=1.5 network_api_class=nova.network.neutronv2.api.API default_floating_pool=public force_snat_range =0.0.0.0/0 metadata_host=115.29.107.17 dhcp_domain=novalocal security_group_api=neutron scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler compute_driver=libvirt.LibvirtDriver vif_plugging_is_fatal=True ## 修改False 如果有报错 实例执行请求失败 vif_plugging_timeout=300 ## 修改为0 firewall_driver=nova.virt.firewall.NoopFirewallDriver force_raw_images=True debug=False verbose=True log_dir=/var/log/nova use_syslog=False syslog_log_facility=LOG_USER use_stderr=True notification_topics=notifications rpc_backend=rabbit amqp_durable_queues=False sql_connection=mysql://nova:hequan@115.29.107.17/nova image_service=nova.image.glance.GlanceImageService lock_path=/var/lib/nova/tmp osapi_volume_listen=0.0.0.0 vncserver_proxyclient_address=115.29.107.17 ##修改本机地址 vnc_keymap=en-us vnc_enabled=True vncserver_listen=0.0.0.0 novncproxy_base_url=http://115.29.107.17:6080/vnc_auto.html [api_database] [barbican] [cells] [cinder] catalog_info=volumev2:cinderv2:publicURL [conductor] [cors] [cors.subdomain] [database] [ephemeral_storage_encryption] [glance] api_servers=115.29.107.17:9292 [guestfs] [hyperv] [image_file_url] [ironic] [keymgr] [keystone_authtoken] auth_uri=http://115.29.107.17:5000/v2.0 identity_uri=http://115.29.107.17:35357 admin_user=nova admin_password=hequan admin_tenant_name=services [libvirt] virt_type=qemu inject_password=False inject_key=False inject_partition=-1 live_migration_uri=qemu+tcp://nova@%s/system cpu_mode=none vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver [matchmaker_redis] [matchmaker_ring] [metrics] [neutron] service_metadata_proxy=True metadata_proxy_shared_secret =hequan url=http://115.29.107.17:9696 admin_username=neutron admin_password=hequan admin_tenant_name=services region_name=RegionOne admin_auth_url=http://115.29.107.17:5000/v2.0 auth_strategy=keystone ovs_bridge=br-int extension_sync_interval=600 timeout=30 default_tenant_id=default [osapi_v21] [oslo_concurrency] [oslo_messaging_amqp] [oslo_messaging_qpid] [oslo_messaging_rabbit] kombu_reconnect_delay=1.0 rabbit_host=115.29.107.17 rabbit_port=5672 rabbit_hosts=115.29.107.17:5672 rabbit_use_ssl=False rabbit_userid=guest rabbit_password=guest rabbit_virtual_host=/ rabbit_ha_queues=False heartbeat_timeout_threshold=0 heartbeat_rate=2 [oslo_middleware] [rdp] [serial_console] [spice] [ssl] [trusted_computing] [upgrade_levels] [vmware] [vnc] [workarounds] [xenserver] [zookeeper] [osapi_v3] enabled=False
[root@hequan ~]# nova-manage service list [root@hequan ~(keystone_admin)]# nova host-list +---------------+-------------+----------+ | host_name | service | zone | +---------------+-------------+----------+ | hequan.lol | consoleauth | internal | | hequan.lol | scheduler | internal | | hequan.lol | conductor | internal | | hequan.lol | compute | nova | | hequan.lol | cert | internal | [root@hequan ~]# systemctl is-active libvirtd.service active
本文出自 “何全” 博客,请务必保留此出处http://hequan.blog.51cto.com/5701886/1832697
标签:nova
原文地址:http://hequan.blog.51cto.com/5701886/1832697