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 === | ||
− | + | 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 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
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 | ||
− | |||
− | |||
− | |||
Now, let's set some parameters for the new container. | Now, let's set some parameters for the new container. | ||
First, we need to tell which distro the container is running: | First, we need to tell which distro the container is running: | ||
− | # echo "OSTEMPLATE= | + | # echo "OSTEMPLATE="fedora-core-4" >> 345.conf |
− | |||
Then we set a few more parameters: | Then we set a few more parameters: | ||
Line 178: | Line 169: | ||
== Issues == | == Issues == | ||
− | |||
− | |||
− | |||
− | |||
=== Networking === | === Networking === | ||
Line 188: | Line 175: | ||
The vserver-originating containers do not initialize network at all. Thus one needs to use following command to enable networking start (inside of the migrated container): | The vserver-originating containers do not initialize network at all. Thus one needs to use following command to enable networking start (inside of the migrated container): | ||
− | + | cd /etc/rcS.d | |
− | + | ln -s ../init.d/networking S40networking | |
==== Migrating your VServer Shorewall setup ==== | ==== Migrating your VServer Shorewall setup ==== | ||
Line 216: | Line 203: | ||
Additionally, Ubuntu based vservers have the udev package installed which prevents access to the console in openvz. This error message is an example of the problem: | Additionally, Ubuntu based vservers have the udev package installed which prevents access to the console in openvz. This error message is an example of the problem: | ||
− | + | <code> | |
− | + | # vzctl enter 101 | |
− | + | enter into CT 101 failed | |
+ | Unable to open pty: No such file or directory | ||
+ | </code> | ||
The fix is to remove the udev package from the guest: | The fix is to remove the udev package from the guest: | ||
− | + | <code> | |
− | + | # vzctl exec 101 'dpkg --force-depends --purge udev' | |
− | + | (Reading database ... dpkg: udev: dependency problems, but removing anyway as you request: | |
− | + | initramfs-tools depends on udev (>= 117-5). | |
− | + | 15227 files and directories currently installed.) | |
− | + | Removing udev ... | |
− | + | Purging configuration files for udev ... | |
− | + | dpkg - warning: while removing udev, directory `/lib/udev/devices/net' not empty so not removed. | |
− | + | dpkg - warning: while removing udev, directory `/lib/udev/devices' not empty so not removed. | |
− | + | </code> | |
Now restart the container, you should now be able to use the console. | Now restart the container, you should now be able to use the console. | ||
+ | <code> | ||
+ | # vzctl restart 101 | ||
+ | Restarting container | ||
+ | ... | ||
+ | <SNIP> | ||
+ | ... | ||
+ | Container start in progress... | ||
− | + | # vzctl enter 101 | |
− | + | entered into CT 101 | |
− | + | root@test:/# | |
− | + | </code> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== /proc === | === /proc === |