我有一些 Proxmox 节点,昨天,我将它们全部升级到 3.4-11。今天我发现其中一个节点在 Proxmox UI 中没有正确显示 OpenVZ 节点。然后我做了一些调查,发现这个缺失的信息来自 Proxmox API /cluster/resources。然后我尝试从有问题的节点运行 pvesh get /cluster/resources ,我得到:
# pvesh get /cluster/resources
200 OK
[
{
"id" : "openvz/127",
"node" : "pve",
"type" : "openvz",
"vmid" : 127
},
{
"id" : "openvz/118",
"node" : "pve",
"type" : "openvz",
"vmid" : 118
},
{
"id" : "openvz/206",
"node" : "pve",
"type" : "openvz",
"vmid" : 206
},
...
]
然后我转到一个普通节点并运行相同的命令,我得到了:
# pvesh get /cluster/resources
200 OK
[
{
"cpu" : 0.000220895604811133,
"disk" : 774914048,
"diskread" : 0,
"diskwrite" : 0,
"id" : "openvz/124",
"maxcpu" : 1,
"maxdisk" : 5368709120,
"maxmem" : 268435456,
"mem" : 42786816,
"name" : "hostname1",
"netin" : 237953,
"netout" : 153381,
"node" : "fr000",
"status" : "running",
"template" : 0,
"type" : "openvz",
"uptime" : 3809,
"vmid" : 124
},
{
"cpu" : 0.000220895608544508,
"disk" : 2063126528,
"diskread" : 0,
"diskwrite" : 0,
"id" : "openvz/122",
"maxcpu" : 2,
"maxdisk" : 42949672960,
"maxmem" : 2147483648,
"mem" : 634228736,
"name" : "hostname2",
"netin" : 34106,
"netout" : 33882,
"node" : "fr000",
"status" : "running",
"template" : 0,
"type" : "openvz",
"uptime" : 3827,
"vmid" : 122
},
...
]
显然,相关节点没有返回有关 OpenVZ 容器的足够信息。
答案1
通过从 /etc/pve/nodes/pve/openvz/130.conf 中的 HOSTNAME 值中删除下划线解决了问题。