# PVE 與 LXC/VM 環境上的節點容器檔案上傳與拉取 --- ## 簡介 有時候尤其在網路配置複雜的環境,你的 PVE Node 網路有通,但是 CT/VM 的網路沒有通的時候,你可以藉由 PVE Node 進行下載檔案後,上傳到 CT/VM 上面 --- ## CT LXC Container 與 Node 上傳與拉取 ---- ### 上傳檔案(從 Node 到 CT) ```shell pct push {vmid} {file} {destination} ``` ---- ### 拉取檔案(從 CT 到 Node) ```shell pct pull {vmid} {file} {destination} ``` --- ## VM Virtual Machine 與 Node 上傳與拉取 ---- ### 上傳檔案(從 Node 到 VM) 需要進到 Virtual Machine Console 使用 SCP ```shell scp root@[Host_ip]:/{file} {destination} ``` ---- ### 拉取檔案(從 VM 到 Node) 需要進到 Virtual Machine Console 使用 SCP ```shell scp {destination} root@[Host_ip]:/{file} ``` --- ### 疑難求問 ``` pct help push ``` --- ## 參考資料 - [Proxmox forum - Howto copy file from host to lxc container.](https://forum.proxmox.com/threads/howto-copy-file-from-host-to-lxc-container.26426/)