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

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

See LXD

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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