---
title: "Proxmox VE LXC容器显示宿主CPU负载修复"
id: "397"
type: "post"
slug: "proxmox-ve-lxc%e5%ae%b9%e5%99%a8%e6%98%be%e7%a4%ba%e5%ae%bf%e4%b8%bbcpu%e8%b4%9f%e8%bd%bd%e4%bf%ae%e5%a4%8d"
published_at: "2023-06-20T05:28:08+00:00"
modified_at: "2023-06-20T05:28:08+00:00"
url: "https://www.hitsword.org/2023/397.html"
markdown_url: "https://www.hitsword.org/2023/397.md"
excerpt: "PVE 的LXC容器默认是显示宿主CPU负载的,不想让容器看到宿主机的CPU负载的话，要给lxcfs服务加参数"
taxonomy_category:
  - "Proxmox"
taxonomy_post_tag:
  - "Proxmox"
---

# Proxmox VE LXC容器显示宿主CPU负载修复

PVE 的LXC容器默认是显示宿主CPU负载的,不想让容器看到宿主机的CPU负载的话，要给lxcfs服务加参数

```
nano /lib/systemd/system/lxcfs.service
#给/usr/bin/lxcfs加个-l参数
ExecStart=/usr/bin/lxcfs -l /var/lib/lxcfs/
#然后重启服务
systemctl daemon-reload
service lxcfs restart
```
