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!
=== vzmigrate: src=2.6.1 -> dst>=2.6.0 === This version of vzmigrate works properly with regard to handling ips. It will not notify ve owners of moves as in the above example. Other than that it’s essentially the same. <pre>[root@virt12 sbin]# vzmigrate 10.1.4.64 -r no 1212:1212:/vz/private/1212:/vz/root/1212 migrating 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 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... [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 vzmigrate changed so cancelve will find them): <pre>[root@virt12 sbin]# mv /vzconf/1212.conf.migrated /vzconf/1212.conf [root@virt12 sbin]# mv /vz1/private/1212.migrated /vz1/private/1212 [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, <tt>cancelve</tt> 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 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