<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mhammett</id>
	<title>OpenVZ Virtuozzo Containers Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mhammett"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Mhammett"/>
	<updated>2026-05-15T15:02:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=VLAN&amp;diff=7976</id>
		<title>VLAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=VLAN&amp;diff=7976"/>
		<updated>2009-12-06T19:13:59Z</updated>

		<summary type="html">&lt;p&gt;Mhammett: Add to the networking category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A virtual LAN, commonly known as a '''vLAN''' or as a '''VLAN''', is a method of creating independent logical networks within a physical network. Several VLANs can co-exist within such a network. This helps in reducing the broadcast domain and administratively separating logical segments of LAN (like company departments) which should not exchange data using LAN (they still can by routing).&lt;br /&gt;
&lt;br /&gt;
A VLAN consists of a network of computers that behave as if connected to the same wire - even though they may actually be physically connected to different segments of a LAN. Network administrators configure VLANs through software rather than hardware, which makes them extremely flexible. One of the biggest advantages of VLANs emerges when physically moving a computer to another location: it can stay on the same VLAN without the need for any hardware reconfiguration.&lt;br /&gt;
&lt;br /&gt;
VLAN 1 is the default VLAN; it can never be deleted. All untagged traffic falls into this VLAN by default.&lt;br /&gt;
&lt;br /&gt;
==Advantages of VLAN==&lt;br /&gt;
* Increases the number of '''broadcast domains''' but reduces the size of each '''broadcast domain''', which in turn reduces network traffic and increases network security (both of which are hampered in case of single large broadcast domain)&lt;br /&gt;
* Reduces management effort to create subnetworks&lt;br /&gt;
* Reduces hardware requirement, as networks can be logically instead of physically separated&lt;br /&gt;
* Increases control over multiple traffic types.&lt;br /&gt;
&lt;br /&gt;
== Common VLAN configurations for container ==&lt;br /&gt;
VLAN can be used in following ways:&lt;br /&gt;
* Create VLAN device on physical network interface (eth0) and move it (VLAN device) to container:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
host #  vconfig add eth0 &amp;lt;vlan_id&amp;gt;&lt;br /&gt;
host #  vzctl set &amp;lt;CTID&amp;gt; --netif_add eth0.&amp;lt;vlan_id&amp;gt; --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Create VLAN device inside container on veth device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ve #  vconfig add eth0 &amp;lt;vlan_id&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second option is available only in kernel with virtualized VLAN (since 2.6.18-028test005 version).&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/VLAN wikipedia:VLAN]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/IEEE_802.1Q wikipedia:IEEE 802.1Q]&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Mhammett</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Migration_from_one_HN_to_another&amp;diff=7327</id>
		<title>Migration from one HN to another</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Migration_from_one_HN_to_another&amp;diff=7327"/>
		<updated>2009-05-18T20:46:27Z</updated>

		<summary type="html">&lt;p&gt;Mhammett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{wikify}}&lt;br /&gt;
