VM OpenVZ Import

From ISPWiki
Jump to: navigation, search

Supported starting from v.5.58

The “VM import” module serves to import Virtual machines from any remote OpenVZ server, or from another VMmanager OVZ panel.

Requirements

To execute the import you will require root-access to the remote server.

Before importing VM from the remote VMmanager OVZ make sure every node of the remote cluster has a public IP-address in order to allow the remote VMmanager OVZ panel to connect to it via SSH.

if you are importing from the remote VMmanagerOVZ, both panels should be integrated with IP manager by the same way.

Import from a OpenVZ server

It is assumed, that container configuration files are located in /etc/vz/conf/ directory on the remote server.

To start import, connect to the remote OpenVZ server using “Import – Import VM” module.

All the operations with the remote server should be executed via SSH with help of standard OpenVZ utilities.

When connected, the panel receives a list of remote server containers with help of “vzlist” utility and creates a table of server’s VMs. To obtain a list of of virtual machines, click the “VM list” button in the “Import VM” module. In the list choose those VMs, that need to be imported and click the “Start import” button.

In the popped up interface you can choose additional import parameters, i.e. appoint a target user as the imported VM’s owner or change a domain name or IP-address.

In order to complete the import process, the control panel performs the following actions:

  • receives full information about the virtual machine from its configuration file
  • creates a virtual machine with required parameters on the chosen node of the importing VMmanager OVZ
  • stops the virtual machine on the remote server
  • copies the virtual machine configuration file and makes necessary changes
  • copies private space of the virtual machine (simfs files or plop container)
  • starts a new virtual machine if the imported one was started on the remote server
  • informs the panel of finishing the import process

While copying the private space, batch processing saves the information about size of the target files, and displays this information in a prompt-window appearing by pointing a cursor at the import icon in the “ImportVM/VM list” module. As copying and compression of the data are made simultaneously, the calculation of percentage ratio between copied data size and general size is not performed.

After finishing the import process, the virtual machine on the remote server stays switched off.

Import from VMmanager OVZ

Import from VMmanager OVZ panel and import from OpenVZ server haven’t any significant differences. The are some differences listed below:

  • there is an option to import a VM owner when a new owner is selected automatically, or if a user with such a name is not created in VMmanager OVZ, to which import is made
  • there is an option of virtual machine import from any server of the remote VMmanager OVZ cluster.
  • import’s batch processing receives information about a virtual machine from VMmanager OVZ
  • before the import process starts, the target virtual machine stops and locks up by VMmanager OVZ
  • after finishing the import process the virtual machine located on the remote VMmanager OVZ receives status “imported to another server” and its icon appears in the VM list. If the remote VMmanager OVZ is integrated with IPmanager, there will be no deletion of IP-addresses produced. This function is available starting from v. 5.58.

Other features:

If the main IP-address is private and cannot serve to access the receiving server, the VM list will contain the button “connection” which enables to choose a public IP-address of the source server node from the list of available IPs.

If the virtual machine on the source server is switched off and locked up, it will be unlocked, switched on and then locked up again.