0

I created a Virtualbox VM for Virtuozzo OpenVZ 7 using this image: https://download.openvz.org/virtuozzo/releases/openvz-7.0.9-439/x86_64/iso/openvz-iso-7.0.9-439.iso

I want to create a Vagrant box out of that image. Therefore I need to create a user "vagrant", which should be allowed full access to all prlctl commands.

Unfortunately, even if I create a non-root user with full admin permissions during OpenVZ installation, the user still does not have access and always gets permission errors - especially on "prlctl create".

Example output:

[vagrant2@localhost ~]$ prlctl create MyCT5 --vmtype ct
Creating the Container...
Failed to register the CT: The folder /vz/private/cb0e0763-6130-4e00-8e99-67c3c2f628a6/.brand cannot be created. You are not allowed to create folders in this location. Choose another location or contact the Virtuozzo administrator.
Failed to create the virtual machine.
[vagrant2@localhost ~]$

How can I give my vagrant-user full permissions to all prlctl commands?

1 Answers1

0

As it seems it just does not make sense to run openvz7 as non-root, since it needs root permissions for various tasks. So I'll instead run all commands with vagrant-user+sudo and restrict sudo access to prlctl commands only.