&lt;br /&gt;
The vzmigrate script is used to migrate a [[container]] from one [[Hardware Node]] to another.&lt;br /&gt;
&lt;br /&gt;
== Setting up SSH keys ==&lt;br /&gt;
&lt;br /&gt;
You first have to setup SSH to permit the old HN to be able to login to the new HN without a password prompt. Run the following on the old HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[root@OpenVZ ~]# ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/root/.ssh/id_rsa):&lt;br /&gt;
Created directory '/root/.ssh'.&lt;br /&gt;
Enter passphrase (empty for no passphrase):&lt;br /&gt;
Enter same passphrase again:&lt;br /&gt;
Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
74:7a:3e:7f:27:2f:42:bb:52:4c:ad:55:31:6f:79:f2 root@OpenVZ.ics.local&lt;br /&gt;
[root@OpenVZ ~]# cd .ssh/&lt;br /&gt;
[root@OpenVZ .ssh]# ls -al&lt;br /&gt;
total 20&lt;br /&gt;
drwx------  2 root root 4096 Aug 11 09:41 .&lt;br /&gt;
drwxr-x---  5 root root 4096 Aug 11 09:40 ..&lt;br /&gt;
-rw-------  1 root root  887 Aug 11 09:41 id_rsa&lt;br /&gt;
-rw-r--r--  1 root root  231 Aug 11 09:41 id_rsa.pub&lt;br /&gt;
[root@OpenVZ .ssh]# scp id_rsa.pub root@10.1.5.6:./id_rsa.pub&lt;br /&gt;
The authenticity of host '10.1.5.6 (10.1.5.6)' can't be established.&lt;br /&gt;
RSA key fingerprint is 3f:2a:26:15:e4:37:e2:06:b8:4d:20:ee:3a:dc:c1:69.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '10.1.5.6' (RSA) to the list of known hosts.&lt;br /&gt;
root@10.1.5.6's password:&lt;br /&gt;
id_rsa.pub               100%  231     0.2KB/s   00:00&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following on the new HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[root@Char ~]# cd .ssh/&lt;br /&gt;
[root@Char .ssh]# touch authorized_keys2&lt;br /&gt;
[root@Char .ssh]# chmod 600 authorized_keys2&lt;br /&gt;
[root@Char .ssh]# cat ../id_rsa.pub &amp;gt;&amp;gt; authorized_keys2&lt;br /&gt;
[root@Char .ssh]# rm ../id_rsa.pub&lt;br /&gt;
rm: remove regular file `../id_rsa.pub'? y&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following on the old HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[root@OpenVZ .ssh]# ssh -2 -v root@10.1.5.6&lt;br /&gt;
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003&lt;br /&gt;
debug1: Reading configuration data /etc/ssh/ssh_config&lt;br /&gt;
debug1: Applying options for *&lt;br /&gt;
debug1: Connecting to 10.1.5.6 [10.1.5.6] port 22.&lt;br /&gt;
debug1: Connection established.&lt;br /&gt;
debug1: permanently_set_uid: 0/0&lt;br /&gt;
debug1: identity file /root/.ssh/id_rsa type 1&lt;br /&gt;
debug1: identity file /root/.ssh/id_dsa type -1&lt;br /&gt;
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3&lt;br /&gt;
debug1: match: OpenSSH_4.3 pat OpenSSH*&lt;br /&gt;
debug1: Enabling compatibility mode for protocol 2.0&lt;br /&gt;
debug1: Local version string SSH-2.0-OpenSSH_3.9p1&lt;br /&gt;
debug1: SSH2_MSG_KEXINIT sent&lt;br /&gt;
debug1: SSH2_MSG_KEXINIT received&lt;br /&gt;
debug1: kex: server-&amp;gt;client aes128-cbc hmac-md5 none&lt;br /&gt;
debug1: kex: client-&amp;gt;server aes128-cbc hmac-md5 none&lt;br /&gt;
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024&amp;lt;1024&amp;lt;8192) sent&lt;br /&gt;
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP&lt;br /&gt;
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent&lt;br /&gt;
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY&lt;br /&gt;
debug1: Host '10.1.5.6' is known and matches the RSA host key.&lt;br /&gt;
debug1: Found key in /root/.ssh/known_hosts:1&lt;br /&gt;
debug1: ssh_rsa_verify: signature correct&lt;br /&gt;
debug1: SSH2_MSG_NEWKEYS sent&lt;br /&gt;
debug1: expecting SSH2_MSG_NEWKEYS&lt;br /&gt;
debug1: SSH2_MSG_NEWKEYS received&lt;br /&gt;
debug1: SSH2_MSG_SERVICE_REQUEST sent&lt;br /&gt;
debug1: SSH2_MSG_SERVICE_ACCEPT received&lt;br /&gt;
debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;
debug1: Next authentication method: gssapi-with-mic&lt;br /&gt;
debug1: An invalid name was supplied&lt;br /&gt;
Cannot determine realm for numeric host address&lt;br /&gt;
&lt;br /&gt;
debug1: An invalid name was supplied&lt;br /&gt;
Cannot determine realm for numeric host address&lt;br /&gt;
&lt;br /&gt;
debug1: Next authentication method: publickey&lt;br /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;br /&gt;
debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;br /&gt;
debug1: Server accepts key: pkalg ssh-rsa blen 149&lt;br /&gt;
debug1: read PEM private key done: type RSA&lt;br /&gt;
debug1: Authentication succeeded (publickey).&lt;br /&gt;
debug1: channel 0: new [client-session]&lt;br /&gt;
debug1: Entering interactive session.&lt;br /&gt;
Last login: Thu Aug  9 16:41:30 2007 from 10.1.5.20&lt;br /&gt;
[root@Char ~]# exit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Make sure:&lt;br /&gt;
* you have at least one good backup of the virtual machine you intend to migrate&lt;br /&gt;
* rsync is installed on the target host&lt;br /&gt;
&lt;br /&gt;
== vzmigrate usage ==&lt;br /&gt;
&lt;br /&gt;
Now that the vzmigrate script will function, a little bit on vzmigrate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This program is used for container migration to another node&lt;br /&gt;
Usage:&lt;br /&gt;
vzmigrate [-r yes|no] [--ssh=&amp;lt;options&amp;gt;] [--keep-dst] [--online] [-v]&lt;br /&gt;
        destination_address &amp;lt;CTID&amp;gt;&lt;br /&gt;
Options:&lt;br /&gt;
-r, --remove-area yes|no&lt;br /&gt;
        Whether to remove container on source HN for successfully migrated container.&lt;br /&gt;
--ssh=&amp;lt;ssh options&amp;gt;&lt;br /&gt;
        Additional options that will be passed to ssh while establishing&lt;br /&gt;
        connection to destination HN. Please be careful with options&lt;br /&gt;
        passed, DO NOT pass destination hostname.&lt;br /&gt;
--keep-dst&lt;br /&gt;
        Do not clean synced destination container private area in case of some&lt;br /&gt;
        error. It makes sense to use this option on big container migration to&lt;br /&gt;
        avoid syncing container private area again in case some error&lt;br /&gt;
        (on container stop for example) occurs during first migration attempt.&lt;br /&gt;
--online&lt;br /&gt;
        Perform online (zero-downtime) migration: during the migration the&lt;br /&gt;
        container hangs for a while and after the migration it continues working&lt;br /&gt;
        as though nothing has happened.&lt;br /&gt;
-v&lt;br /&gt;
        Verbose mode. Causes vzmigrate to print debugging messages about&lt;br /&gt;
        its progress (including some time statistics).&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Here is an example of migrating container 101 from the current HN to one at 10.1.5.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[root@OpenVZ .ssh]# vzmigrate 10.1.5.6 101&lt;br /&gt;
OPT:10.1.5.6&lt;br /&gt;
Starting migration of container 101 on 10.1.5.6&lt;br /&gt;
Preparing remote node&lt;br /&gt;
Initializing remote quota&lt;br /&gt;
Syncing private&lt;br /&gt;
Syncing 2nd level quota&lt;br /&gt;
Turning quota off&lt;br /&gt;
Cleanup&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Migrate all running containers ==&lt;br /&gt;
&lt;br /&gt;
Here's a simple shell script that will migrate each container one after another. Just pass the destination host node as the single argument to the script. Feel free to add the -v flag to the vzmigrate flags if you'd like to see it execute with the verbose option:&lt;br /&gt;
&lt;br /&gt;
 for CT in $(vzlist -H -o veid); do vzmigrate --remove-area no --keep-dst $1 $CT; done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional Information ==&lt;br /&gt;
&lt;br /&gt;
You can also use this guide to migrate from OpenVZ to Proxmox VE&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Mhammett</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Migration_from_one_HN_to_another&amp;diff=3400</id>
		<title>Migration from one HN to another</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Migration_from_one_HN_to_another&amp;diff=3400"/>
		<updated>2007-08-11T15:46:07Z</updated>

		<summary type="html">&lt;p&gt;Mhammett: Add to the howto page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I just wanted to get the content out there.  Could someone pretty this thing up?&lt;br /&gt;
&lt;br /&gt;
The vzmigrate script is used to migrate a Virutal Environment from one Hardware Node to another.&lt;br /&gt;
&lt;br /&gt;
You first have to setup SSH to permit the old HN to be able to login to the new HN without a password prompt.  Run the following on the old HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[root@OpenVZ ~]# ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/root/.ssh/id_rsa):&lt;br /&gt;
Created directory '/root/.ssh'.&lt;br /&gt;
Enter passphrase (empty for no passphrase):&lt;br /&gt;
Enter same passphrase again:&lt;br /&gt;
Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
74:7a:3e:7f:27:2f:42:bb:52:4c:ad:55:31:6f:79:f2 root@OpenVZ.ics.local&lt;br /&gt;
[root@OpenVZ ~]# cd .ssh/&lt;br /&gt;
[root@OpenVZ .ssh]# ls -al&lt;br /&gt;
total 20&lt;br /&gt;
drwx------  2 root root 4096 Aug 11 09:41 .&lt;br /&gt;
drwxr-x---  5 root root 4096 Aug 11 09:40 ..&lt;br /&gt;
-rw-------  1 root root  887 Aug 11 09:41 id_rsa&lt;br /&gt;
-rw-r--r--  1 root root  231 Aug 11 09:41 id_rsa.pub&lt;br /&gt;
[root@OpenVZ .ssh]# scp id_rsa.pub root@10.1.5.6:./id_rsa.pub&lt;br /&gt;
The authenticity of host '10.1.5.6 (10.1.5.6)' can't be established.&lt;br /&gt;
RSA key fingerprint is 3f:2a:26:15:e4:37:e2:06:b8:4d:20:ee:3a:dc:c1:69.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '10.1.5.6' (RSA) to the list of known hosts.&lt;br /&gt;
root@10.1.5.6's password:&lt;br /&gt;
id_rsa.pub                                                                                                                                                                   100%  231     0.2KB/s   00:00&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following on the new HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[root@Char ~]# cd .ssh/&lt;br /&gt;
[root@Char .ssh]# touch authorized_keys2&lt;br /&gt;
[root@Char .ssh]# chmod 600 authorized_keys2&lt;br /&gt;
[root@Char .ssh]# cat ../id_rsa.pub &amp;gt;&amp;gt; authorized_keys2&lt;br /&gt;
[root@Char .ssh]# rm ../id_rsa.pub&lt;br /&gt;
rm: remove regular file `../id_rsa.pub'? y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following on the old HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[root@OpenVZ .ssh]# ssh -2 -v root@10.1.5.6&lt;br /&gt;
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003&lt;br /&gt;
debug1: Reading configuration data /etc/ssh/ssh_config&lt;br /&gt;
debug1: Applying options for *&lt;br /&gt;
debug1: Connecting to 10.1.5.6 [10.1.5.6] port 22.&lt;br /&gt;
debug1: Connection established.&lt;br /&gt;
debug1: permanently_set_uid: 0/0&lt;br /&gt;
debug1: identity file /root/.ssh/id_rsa type 1&lt;br /&gt;
debug1: identity file /root/.ssh/id_dsa type -1&lt;br /&gt;
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3&lt;br /&gt;
debug1: match: OpenSSH_4.3 pat OpenSSH*&lt;br /&gt;
debug1: Enabling compatibility mode for protocol 2.0&lt;br /&gt;
debug1: Local version string SSH-2.0-OpenSSH_3.9p1&lt;br /&gt;
debug1: SSH2_MSG_KEXINIT sent&lt;br /&gt;
debug1: SSH2_MSG_KEXINIT received&lt;br /&gt;
debug1: kex: server-&amp;gt;client aes128-cbc hmac-md5 none&lt;br /&gt;
debug1: kex: client-&amp;gt;server aes128-cbc hmac-md5 none&lt;br /&gt;
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024&amp;lt;1024&amp;lt;8192) sent&lt;br /&gt;
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP&lt;br /&gt;
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent&lt;br /&gt;
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY&lt;br /&gt;
debug1: Host '10.1.5.6' is known and matches the RSA host key.&lt;br /&gt;
debug1: Found key in /root/.ssh/known_hosts:1&lt;br /&gt;
debug1: ssh_rsa_verify: signature correct&lt;br /&gt;
debug1: SSH2_MSG_NEWKEYS sent&lt;br /&gt;
debug1: expecting SSH2_MSG_NEWKEYS&lt;br /&gt;
debug1: SSH2_MSG_NEWKEYS received&lt;br /&gt;
debug1: SSH2_MSG_SERVICE_REQUEST sent&lt;br /&gt;
debug1: SSH2_MSG_SERVICE_ACCEPT received&lt;br /&gt;
debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;
debug1: Next authentication method: gssapi-with-mic&lt;br /&gt;
debug1: An invalid name was supplied&lt;br /&gt;
Cannot determine realm for numeric host address&lt;br /&gt;
&lt;br /&gt;
debug1: An invalid name was supplied&lt;br /&gt;
Cannot determine realm for numeric host address&lt;br /&gt;
&lt;br /&gt;
debug1: Next authentication method: publickey&lt;br /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;br /&gt;
debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;br /&gt;
debug1: Server accepts key: pkalg ssh-rsa blen 149&lt;br /&gt;
debug1: read PEM private key done: type RSA&lt;br /&gt;
debug1: Authentication succeeded (publickey).&lt;br /&gt;
debug1: channel 0: new [client-session]&lt;br /&gt;
debug1: Entering interactive session.&lt;br /&gt;
Last login: Thu Aug  9 16:41:30 2007 from 10.1.5.20&lt;br /&gt;
[root@Char ~]# exit&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that the vzmigrate script will function, a little bit on vzmigrate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;This program is used for VE migration to another node&lt;br /&gt;
Usage:&lt;br /&gt;
vzmigrate [-r yes|no] [--ssh=&amp;lt;options&amp;gt;] [--keep-dst] [--online] [-v]&lt;br /&gt;
        destination_address &amp;lt;VEID&amp;gt;&lt;br /&gt;
