Store OpenVZ-Containers on a NFS-Share

MasterTH

Renowned Member
Jun 12, 2009
224
7
83
www.sonog.de
Hi,

i was wondering that it is possible to mount a nfs share and put some kvm-maschines inside, but not openvz-Containers?

is there any workaround?

Thanks
 
You sure can. Just add the NFS shares to your Proxmox in the storage settings.
 
I have both local and nfs shares, but I am bit confused.
If I do a live migration sometimes I get errors such as:
Error: _rst_get_object: wrong object type: 1030 (expected: 1045)
Error: rst_open_file: failed to lookup path '/tmp/.nfs000000000038000400000109': -2
ERROR: online migrate failure - Failed to restore container: Can't umount
/var/lib/vz/root/101: Device or resource busy

I do not understand why, my container was created in the NFS share, why am I getting error messages regarding local disk.
I looked closer and it seems that root is in the local disk and private is in the nfs share.
I do not even want to use the local disk.

I tried removing the settings from storage.cfg, but it always shows in the gui and the issue did not go away.

How do I remove the local disk share completely. I only really need the NFS share.

My setup is at the latest releases.

BTW, it does migrate regardless of the errors and then starts, but I have a copy of the VM in root in .var.lib.vz and the same amount of storage in private in NFS share.
 
Last edited:
ON another note, today it is behaving differently. After the failure the ct moves back to source node and starts again automatically.
To get it to work I have to remove the ct from the HA, then stop it and then do an offline migration.

Meaning I can not live migrate.
 
Any work around posted somewhere.
Can I remove local disk completely to eliminate the issue.

Thanks for quick reply.
 
I modified the ROOT line in the ct conf files topoint to the NFS share with the same strcuture and it is working now .
My concern is that if I create a CT on the NFS share which has 10 terabytes, then the system gets filled also does not have that much space.

I guess if I have to to modify the conf file and point to the NFS share after the fact I can live with that and then I can remove the folder from /var/lib/vz/root which is taking uneeded space.

Thanks
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!