OpenStack 安装和使用(三)
# openstack-config –set /etc/nova/nova.conf DEFAULT sql_connection mysql://nova:nova@10.24.1.47/nova 为mysql所在的地址
# openstack-config –set /etc/nova/nova.conf DEFAULT glance_api_servers 10.24.1.47:9292 为glance api节点地址
# openstack-config –set /etc/nova/nova.conf DEFAULT iscsi_ip_prefix 10.24.1.47 为cloud controller节点地址
kvm_amd 40318 0
kvm 305081 1 kvm_amd
# killall dnsmasq; for svc in api objectstore compute network volume scheduler cert console consoleauth direct-api novncproxy xvpvncproxy ; do systemctl restart openstack-nova-$svc.service ; done
# systemctl -a –full –no-page list-units |grep nova
novacomd.service disabled
openstack-nova-api.service enabled
openstack-nova-cert.service enabled
openstack-nova-compute.service enabled
openstack-nova-console.service enabled
openstack-nova-consoleauth.service enabled
openstack-nova-direct-api.service enabled
openstack-nova-metadata-api.service disabled
openstack-nova-network.service enabled
openstack-nova-novncproxy.service enabled
openstack-nova-objectstore.service enabled
openstack-nova-scheduler.service enabled
openstack-nova-volume.service enabled
# nova-manage version list
+—-+———–+———–+——+———–+——+——-+————-+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
+—-+———–+———–+——+———–+——+——-+————-+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 |
| 2 | m1.small | 2048 | 10 | 20 | | 1 | 1.0 |
| 3 | m1.medium | 4096 | 10 | 40 | | 2 | 1.0 |
| 4 | m1.large | 8192 | 10 | 80 | | 4 | 1.0 |
| 5 | m1.xlarge | 16384 | 10 | 160 | | 8 | 1.0 |
+—-+———–+———–+——+———–+——+——-+————-+
nova-console cc nova enabled 🙂 2012-07-07 03:28:43
nova-consoleauth cc nova enabled 🙂 2012-07-07 03:28:42
nova-compute cc nova enabled 🙂 2012-07-07 03:28:39
nova-scheduler cc nova enabled 🙂 2012-07-07 03:28:43
nova-cert cc nova enabled 🙂 2012-07-07 03:28:43
nova-network cc nova enabled 🙂 2012-07-07 03:28:36
nova-volume cc nova enabled 🙂 2012-07-07 03:28:41
| ID | Name | Status | Server |
+————————————–+——————-+——–+——–+
| 2eb1ed9e-b1f2-450a-8ce2-810580d09610 | tty-linux-kernel | ACTIVE | |
| e36a1d2d-7ae1-4496-b25c-3ee4be0a14d8 | tty-linux-ramdisk | ACTIVE | |
| e951ba9a-a5f1-40fb-916a-56fc2aeee429 | tty-linux | ACTIVE | |
+————————————–+——————-+——–+——–+
# getenforce
Permissive
# openstack-config –set /etc/nova/nova.conf DEFAULT force_dhcp_release False
openstack-nova-metadata-api.service loaded active running OpenStack Nova Metadata API Server
openstack-nova-network.service loaded active running OpenStack Nova Network Server
export OS_USERNAME=admin
export OS_PASSWORD=123456
export OS_TENANT_NAME=hanborq
export OS_AUTH_URL=http://10.24.1.47:5000/v2.0/
ID Name Disk Format Container Format Size
———————————— —————————— ——————– ——————– ————–
3e00b8a0-5159-4f60-b757-f00273d65c37 f16-jeos qcow2 bare 213581824
e951ba9a-a5f1-40fb-916a-56fc2aeee429 tty-linux ami ami 25165824
e36a1d2d-7ae1-4496-b25c-3ee4be0a14d8 tty-linux-ramdisk ari ari 96629
2eb1ed9e-b1f2-450a-8ce2-810580d09610 tty-linux-kernel aki aki 4404752
+————————————–+———————+——–+——–+
| ID | Name | Status | Server |
+————————————–+———————+——–+——–+
| 3e00b8a0-5159-4f60-b757-f00273d65c37 | f16-jeos | ACTIVE | |
| 2eb1ed9e-b1f2-450a-8ce2-810580d09610 | tty-linux-kernel | ACTIVE | |
| e36a1d2d-7ae1-4496-b25c-3ee4be0a14d8 | tty-linux-ramdisk | ACTIVE | |
| e951ba9a-a5f1-40fb-916a-56fc2aeee429 | tty-linux | ACTIVE | |
+————————————–+———————+——–+——–+
+———+————-+
| Name | Description |
+———+————-+
| default | default |
+———+————-+
+————-+———–+———+———–+————–+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+————-+———–+———+———–+————–+
| tcp | 22 | 22 | 0.0.0.0/0 | |
+————-+———–+———+———–+————–+
+————-+———–+———+———–+————–+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+————-+———–+———+———–+————–+
| icmp | -1 | -1 | 0.0.0.0/0 | |
+————-+———–+———+———–+————–+
+————-+———–+———+———–+————–+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+————-+———–+———+———–+————–+
| icmp | -1 | -1 | 0.0.0.0/0 | |
| tcp | 22 | 22 | 0.0.0.0/0 | |
+————-+———–+———+———–+————–+
| Name | Fingerprint |
+———+————————————————-+
| f16jeos | b1:e0:7c:1d:f8:54:63:fd:dd:4b:b2:4b:ff:6b:52:17 |
+———+————————————————-+
+—-+———–+———–+——+———–+——+——-+————-+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
+—-+———–+———–+——+———–+——+——-+————-+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 |
| 2 | m1.small | 2048 | 10 | 20 | | 1 | 1.0 |
| 3 | m1.medium | 4096 | 10 | 40 | | 2 | 1.0 |
| 4 | m1.large | 8192 | 10 | 80 | | 4 | 1.0 |
| 5 | m1.xlarge | 16384 | 10 | 160 | | 8 | 1.0 |
+—-+———–+———–+——+———–+——+——-+————-+
| Property | Value |
+————————————-+————————————–+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | None |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| OS-EXT-SRV-ATTR:instance_name | instance-00000001 |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | v8faNaee8XNv |
| config_drive | |
| created | 2012-07-16T10:19:28Z |
| flavor | m1.small |
| hostId | |
| id | cb3f608d-317b-4088-9a0a-53fdfc4edf80 |
| image | f16-jeos |
| key_name | f16jeos |
| metadata | {} |
| name | f16jeos_vm |
| progress | 0 |
| status | BUILD |
| tenant_id | 94d38db32a7d4107beeed36d9e98bf06 |
| updated | 2012-07-16T10:19:28Z |
| user_id | cd5e2e764fc7420dad016f9af7be7123 |
+————————————-+————————————–+
| ID | Name | Status | Networks |
+————————————–+————+——–+——————-+
| cb3f608d-317b-4088-9a0a-53fdfc4edf80 | f16jeos_vm | ACTIVE | hanborq=10.25.1.2 |
+————————————–+————+——–+——————-+
| Property | Value |
+————————————-+———————————————————-+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | compute1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| OS-EXT-SRV-ATTR:instance_name | instance-00000011 |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2012-07-18T08:05:22Z |
| flavor | m1.small |
| hanborq network | 10.25.1.4 |
| hostId | ba210c21c18c8c89c1848c6fb140ac5936c5d539ea17737a2921b7e2 |
| id | 81decfae-c4dd-41c7-83dd-7bc8f03fd897 |
| image | f16-jeos |
| key_name | f16jeos |
| metadata | {} |
| name | f16jeos_vm_1 |
| progress | 0 |
| status | ACTIVE |
| tenant_id | 94d38db32a7d4107beeed36d9e98bf06 |
| updated | 2012-07-18T08:05:37Z |
| user_id | cd5e2e764fc7420dad016f9af7be7123 |
+————————————-+———————————————————-+
Id Name State
—————————————————-
1 instance-00000001 running
em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.24.1.47 netmask 255.255.255.0 broadcast 10.24.1.255
inet6 fe80::222:19ff:fe5d:4847 prefixlen 64 scopeid 0x20<link>
ether 00:22:19:5d:48:47 txqueuelen 1000 (Ethernet)
RX packets 329574 bytes 417245559 (397.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 194639 bytes 17563292 (16.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 37 memory 0xec000000-ec012800
em2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::222:19ff:fe5d:4849 prefixlen 64 scopeid 0x20<link>
ether 00:22:19:5d:48:49 txqueuelen 1000 (Ethernet)
RX packets 30338 bytes 2746833 (2.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 37 bytes 5733 (5.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 37 memory 0xea000000-ea012800
hanborqbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.25.1.3 netmask 255.255.255.0 broadcast 10.25.1.255
inet6 fe80::4a9:54ff:fef2:82ca prefixlen 64 scopeid 0x20<link>
ether 00:22:19:5d:48:49 txqueuelen 0 (Ethernet)
RX packets 466 bytes 38146 (37.2 KiB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 169 bytes 19322 (18.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 37409 bytes 459580998 (438.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 37409 bytes 459580998 (438.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 1a:bc:b0:89:bd:7f txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fc16:3eff:fe77:8918 prefixlen 64 scopeid 0x20<link>
ether fe:16:3e:77:89:18 txqueuelen 500 (Ethernet)
RX packets 148 bytes 14938 (14.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 359 bytes 35029 (34.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0