How can I copy paste in text mode from host to guest virtual machine? I have read answers that recommend using spice, but that works for X sessions, not in text mode, or not from host's X session to guest text mode.

I don't need graphics mode in the guest since it is to test a server.

I am using qemu-system and libvirt.

Thanks in advance for any help.

  • You can't. However, when you define a serial console in the VM, you can access it in a normal terminal with virsh console and use copy-paste. In addition to specifying a serial console in the XML file (or via virt-manager, if that is possible), you will also have to set a kernel parameter like console=ttyS0. Commented Mar 23, 2021 at 6:35
  • Thank you berndbaush. Actually the solution is very easy. Commented Mar 25, 2021 at 4:57

1 Answer 1


Actually, the solution is simple, just connect to the VMs using your normal terminal by ssh in which you can use cut & paste.

  • Great method, but I had to look up what host to put in the ssh command. One way is to run ip addr in the VM and use the numbers in the inet line. So, ssh [email protected] for example Commented Jan 5 at 16:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .