noVNC copy/paste from guest to host

  • Like
Reactions: flames
I made a patch-series for using the noVNC Clipboard.
You can wait till the patch-series got applied or patch it yourself with git am <email-patch-file> in qemu-server, novnc-pve, pve-manager.

https://lists.proxmox.com/pipermail/pve-devel/2022-September/053857.html
Hi, i don't understand...
i correct my QemuServer.pm as step 1/5 https://lists.proxmox.com/pipermail/pve-devel/2022-September/053857.html.
But, when i start novnc, clipboard don't work.
Can you get more deatil of instructions?
 
Remember that this has not been tested and is not meant for production use right now and you would have to do this after every update.

to activate add clipboard=1 to vga in your vm config.

Code:
vga: std,clipboard=1



Simpler Solution:

What the clipboard-feature really needs are these 3 qemu parameters:
Code:
qemu-system-x86_64 [ ... ] \
  -chardev qemu-vdagent,id=ch1,name=vdagent,clipboard=on \
  -device virtio-serial-pci \
  -device virtserialport,chardev=ch1,id=ch1,name=com.redhat.spice.0


You can get your qemu-command with qm showcmd 191 --pretty and then add the parameters above.

And you need to remove the pve-hidden class from noVNC_clipboard_button in javascript and click the button on left side.

https://www.kraxel.org/blog/2021/05/qemu-cut-paste/
 
Last edited:
Remember that this has not been tested and is not meant for production use right now and you would have to do this after every update.

to activate add clipboard=1 to vga in your vm config.

Code:
vga: std,clipboard=1



Simpler Solution:

What the clipboard-feature really needs are these 3 qemu parameters:
Code:
qemu-system-x86_64 [ ... ] \
  -chardev qemu-vdagent,id=ch1,name=vdagent,clipboard=on \
  -device virtio-serial-pci \
  -device virtserialport,chardev=ch1,id=ch1,name=com.redhat.spice.0


You can get your qemu-command with qm showcmd 191 --pretty and then add the parameters above.

And you need to remove the pve-hidden class from noVNC_clipboard_button in javascript and click the button on left side.

https://www.kraxel.org/blog/2021/05/qemu-cut-paste/
thanks a lot, but it doesn't work
Answer pls, i need to do 5 steps https://lists.proxmox.com/pipermail/pve-devel/2022-September/053857.html. or fonly first step?
i add vga: std,clipboard=1 in 101.conf
i don't indersand, where i made mistake...
i use only novnc
 
I got this mistake

kvm: -chardev qemu-vdagent, id=vdagent, name=vdagent, clipboard=on: Invalid parameter ' id'
TASK ERROR: start failed: QEMU exited with code 1
How i can solve?
 
Remember that this has not been tested and is not meant for production use right now and you would have to do this after every update.

to activate add clipboard=1 to vga in your vm config.

Code:
vga: std,clipboard=1



Simpler Solution:

What the clipboard-feature really needs are these 3 qemu parameters:
Code:
qemu-system-x86_64 [ ... ] \
  -chardev qemu-vdagent,id=ch1,name=vdagent,clipboard=on \
  -device virtio-serial-pci \
  -device virtserialport,chardev=ch1,id=ch1,name=com.redhat.spice.0


You can get your qemu-command with qm showcmd 191 --pretty and then add the parameters above.

And you need to remove the pve-hidden class from noVNC_clipboard_button in javascript and click the button on left side.

https://www.kraxel.org/blog/2021/05/qemu-cut-paste/
I got this mistake
kvm: -chardev qemu-vdagent, id=vdagent, name=vdagent, clipboard=on: Invalid parameter ' id'
TASK ERROR: start failed: QEMU exited with code 1
How i can solve?
 
Do not use spaces between qemu-vdagent,id=vdagent,name=vdagent,clipboard=on

It tells you Invalid parameter ' id' because of the space.
 
Do not use spaces between qemu-vdagent,id=vdagent,name=vdagent,clipboard=on

It tells you Invalid parameter ' id' because of the space.
I done as instruction, now i got this error

kvm: -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3: PCI: slot 3 function 0 not available for virtio-balloon-pci, in use by virtio-serial-pci
TASK ERROR: start failed: QEMU exited with code 1

help pls, how i repair?
 
Either move the three parameters to the end of qemu-command or add a bus and addr parameter with an address you do not use.

Code:
-device virtio-serial-pci,bus=pci.0,addr=0x9

Thanks that reminds to add these parameters to the patch.
 
Last edited:
Either move the three parameters to the end of qemu-command or add a bus and addr parameter with an address you do not use.

Code:
-device virtio-serial-pci,bus=pci.0,addr=0x1D

Thanks that reminds to add these parameters to the patch.


I have this error...



kvm: -device virtio-serial-pci,bus=pci.0,addr=0x0: PCI: slot 0 function 0 not available for virtio-serial-pci, in use by i440FX
TASK ERROR: start failed: QEMU exited with code 1

What i need to do?
 
I have this error...



kvm: -device virtio-serial-pci,bus=pci.0,addr=0x0: PCI: slot 0 function 0 not available for virtio-serial-pci, in use by i440FX
TASK ERROR: start failed: QEMU exited with code 1

What i need to do?
I solve problem, i need to use
-device virtio-serial-pci,bus=pci.0,addr=4
 
I would use addr=0x9 since it is used by spice which cannot run at the same time

Do not forget to install spice-vdagent and enable clipboard with the button in noVNC
 
Last edited:

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!