file transfer within Proxmox

Newbieagain

New Member
Feb 1, 2024
2
0
1
Hello All,
I am a newbie at Proxmox and I'm having a great time learning but I've run into something I cannot figure out.
I have a small file I have transfered to the root directory on my Proxmox server and I would like to copy it to all the VMs. Seems like a simple cp command would do but I cannot figure out the directories.
 
Hi @Newbieagain , welcome.
You cannot use "cp" command to move file from HyperVisor to a VM. Depending on the VM OS and its configuration you may be able to use SCP.
With some basic legwork you might also be able to use FTP, SMB or NFS.
Think of the hypervisor(PVE) and your VM as two computers you have in your network. The same rules apply for transferring files.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Hello,

It depends if your VMs were created with lxc or with qemu.

with lxc, on stopped vm, type:
pct mount <my_lxcid>
and cd to the directory indicated by the command; you are then in your containers file system.
copy your file there, cd back out of the container's filesystem, then type:
pct unmount <my_lxcid> to release the mount point.
you can then start your container again.

In a VM created with qemu, the VM's operating system acts autonomously towards the proxmox hypervisor.
You will have to transfer your file via scp, or try a 9p mountpoint.

Kind regards,

--
Guillaume Delanoy
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!