Options:&lt;br /&gt;
-r, --remove-area yes|no&lt;br /&gt;
        Whether to remove VE on source HN for successfully migrated VE.&lt;br /&gt;
--ssh=&amp;lt;ssh options&amp;gt;&lt;br /&gt;
        Additional options that will be passed to ssh while establishing&lt;br /&gt;
        connection to destination HN. Please be careful with options&lt;br /&gt;
        passed, DO NOT pass destination hostname.&lt;br /&gt;
--keep-dst&lt;br /&gt;
        Do not clean synced destination VE private area in case of some&lt;br /&gt;
        error. It makes sense to use this option on big VE migration to&lt;br /&gt;
        avoid syncing VE private area again in case some error&lt;br /&gt;
        (on VE stop for example) occurs during first migration attempt.&lt;br /&gt;
--online&lt;br /&gt;
        Perform online (zero-downtime) migration: during the migration the&lt;br /&gt;
        VE hangs for a while and after the migration it continues working&lt;br /&gt;
        as though nothing has happened.&lt;br /&gt;
-v&lt;br /&gt;
        Verbose mode. Causes vzmigrate to print debugging messages about&lt;br /&gt;
        its progress (including some time statistics).&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of migrating VE 101 from the current HN to one at 10.1.5.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[root@OpenVZ .ssh]# vzmigrate 10.1.5.6 101&lt;br /&gt;
OPT:10.1.5.6&lt;br /&gt;
Starting migration of VE 101 on 10.1.5.6&lt;br /&gt;
Preparing remote node&lt;br /&gt;
Initializing remote quota&lt;br /&gt;
Syncing private&lt;br /&gt;
Syncing 2nd level quota&lt;br /&gt;
Turning quota off&lt;br /&gt;
Cleanup&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Mhammett</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Migration_from_one_HN_to_another&amp;diff=3399</id>
		<title>Migration from one HN to another</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Migration_from_one_HN_to_another&amp;diff=3399"/>
		<updated>2007-08-11T15:44:31Z</updated>

		<summary type="html">&lt;p&gt;Mhammett: New Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I just wanted to get the content out there.  Could someone pretty this thing up?&lt;br /&gt;
&lt;br /&gt;
The vzmigrate script is used to migrate a Virutal Environment from one Hardware Node to another.&lt;br /&gt;
&lt;br /&gt;
You first have to setup SSH to permit the old HN to be able to login to the new HN without a password prompt.  Run the following on the old HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[root@OpenVZ ~]# ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/root/.ssh/id_rsa):&lt;br /&gt;
Created directory '/root/.ssh'.&lt;br /&gt;
Enter passphrase (empty for no passphrase):&lt;br /&gt;
Enter same passphrase again:&lt;br /&gt;
Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
74:7a:3e:7f:27:2f:42:bb:52:4c:ad:55:31:6f:79:f2 root@OpenVZ.ics.local&lt;br /&gt;
[root@OpenVZ ~]# cd .ssh/&lt;br /&gt;
[root@OpenVZ .ssh]# ls -al&lt;br /&gt;
total 20&lt;br /&gt;
drwx------  2 root root 4096 Aug 11 09:41 .&lt;br /&gt;
drwxr-x---  5 root root 4096 Aug 11 09:40 ..&lt;br /&gt;
-rw-------  1 root root  887 Aug 11 09:41 id_rsa&lt;br /&gt;
-rw-r--r--  1 root root  231 Aug 11 09:41 id_rsa.pub&lt;br /&gt;
[root@OpenVZ .ssh]# scp id_rsa.pub root@10.1.5.6:./id_rsa.pub&lt;br /&gt;
The authenticity of host '10.1.5.6 (10.1.5.6)' can't be established.&lt;br /&gt;
RSA key fingerprint is 3f:2a:26:15:e4:37:e2:06:b8:4d:20:ee:3a:dc:c1:69.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '10.1.5.6' (RSA) to the list of known hosts.&lt;br /&gt;
root@10.1.5.6's password:&lt;br /&gt;
id_rsa.pub                                                                                                                                                                   100%  231     0.2KB/s   00:00&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following on the new HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[root@Char ~]# cd .ssh/&lt;br /&gt;
[root@Char .ssh]# touch authorized_keys2&lt;br /&gt;
[root@Char .ssh]# chmod 600 authorized_keys2&lt;br /&gt;
[root@Char .ssh]# cat ../id_rsa.pub &amp;gt;&amp;gt; authorized_keys2&lt;br /&gt;
[root@Char .ssh]# rm ../id_rsa.pub&lt;br /&gt;
rm: remove regular file `../id_rsa.pub'? y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following on the old HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[root@OpenVZ .ssh]# ssh -2 -v root@10.1.5.6&lt;br /&gt;
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003&lt;br /&gt;
debug1: Reading configuration data /etc/ssh/ssh_config&lt;br /&gt;
debug1: Applying options for *&lt;br /&gt;
debug1: Connecting to 10.1.5.6 [10.1.5.6] port 22.&lt;br /&gt;
debug1: Connection established.&lt;br /&gt;
debug1: permanently_set_uid: 0/0&lt;br /&gt;
debug1: identity file /root/.ssh/id_rsa type 1&lt;br /&gt;
debug1: identity file /root/.ssh/id_dsa type -1&lt;br /&gt;
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3&lt;br /&gt;
debug1: match: OpenSSH_4.3 pat OpenSSH*&lt;br /&gt;
debug1: Enabling compatibility mode for protocol 2.0&lt;br /&gt;
debug1: Local version string SSH-2.0-OpenSSH_3.9p1&lt;br /&gt;
debug1: SSH2_MSG_KEXINIT sent&lt;br /&gt;
debug1: SSH2_MSG_KEXINIT received&lt;br /&gt;
debug1: kex: server-&amp;gt;client aes128-cbc hmac-md5 none&lt;br /&gt;
debug1: kex: client-&amp;gt;server aes128-cbc hmac-md5 none&lt;br /&gt;
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024&amp;lt;1024&amp;lt;8192) sent&lt;br /&gt;
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP&lt;br /&gt;
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent&lt;br /&gt;
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY&lt;br /&gt;
debug1: Host '10.1.5.6' is known and matches the RSA host key.&lt;br /&gt;
debug1: Found key in /root/.ssh/known_hosts:1&lt;br /&gt;
debug1: ssh_rsa_verify: signature correct&lt;br /&gt;
debug1: SSH2_MSG_NEWKEYS sent&lt;br /&gt;
debug1: expecting SSH2_MSG_NEWKEYS&lt;br /&gt;
debug1: SSH2_MSG_NEWKEYS received&lt;br /&gt;
debug1: SSH2_MSG_SERVICE_REQUEST sent&lt;br /&gt;
debug1: SSH2_MSG_SERVICE_ACCEPT received&lt;br /&gt;
debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;
debug1: Next authentication method: gssapi-with-mic&lt;br /&gt;
debug1: An invalid name was supplied&lt;br /&gt;
Cannot determine realm for numeric host address&lt;br /&gt;
&lt;br /&gt;
debug1: An invalid name was supplied&lt;br /&gt;
Cannot determine realm for numeric host address&lt;br /&gt;
&lt;br /&gt;
debug1: Next authentication method: publickey&lt;br /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;br /&gt;
debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;br /&gt;
debug1: Server accepts key: pkalg ssh-rsa blen 149&lt;br /&gt;
debug1: read PEM private key done: type RSA&lt;br /&gt;
debug1: Authentication succeeded (publickey).&lt;br /&gt;
debug1: channel 0: new [client-session]&lt;br /&gt;
debug1: Entering interactive session.&lt;br /&gt;
Last login: Thu Aug  9 16:41:30 2007 from 10.1.5.20&lt;br /&gt;
[root@Char ~]# exit&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that the vzmigrate script will function, a little bit on vzmigrate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;This program is used for VE migration to another node&lt;br /&gt;
Usage:&lt;br /&gt;
vzmigrate [-r yes|no] [--ssh=&amp;lt;options&amp;gt;] [--keep-dst] [--online] [-v]&lt;br /&gt;
        destination_address &amp;lt;VEID&amp;gt;&lt;br /&gt;
Options:&lt;br /&gt;
-r, --remove-area yes|no&lt;br /&gt;
        Whether to remove VE on source HN for successfully migrated VE.&lt;br /&gt;
--ssh=&amp;lt;ssh options&amp;gt;&lt;br /&gt;
        Additional options that will be passed to ssh while establishing&lt;br /&gt;
        connection to destination HN. Please be careful with options&lt;br /&gt;
        passed, DO NOT pass destination hostname.&lt;br /&gt;
--keep-dst&lt;br /&gt;
        Do not clean synced destination VE private area in case of some&lt;br /&gt;
        error. It makes sense to use this option on big VE migration to&lt;br /&gt;
        avoid syncing VE private area again in case some error&lt;br /&gt;
        (on VE stop for example) occurs during first migration attempt.&lt;br /&gt;
--online&lt;br /&gt;
        Perform online (zero-downtime) migration: during the migration the&lt;br /&gt;
        VE hangs for a while and after the migration it continues working&lt;br /&gt;
        as though nothing has happened.&lt;br /&gt;
-v&lt;br /&gt;
        Verbose mode. Causes vzmigrate to print debugging messages about&lt;br /&gt;
        its progress (including some time statistics).&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of migrating VE 101 from the current HN to one at 10.1.5.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[root@OpenVZ .ssh]# vzmigrate 10.1.5.6 101&lt;br /&gt;
OPT:10.1.5.6&lt;br /&gt;
Starting migration of VE 101 on 10.1.5.6&lt;br /&gt;
Preparing remote node&lt;br /&gt;
Initializing remote quota&lt;br /&gt;
Syncing private&lt;br /&gt;
Syncing 2nd level quota&lt;br /&gt;
Turning quota off&lt;br /&gt;
Cleanup&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mhammett</name></author>
		
	</entry>
</feed>