Troubleshooting Guide: Fixing LXC Creation Errors on Proxmox (OVH Single-Node)
Symptoms
When attempting to create an LXC container using Proxmox Community Scripts (Helper-Scripts) on a single-node OVH server, the process fails with the following errors:
- [ERROR] /etc/pve/storage.cfg does not exist.
- exit code 213 (Proxmox: Storage type does not support 'rootdir' content)
- Error: Corosync config '/etc/pve/corosync.conf' does not exist (Note: This is a harmless warning on single-node setups).
Root Cause
This issue usually stems from two interconnected problems:
1. The pve-cluster service (pmxcfs) is hanging or failing to start, causing the /etc/pve/ virtual filesystem to unmount entirely. This is notoriously caused by a misconfigured /etc/hosts file (very common in default OVH templates).
2. The /etc/pve/storage.cfg file is physically missing. Without this file, the helper script cannot verify if the target storage supports rootdir (which is strictly required to store LXC container filesystems).
Step-by-Step Solution
Step 1: Fix the Hostname Resolution (/etc/hosts)
Proxmox strictly requires the server's hostname to resolve to its external IP address, not the local loopback address (127.0.1.1).
- Check your exact hostname:
bash hostname - Edit the
/etc/hostsfile:
bash nano /etc/hosts - Ensure your public IP is correctly mapped to your hostname. Remove or comment out any lines mapping your hostname to
127.0.1.1. It should look like this:
text 127.0.0.1 localhost <YOUR_PUBLIC_IP> <YOUR_HOSTNAME>
(Example:198.51.100.25 pve-ovh-1)
Step 2: Restart the Proxmox Cluster Filesystem
Apply the network configuration changes by restarting the core Proxmox services:
systemctl restart pve-cluster
systemctl restart pvedaemon pveproxy
Verify that the service is running correctly and correctly resolves the IP:
systemctl status pve-cluster
Step 3: Recreate storage.cfg (If missing)
Check if the file exists by running ls -l /etc/pve/. If the file is still missing, you must manually recreate the default local storage configuration.
Run the following command to generate the correct configuration. (Note: This uses modern Proxmox syntax, omitting deprecated parameters like maxfiles):
cat << 'EOF' > /etc/pve/storage.cfg
dir: local
path /var/lib/vz
content iso,vztmpl,backup,rootdir,images
shared 0
EOF
Why this works: The rootdir flag inside the content directive is exactly what the LXC creation script searches for to validate the storage.
Step 4: Rerun the LXC Script
With the cluster filesystem successfully running and the storage.cfg accurately defining rootdir support, you can now safely re-run the Proxmox Community Script. The container creation will proceed without errors.