Copy a file from host into LXD container

To copy file from host machine to LXD container run

lxc file push FILE_NAME CONTAINER_NAME/FOLDER/

Example

lxc file push ant-media-server-enterprise-2.2.1-20201029_2042.zip centos8/root/
lxc file copy

To copy a file from the host machine to an lxd container, run

Advertisement

lxc file push FILE_NAME CONTAINER_NAME/path/to/folder/
copy file to lxd container

To copy a file from LXD container to the local machine, run

lxc file pull first-vm/root/2.txt .

If you need to copy a folder and files inside, you can use option –recursive

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement