Editing
VPS Management
(section)
Jump to navigation
Jump to search
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.
Anti-spam check. Do
not
fill this in!
=== migrateonline intructions: src >=3.x -> dst>=3.x === A script called [[#migrateonline|migrateonline]] was written to handle this kind of move. It is basically a wrapper for <tt>vzmigrate</tt> – vzmigrate is a util to seamlessly- as no no reboot of the ve necessary- move a ve from one host to another. This wrapper was initially written cause vz virtuozzo version 2.6.0 has a bug where the ve’s ip(s) on the src system were not properly removed from arp/route tables, causing problems when the ve was started up on the dst system. [[#migrate|migrate]] mitigates that. Since it makes multiple ssh connections to the dst virt, it’s a good idea to put the pub key for the src virt in the authorized_keys file on the dst virt. In addition, migrateonline emails ve owners when their migration starts and stops. For this to happen they need to put email addresses (on a single line, space delimited) in a file on their system: /migrate_notify. If the optional target dir is not specified, the ve will be moved to the same private/root location as it was on the src virt. Note: <tt>migrate</tt> is equivalent to <tt>migrateonline</tt>, but will <tt>migrate</tt> a ve AND restart it in the process. <pre>[root@virt12 sbin]# migrateonline usage: /usr/local/sbin/migrateonline <ip of node migrating to> <veid> [target dir: vz | vz1 | vz2] [root@virt12 sbin]# migrateonline 10.1.4.64 1212 vz starting to migrate 1212 at Sat Mar 26 22:40:38 PST 2005 Turning off offline_management Saved parameters for VE 1212 migrating with no start on 10.1.4.64 Connection to destination HN (10.1.4.64) is successfully established Moving/copying VE#1212 -> VE#1212, [/vz/private/1212], [/vz/root/1212] ... Syncing private area '/vz1/private/1212' - 100% |*************************************************| done Successfully completed clearing the arp cache now going to 10.1.4.64 and clear cache and starting starting it Delete port redirection Adding port redirection to VE(1): 4643 8443 Adding IP address(es) to pool: 69.55.229.84 Saved parameters for VE 1212 Starting VE ... VE is mounted Adding port redirection to VE(1): 4643 8443 Adding IP address(es): 69.55.229.84 Hostname for VE set: fourmajor.com File resolv.conf was modified VE start in progress... finished migrating 1212 at Sat Mar 26 22 22:52:01 PST 2005 [root@virt12 sbin]#</pre> Confirm that the system is up and running on the dst virt. Try to ssh to it from another machine. If they had backups, use the mvbackups command to move their backups to the new server: mvbackups 1212 virt14 vz Rename the ve [root@virt12 sbin]# mv /vzconf/1212.conf.migrated /vzconf/migrated-1212 [root@virt12 sbin]# mv /vz1/private/1212.migrated /vz1/private/old-1212-migrated-20120404-noarchive Update the customer’s systems in mgmt to reflect the new path and server. IF migrateonline does not work, you can try again using simply migrate- this will result in a brief reboot for the ve. Before you try again, make sure of a few things: Depending on where in the migration died, there may be partial data on the dst system in 1 of 2 places: (given the example above) /vz/private/1212 or /vz/private/1212.migrated before you run migrate again, you'll want to rename so that all data is in 1212.migrated: mv /vz/private/1212 /vz/private/1212.migrated this way, it will pick up where it left off and transfer only new files. Likewise, if you want to speed up a migration, you can pre-seed the dst as follows: [root@virt12 sbin]# rsync -avSH /vz/private/1212/ root@10.1.4.64:/vz/private/1212.migrated/ then when you run migrate or migrateonline, it will only need to move the changed files- the migration will complete quickly
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information