Open main menu

OpenVZ Virtuozzo Containers Wiki β

Editing Migration from Linux-VServer to OpenVZ

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 113: Line 113:
 
=== Updating different configurations  ===
 
=== Updating different configurations  ===
  
Get the existing guest OSs to the right place:
+
Move the existing guest OSs to the right place:
  
 
   # cd /vz
 
   # cd /vz
Line 119: Line 119:
 
   # mkdir private/345
 
   # mkdir private/345
 
   # mv /vservers/v345 /vz/private/345
 
   # mv /vservers/v345 /vz/private/345
In Debian Lenny the path is /var/lib/vz/private/345 instead.
 
In any case it is a good idea to have the guest file system in a dedicated partition or lvm container (shown in the example below) and just mount it there
 
instead of moving:
 
  # mkdir /var/lib/vz/private/345
 
  # mount /dev/mapper/vg01-lvol5 /var/lib/vz/private/345
 
  
 
Now it is time for creating configuration files for OpenVZ container. Use the basic sample
 
Now it is time for creating configuration files for OpenVZ container. Use the basic sample
Line 130: Line 125:
 
   # cd /etc/sysconfig/vz-scripts
 
   # cd /etc/sysconfig/vz-scripts
 
   # cp ve-vps.basic.conf-sample 345.conf
 
   # cp ve-vps.basic.conf-sample 345.conf
In Debian Lenny the configuration is located in /etc/vz/conf/ , in this case type:
 
  # cd /etc/vz/conf
 
  # cp ve-vps.basic.conf-sample  345.conf
 
  
 
Now, let's set some parameters for the new container.
 
Now, let's set some parameters for the new container.
Line 138: Line 130:
 
First, we need to tell which distro the container is running:
 
First, we need to tell which distro the container is running:
 
   # echo "OSTEMPLATE=\"fedora-core-4\"" >> 345.conf
 
   # echo "OSTEMPLATE=\"fedora-core-4\"" >> 345.conf
  # echo "OSTEMPLATE=\"debian\"" >> 345.conf    (for Debian Lenny)
 
  
 
Then we set a few more parameters:
 
Then we set a few more parameters:

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: