Using different storages in OpenVZ

alexpacio

Member
Dec 5, 2009
35
0
6
Hi,
I migrated my virtualization environment (vSphere) to Proxmox and I discovered the power and the capabilities of OpenVZ. So i uploaded a Centos template and i excuted it. It works perfectly (even if the log displays some errors in startup) but i have to do a thing: i have to move the openvz container in a different disk (by default, it goes to "local"). Can i do this and how?

Thanks
 
Hi,
I migrated my virtualization environment (vSphere) to Proxmox and I discovered the power and the capabilities of OpenVZ. So i uploaded a Centos template and i excuted it. It works perfectly (even if the log displays some errors in startup) but i have to do a thing: i have to move the openvz container in a different disk (by default, it goes to "local"). Can i do this and how?

Thanks

openvz supports only one local storage.

maybe this helps if you run out of space:
http://wiki.openvz.org/Bind_mounts
 
Doesn't openvz use a filesystem to store vm data ? If that's the case you could symlink the openvz dir to a dir on your new disk...
 
Trying to do

ln -s /iso/vz /var/lib/vz

since

/iso

is result of

echo "/dev/sdc1 /iso xfs defaults 0 1" >> /etc/fstab
mount /iso

however it outputs

failed to remove `/var/lib/vz': Device or resource busy

when I do

rmdir /var/lib/vz
 
Last edited:
So instead I do

rmdir /var/lib/vz/template/cache
mkdir /iso/vztcache
ln -s /iso/vztcache /var/lib/template/cache