Creating a new virtual machine means creating a VM configuration based on a distribution you specified. To create VMs, use the prlctl create
command. For example:
# prlctl create MyVM --distribution centos7 --vmtype vm
This command creates a configuration for a virtual machine MyVM
, adjusts it for running the CentOS 7 guest OS, and places all the required files in the /vz/vmprivate/<UUID>
directory.
Once the virtual machine configuration is ready, you will need to install a supported guest OS in it (e.g., via VNC as described in Section 7.3.1, “Enabling VNC Access to Virtual Machines”).
When choosing a distribution to install, have in mind that OpenVZ supports VM guest initialization via cloud-init, so you can perform some of the initial configuration tasks on stopped virtual machines. To be able to use this feature, you can install a "cloud-enabled" distribution instead of a regular one. For more information, see Section 2.2.1, “Using cloud-init for Virtual Machine Guest Initialization”.