LXC / LXD Move Container to New Storage Pool



  • Very easy process, but one that is a little hard to find information on. Just four commands. We have to stop the container, move with a new name, then we can rename to the old name, and start it again. Fast and simple, but not necessarily intuitive.

    lxc stop container
    lxc move container container_temp -s new_storage_pool
    lxc move container_temp container
    lxc start container
    

    Would be really trivial to script, too.