이전에 Hostd 관련 verbose 로그 대량 기록 건과 관련하여 다음 Article을 통해 다뤄본 적이 있습니다.
Too many verbose logs on hostd log file
https://haewon83.tistory.com/46
개별 서비스들의 Configuration 정보가 기존 XML에서 Config Store Database로 옮겨가면서, hostd의 경우에는 어떻게 Configuration 정보를 추출했는지를 알 수 있었는데요.
마찬가지로 여러 다른 서비스들(vpxd, vpxa, firewall 등)에 대해서도 Config Store Database를 통해서 조회를 할 필요성이 있을 수 있습니다.
이러한 경우에 우선 Component / Group / Key 를 이해해야 합니다.
hostd configuration 정보 조회 시에 사용했던 아래 명령어를 예로 들어보겠습니다.
# /bin/configstorecli config current get -c esx -g services -k hostd -outfile tmp.json
/bin/configstorecli 도구를 이용하여, Component는 esx, Group은 services, Key는 hostd로 구분할 수 있습니다.
이렇게 계층 구조로 이루어져 있기 때문에 내가 조회하고자 하는 서비스가 어떤 Component에 어떤 Group에 속해있는지를 우선 파악해야 Configuration 정보를 조회할 수 있습니다.
이 Component / Group / Key 정보는 Config Store Database의 Schema로 관리됩니다.
이 Schema를 확인하기 위해서 ESXi 서버에서 아래 명령어를 이용할 수 있습니다.
# configstorecli schema list
{
"clusterstore": {
"cluster_agent": [
"agent_settings"
]
},
"esx": {
"assignhw": [
"overrides"
],
"attestation": [
"esx_base_images",
"tpm2_ca_certificates",
"tpm2_endorsement_keys",
"tpm2_settings",
"certificate"
],
"authentication": [
"client_profiles",
"trust_security_token_issuers",
"user_accounts",
"esx_token_config"
],
"authorization": [
"lockdown_settings",
"permissions",
"roles",
"system_users",
"dcui_access"
],
"files": [
"etc_chkconfig_db",
"vmware_lic",
"log_filters",
"security_access_conf",
"etc_passwd",
"schema_store",
"etc_hosts",
"backup_counter",
"crontabs_root",
"rhttpproxy_endpoints_conf",
"ssh_host_ed25519_key",
"sshd_config",
"data_file_store_backup",
"dh_client6_vmk0_conf",
"dh_client6_vmk0_leases",
"dh_client_vmk0_leases",
"ntp_conf",
"dvsdata_DB",
"emu_mili_save_stp_txt",
"emu_mili_save_tgt_txt",
"krb5_keytab",
"local_sh",
"envoy_config_yaml",
"sfcb_cim_ind_handler_xml",
"esx_conf",
"esxtoken_config",
"etc_group",
"etc_host_conf",
"dh_client_vmk0_conf",
"etc_issue",
"etc_motd",
"snmp_boots",
"etc_nscd_conf",
"etc_profile_local",
"etc_resolv_conf",
"etc_shadow",
"healthd_config",
"hostd_authorization_xml",
"hostd_dvport_groups_xml_gz",
"hostd_host_profile_engine_xml",
"hostd_hostsvc_xml",
"hostd_ipmi_sel_date_bin",
"hostd_npivwwn_xml",
"hostd_opaque_nw_xml_gz",
"hostd_passwd_maxdays",
"sfcb_cim_ind_filter_idx",
"sfcb_cim_ind_filter",
"security_dcui_access_conf",
"hostd_config_xml",
"hostd_tpm_aik",
"hostd_vm_inventory_xml",
"hostd_vmci_access_manager_xml",
"inetd_conf",
"key_persistence_state",
"kmxa_config",
"kmxd_config",
"krb5_affinity_conf",
"krb5_conf",
"license_cfg",
"sfcb_cim_listener_dest_xml",
"ntp_drift",
"ntp_keys",
"open_wsman_subscriptions",
"locker_conf",
"ssh_host_rsa_public_key",
"pam_passwd",
"pam_sys_auth_tally",
"passthru_map",
"ptp_conf",
"vmware_settings",
"ptp_drift",
"IO_filtervpd_conf",
"random_seed",
"registry_DB",
"rhttpproxy_config_xml",
"ssl_rui_key",
"ssh_host_ed25519_public_key",
"security_opasswd",
"sfcb_cim_ind_handler_xml_idx",
"sfcb_cim_ind_subcription_idx",
"attestd_config",
"sfcb_cim_ind_subscription",
"sfcb_cim_listener_dest_xml_idx",
"sfcb_omc_sensor_health",
"sfcb_qualifier_idx",
"sfcb_qualifiers",
"ssh_config",
"ssh_host_ecdsa_key",
"ssh_host_ecdsa_public_key",
"ssh_host_rsa_key",
"hostd_probe_config_xml",
"vpxa_cfg",
"ssh_root_auth_key",
"ssl_rui_crt",
"hostd_pools_xml",
"system_users_cfg",
"vmfstraced",
"vmk_iscsid_db",
"vmware_config",
"vmware_configrules",
"authentication_conf",
"ssl_IO_filtervp_castore_pem",
"vmware_tools_conf",
"vvol_cfg",
"vvol_traced",
"hostd_vm_auto_start_xml",
"ssl_ca_store",
"security_ssh_limits_conf",
"syslog_dpd",
"emu_mili_intr_log_opts_txt",
"sandboxd_config_xml",
"tech_preview_cfg",
"lockdown_conf",
"gstored_config_xml",
"hostd_hbrsvc_xml",
"gdpd_config_xml",
"current_store_backup"
],
"graphics": [
"policy",
"devices"
],
"hardware": [
"pci_devices",
"usb_passthrough_switch"
],
"identity": [
"active_directory",
"auth_proxy_certificate",
"smart_card_authentication"
],
"kms": [
"providers"
],
"maintenance": [
"partial_maintenance_modes"
],
"network": [
"firewall",
"vmknics",
"vm_vif_state",
"etc_hosts",
"firewall_rule_sets",
"host_state",
"ip_security_associations",
"ip_security_policies",
"net_stacks",
"nics",
"network_system"
],
"network_vds": [
"port_groups",
"switches"
],
"network_vss": [
"switches"
],
"security": [
"settings"
],
"services": [
"vpxa",
"hostd",
"hostd_probe",
"vpxa_solution_user_config",
"esx_tokend"
],
"storage": [
"psa_vaai_claim_rules",
"nfs_v3_datastores",
"nmp_claim_rules",
"spbm_datastores",
"satp_default_psps",
"device_groups",
"boot_device",
"spbm_policies",
"block_devices",
"devices_access",
"nfs_krb_credentials",
"nfs_v41_datastores",
"paths",
"psa_filter_claim_rules",
"psa_mpp_claim_rules",
"vmfs_datastores",
"device_uid_maps"
],
"storage_fcoe": [
"fcoe_activation_driver_policies",
"fcoe_activation_nic_policies"
],
"storage_iscsi": [
"software_adapter",
"hardware_adapters"
],
"storage_iser": [
"iser_adapters"
],
"storage_nvmeof": [
"nvme_over_fabrics_adapters",
"nvme_connections"
],
"storage_vasa": [
"vvol"
],
"syslog": [
"logger_settings",
"audit_record_settings",
"global_settings",
"logfilters"
],
"system": [
"guest_store",
"CBRC",
"vmware_software_devices",
"device_data",
"installer",
"welcome_message",
"hostcaches",
"product_locker",
"keyboard",
"guest_components",
"core_dump_file",
"upid_alias_map",
"wbem",
"netdump",
"snmp",
"system_swap",
"core_dump_partition",
"petronas",
"quick_boot_data",
"software_devices",
"system_time"
],
"trusted_infrastructure": [
"attestation_services",
"kms_providers",
"host_encryption_key",
"kms_services"
],
"vmkernel": [
"module_settings",
"options",
"reboot_reason"
]
},
"esx_update": {
"software": [
"acceptance_level"
]
},
"vsan": {
"files": [
"vsan_svc",
"vsan_fs_end_point",
"kms_client_cert_old",
"kms_client_key",
"kms_client_cert",
"vsan_traced",
"kms_castore",
"kms_castore_old",
"ilo_conf",
"kms_client_key_old",
"vp_castore",
"vsan_mgmt_conf",
"vsan_perf"
],
"system": [
"vsan_witness",
"server_clusters",
"host_state",
"vsan",
"remote_datastores",
"host_config",
"hardware_mgmt",
"vsan_options"
]
}
}
|
위 내용을 대략적으로 정리해보면,
Component는 clusterstore, esx, esx_update, vsan으로 구분되고,
Group의 경우 Compoent가 esx라면, assignhw, attestation, authentication, authorization, files, graphics, hardware, identity, kms, maintenance, network, network_vds, network_vss, security, storage, storage_fcoe, storage_iscsi, storage_iser, storage_nvmeof, storage_vasa, syslog, system, trusted_infrastructure, vmkernel로 구분할 수 있습니다.
이 중에서 예제로 network Group에 있는 firewall에 대해서 조회를 해보도록 하겠습니다.
"network": [
"firewall",
"vmknics",
"vm_vif_state",
"etc_hosts",
"firewall_rule_sets",
"host_state",
"ip_security_associations",
"ip_security_policies",
"net_stacks",
"nics",
"network_system"
],
|
다음 결과와 같이 firewall과 firewall_rule_sets Key를 이용하여 조회가 가능합니다.
# /bin/configstorecli config current get -c esx -g network -k firewall { "allow_IGMP_traffic": false, "allow_other_l4_traffic": false, "default_action": "DROP", "enabled": true } # /bin/configstorecli config current get -c esx -g network -k firewall_rule_sets [ { "enabled": true, "name": "CIMHttpServer", "num_clients": 0 }, { "enabled": true, "name": "CIMHttpsServer", "num_clients": 0 }, { "enabled": false, "name": "esxupdate", "num_clients": 0 }, { "enabled": true, "name": "fdm" }, { "enabled": true, "name": "iSCSI" }, { "enabled": true, "name": "iofiltervp" }, { "enabled": true, "name": "syslog" }, { "allow_all_ip": false, "enabled": true, "name": "trusted-infrastructure-kmxa" }, { "enabled": true, "name": "vpxHeartbeats", "num_clients": 0 } ] |
7.0 Update2부터는 서비스들의 Configuration 정보를 Config Store Database로 변경했기 때문에 해당 버전부터는 configstorecli를 통해서 조회해야 하는 점을 주의해야 합니다.
'Compute' 카테고리의 다른 글
Panic requested by another PCPU (0) | 2023.03.26 |
---|---|
Necessary logs in case of system or vm hang (0) | 2023.03.16 |
FDM Overview (0) | 2023.02.26 |
VCHA (1) - Architecture (0) | 2023.02.12 |
How Importing OVF Works (0) | 2023.02.03 |