OpenVZ Forum


Home » General » Support » Problems migrating
Problems migrating [message #41635] Fri, 11 February 2011 15:44 Go to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
I am having issues migrating containers to a Proxmox host. THe guys at Proxmox haven't been much help. Here is the link to what we were discussing over there: http://forum.proxmox.com/threads/5200-Server-migration

Basically I'm trying to migrate containers from OpenVZ to Proxmox. The Proxmox server is returning that it has run out of disk space. There is over 1 TB free and I'm trying to move over a couple gigs.

Any ideas?
Re: Problems migrating [message #41637 is a reply to message #41635] Sat, 12 February 2011 16:26 Go to previous messageGo to next message
sipero is currently offline  sipero
Messages: 4
Registered: February 2011
Location: Carshalton UK
Junior Member
Hi,

I had a similar problem to this myself previously.

When you use vzmigrate one of the first things it does in the migration process is copy over the config file for the VPS.

I think this is where the problems start as it uses the information in this config file to know where the files for the VPS should be copied to.

In the case of proxmox as already stated in the other post you mention this is /var/lib/vz

In a Centos environment /var/lib is usually on the / partition and often may only have a partition size of around 5 gb if you follow the recommendation for partitioning for use with openvz

This is most likely why you are running out of disk space. In these circumstances I've found the easiest why to migrate from proxmox is to use vzdump, scp the archive to the new server and then vzrestore on the new server.


Jonathan Hamon
Re: Problems migrating [message #41638 is a reply to message #41637] Sat, 12 February 2011 16:40 Go to previous messageGo to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
So then to vzrestore on a new machine, would I create the new container in the ProxMox GUI, shut it down, then vzrestore it?

Would it put it in the proper location for the Debian hierarchy, or would it still put it into /vz/?
Re: Problems migrating [message #41639 is a reply to message #41638] Sat, 12 February 2011 17:10 Go to previous messageGo to next message
sipero is currently offline  sipero
Messages: 4
Registered: February 2011
Location: Carshalton UK
Junior Member
Hi,

I would probably create the VPS as you state in the web GUI and then shut it down.

I would then destroy the VPS via the following command in SSH

vzctl destroy <ctid>

Next having copied the archive created with vzdump to the proxmox host node run the following command to restore the VPS

vzrestore <nameofvzdumpfile> <ctid>

Follow the instructions on the proxmox wiki add the line specified to the config file for the vps (I don't have enough posts here to include the link)

When you use vzdump it will restore the files in the correct location

Re: Problems migrating [message #41640 is a reply to message #41639] Sat, 12 February 2011 20:56 Go to previous messageGo to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
That worked great.

For the ones that I moved over previously, would I just be able to change the locations of the private and root directories from /vz/ to /var/lib/vz/ in the config file so they were more compatible?

For instance, on one container I tried to migrate to another machine in a ProxMox cluster, it wouldn't because of /vz/ references.
Re: Problems migrating [message #41641 is a reply to message #41640] Sat, 12 February 2011 21:03 Go to previous messageGo to next message
sipero is currently offline  sipero
Messages: 4
Registered: February 2011
Location: Carshalton UK
Junior Member
Hi,

It will probably work. You might want to just shut the vps and copying over the files and folders to the correct location.

Another alternative if you have a copy on the old server and you aren't concerned about losing changes you could simply vzdump and restore as described.


Jonathan Hamon
Re: Problems migrating [message #41642 is a reply to message #41641] Sat, 12 February 2011 21:32 Go to previous messageGo to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
I should have mentioned (if you didn't see it in the post) that I have /vz/ symlinked to /var/log/vz/ on the middle server, so the files wouldn't be changing locations. It would just be cutting out the symlink.
Re: Problems migrating [message #41643 is a reply to message #41642] Sat, 12 February 2011 21:38 Go to previous messageGo to next message
sipero is currently offline  sipero
Messages: 4
Registered: February 2011
Location: Carshalton UK
Junior Member
Hi,

Probably will work I assume you mean /var/lib/vz for your symlink not /var/log/vz as in your last posgt


Re: Problems migrating [message #41644 is a reply to message #41643] Sat, 12 February 2011 21:41 Go to previous message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
hah, yes. You would be correct. Typing faster than I'm thinking.
Previous Topic: How do I get rid of ip connection tracking completely?
Next Topic: Can't start new VPS
Goto Forum:
  


Current Time: Tue Nov 19 04:17:35 GMT 2024

Total time taken to generate the page: 0.02973 seconds