IAAS运维的遗漏点

本文记录了OpenStack IAAS运维过程中的一些关键操作,包括使用nova命令重启云主机,查询角色列表,管理Glance镜像,检查计算节点虚拟机状态,监控网络服务,以及数据库和存储的管理。通过这些步骤,有助于理解和掌握OpenStack的日常运维工作。
摘要由CSDN通过智能技术生成

留给自己的提醒

杂七杂八的运维问题

1、在物理云平台查询云主机 IaaS 在 KVM 中的真实实例名,在计算节点使用
virsh 命令找到该实例名对应的 domain-id,使用该 domain-id 重启云主机 IaaS。

我们需要现在controller节点使用nova的命令查看实例的名称。

[root@controller images]# nova show Iaas|grep instance_name
| OS-EXT-SRV-ATTR:instance_name | instance-00000009

注意:如果还是在控制节点使用virsh命令去查找实例信息会报错,因为计算节点才是存放资源的地方。
所以我们在计算节点输入才能正确显示实例的ID。

[root@compute ~]# virsh domid instance-00000009
8

重启云主机IaaS

 [root@compute ~]# virsh reboot 8
 Domain 8 is being rebooted

2、使用openstack相关命令,查询角色列表信息。

openstack role list

3、上传一个镜像,使用glance 相关命令查询glance镜像列表。

glance image-create --name test --disk-format qcow2 --container-format bare --progress < 镜像

glance image-list
±-------------------------------------±----------------+
| ID | Name |
±-------------------------------------±----------------+
| 4120830f-d6de-4e0c-9caa-7a26c86ec7d8 | centos_7-x86_64

3.1如果需要准确的查询一个镜像的详细信息,那就需要使用show+镜像ID去查询了。

[root@controller ~]# glance image-show 4120830f-d6de-4e0c-9caa-7a26c86ec7d8

4、使用nova相关命令查询计算节点虚拟机监控器的状态。

[root@controller ~]# nova hypervisor-show compute
±--------------------------±-----------------------------------------+
| Property | Value |
±--------------------------±-----------------------------------------+
| cpu_info_arch | x86_64 |
| cpu_info_features | [“smap”, “avx”, “clflush”, “sep”, “rtm”, |
| | “vme”, “invpcid”, “msr”, “fsgsbase”, |
| | “xsave”, “pge”, “vmx”, “erms”, “hle”, |
| | “cmov”, “tsc”, “smep”, “pcid”, “pat”, |
| | “lm”, “abm”, “adx”, “3dnowprefetch”, |
| | “nx”, “fxsr”, “syscall”, “sse4.1”, |
| | “pae”, “sse4.2”, “pclmuldq”, “fma”, |
| | “tsc-deadline”, “mmx”, “osxsave”, “cx8”, |
| | “mce”, “de”, “rdtscp”, “ht”, “pse”, |
| | “lahf_lm”, “rdseed”, “popcnt”, “mca”, |
| | “pdpe1gb”, “apic”, “sse”, “f16c”, |
| | “invtsc”, “pni”, “aes”, “avx2”, “sse2”, |
| | “ss”, “hypervisor”, “bmi1”, “bmi2”, |
| | “ssse3”, “fpu”, “cx16”, “pse36”, “mtrr”, |
| | “movbe”, “rdrand”, “x2apic”] |
| cpu_info_model | Broadwell |
| cpu_info_topology_cells | 1 |
| cpu_info_topology_cores | 4 |
| cpu_info_topology_sockets | 2 |
| cpu_info_topology_threads | 1 |
| cpu_info_vendor | Intel |
| current_workload | 0 |
| disk_available_least | 436 |
| free_disk_gb | 384 |
| free_ram_mb | 4125 |
| host_ip | 192.168.100.20 |
| hypervisor_hostname | compute |
| hypervisor_type | QEMU |
| hypervisor_version | 1005003 |
| id | 1 |
| local_gb | 544 |
| local_gb_used | 160 |
| memory_mb | 21021 |
| memory_mb_used | 16896 |
| running_vms | 3 |
| service_disabled_reason | None |
| service_host | compute |
| service_id | 8 |
| state | up |
| status | enabled |
| vcpus | 8 |
| vcpus_used | 8 |
±--------------------------±-----------------------------------------+

5、使用neutron相关命令查询网络服务的列表信息

[root@controller ~]# neutron agent-list
±-------------------------±-------------------±-----------±------------------±------±---------------±--------------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
±-------------------------±-------------------±-----------±------------------±------±---------------±--------------------------+
| 5df5d601-3e0d- | Metadata agent | controller | | 😃 | True | neutron-metadata-agent |
| 45e8-9773-34247000d073 | | | | | | |
| 7b39f6df-640d- | Open vSwitch agent | controller | | 😃 | True | neutron-openvswitch-agent |
| 41b6-8556-30a9818572ef | | | | | | |
| 86bb7ccc-c952-4e3e-be8a- | DHCP agent | controller | nova | 😃 | True | neutron-dhcp-agent |
| 655c113776e7 | | | | | | |
| 871e0847-2a64-4583-b971- | Open vSwitch agent | compute | | 😃 | True | neutron-openvswitch-agent |
| 7c83b31522d2 | | | | | | |
| ab558dec-6cfd-4d01-b7dc- | Metadata agent | compute | | 😃 | True | neutron-metadata-agent |
| eb0c451ca330 | | | | | | |
| b4f62d46-bbc4-4fa1-be78- | L3 agent | controller | nova | 😃 | True | neutron-l3-agent |
| c07b7d650fed | | | | | | |
| c7b5b449-3ffb-4725-956b- | Loadbalancer agent | controller | | 😃 | True | neutron-lbaas-agent |
| 61a38fec68dc | | | | | | |
±-------------------------±-------------------±-----------±------------------±------±---------------±--------------------------+

5.1使用neutron命令,去查看创建的路由。(如果忘了路由的名字就先list再show)

[root@controller ~]# neutron router-list
±-------------------------------------±-----------±---------------------------------------------------±------------±------+
| id | name | external_gateway_info | distributed | ha |
±-------------------------------------±-----------±--------

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值