I am setting up a Centos 6.3 minimal server with openvz that replicates to another machine using DRBD.
I want all openvz data/files to be kept in a single /vz directory which is an LVM that I am syncing across with DRBD.
I managed to create symlinks so that /etc/vz
points to /vz/etc
and copied all the files there. I also moved /etc/sysconfig/vz-scripts
to /vz/vz-scripts
and put in a symbolic link there. I also made sure to update all the symbolic links withing the folders that I moved to ensure none were broken.
Unfortunately, if I reboot the server and then:
- primary the drbd resource
- mount /dev/drbd01 to /vz
whenever I try to create a virtual machine with vzcreate, I get the following error:
Unable to open /dev/vzctl:
No such file or directory Please check that vzdev kernel module is loaded and you have sufficient permissions to access the file.
The error does not occur if I don't rearrange all the files way from /etc/ to /vz in the first place. I am guessing that these files need to be available/mounted on boot. Is there a way to get the 'kernel module' working after having manually primaried and mounted the drbd resource?