[Users] Ploop Help

Scott Dowdle dowdle at montanalinux.org
Thu Aug 6 14:27:46 PDT 2015


Greetings,

----- Original Message -----
> Thanks for input.  Turns out only two to convert from ploop.  Is this
> script a safe way to convert from ploop to simfs?
> 
> https://gist.github.com/dlage/8dd97c285e2dd41f58c2

I'm not going to try to read / evaluate someone's program but they are using the same basic steps with the goal of converting it to simfs so it can be run on the same host node.  As you probably know there are really three parts to a simfs container.  It's config (in /etc/vz/conf/{ctid}.conf), it's filesystem (in /vz/private/{ctid}/) and it's quota metadata (I forget where on the filesystem that is stored and I don't have any simfs containers left to check).  ploop uses disk size as the quota so the resulting container doesn't have an external quota data and that'll have to be generated by vzquota when the simfs-based container starts up... so we'll just leave that out.

The script seems to do what is needed:

Make a destination directory
Mount the container's ploop image
rsync from mounted ploop image to destination directory
copy the config out of the ploop image to where it goes in /etc/vz/conf/
Unmount the container's ploop image
Update the config from ploop layout to simfs
Move the ploop-based container directory out of the way
Move the destination directory to the appropriate name/place (/vz/private/{ctid}

> After that I imagine I just follow this to move to Proxmox?
> 
> https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE#Move_OpenVZ_containers_to_Proxmox_VE

I've not used Proxmox VE recently and I'm not that familiar with its internals but that page says you can vzmigate it or use a vzdump.  vzmigrate basically rsync's over the config and the container's directory structure... and I would assume you can do that manually with scp (for the config) and rsync for the directory structure.  Doing it that way would eliminate the need to move the ploop image out of the way, mv the destination to the appropriate place, etc.  Heck you could save a step and just rsync directly from the mounted ploop image to the destination directory on the Proxmox VE host.  Doing it that way though, you have to make sure you update the config so it doesn't refer to ploop... and that if the CTID has to change (because of a conflict with an existing container on the Proxmox VE host) you do that too.  If you are a master of the config structure and it isn't too complicated, it should be fairly easy.

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]



More information about the Users mailing list