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!
=== migrate src=2.6.0 -> dst>=2.6.0, or mass-migration with customer notify === A script called <tt>migrate</tt> was written to handle this kind of move. It is basically a wrapper for vzmigrate – vzmigrate is a util to seamlessly 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 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, migrate 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: migrateonline is equivalent to migrate, but will migrate a ve from one 2.6 '''kernel''' machine to another 2.6 kernel machine without restarting the ve. <pre>[root@virt12 sbin]# migrate usage: /usr/local/sbin/migrate <ip of node migrating to> <veid> [target dir: vz | vz1 | vz2] [root@virt12 sbin]# migrate 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 (backup2 or mail). Cancel the ve (first we have to rename things which migrate changed so cancelve will find them): [root@virt12 sbin]# mv /vzconf/1212.conf.migrated /vzconf/1212.conf On 2.6.1 you’ll also have to move the private area: [root@virt12 sbin]# mv /vz1/private/1212.migrated /vz1/private/1212 <pre>[root@virt12 sbin]# cancelve 1212 v stop 1212 v set 1212 --offline_management=no --save Delete port redirection Deleting IP address(es) from pool: 69.55.229.84 Saved parameters for VE 1212 mv /vzconf/1212.conf /vzconf/deprecated-1212 mv /vz1/private/1212 /vz1/private/old-1212-cxld-20050414 don't forget to remove firewall rules and domains! [root@virt12 sbin]#</pre> Note: if the system had backups, [[#cancelve|cancelve]] would offer to remove them. You want to say '''no''' to this option – doing so would mean that the backups would have to be recreated on the dst virt. Instead, copy over the backup configs (make note of path changes in this example) from backup.config on the src virt to backup.config on the dst virt. Then go to backup2 and move the dirs. So you’d do something like this: mv /mnt/data1/virt12/0/vz1/private/1212 /mnt/data3/virt14/0/vz/private/ We don’t bother with the other dirs since there’s no harm in leaving them and eventually they’ll drop out. Besides, moving harlinked files across a filesystem as in the example above will create actual files and consume lots more space on the target drive. If moving to the same drive, you can safely preserve hardlinks and move all files with: sh for f in 0 1 2 3 4 5 6; do mv /mnt/data1/virt12/$f/vz1/private/1212 /mnt/data1/virt14/$f/vz/private/; done To move everyone off a system, you’d do: for f in `vl`; do migrate <ip> $f; done Update the customer’s systems by clicking the “move” link on the moved system, update the system, template (should be pre-selected as the same), and the shut down date.
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