Skip to content

Instantly share code, notes, and snippets.

@hakonhagland
Last active February 4, 2025 14:51
Show Gist options
  • Save hakonhagland/cd6af762705d98f40b3a8db40d36a64f to your computer and use it in GitHub Desktop.
Save hakonhagland/cd6af762705d98f40b3a8db40d36a64f to your computer and use it in GitHub Desktop.
How to make copy&paste work between Ubuntu host and Windows 10 guest for a KVM virtual machine?

From Ubuntu: Install kvm

sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
sudo systemctl enable libvirtd.service

Download Windows 10 ISO

https://www.microsoft.com/nb-no/software-download/windows10ISO

Start virtual manager

sudo virt-manager

Create the virtual machine

  • Select: Create new virtual machine
  • Step 1: Select : "Local install media (ISO image)
  • Step 2: Provide the path to the downloaded Windows 10 ISO image
  • Step 3: Choose memory and CPU settings
  • Step 4: Enable storage for this virtual machine. Choose the size of the disk image
  • Step 5: Choose the name of the machine, and click "Finish"

After installation of windows 10 in the VM: Download and install spice-guest-tools

From the Windows 10 VM, open Edge web browser and download spice guest tools from

https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe

Then install the guest tools.

Shut down the VM, and exit virtual manager, then restart virt-manager and the Windows 10 VM.

  • Use CTRL-C and CTRL-V to copy and paste between the host Ubuntu machine and the guest Windows 10 VM.
@archenroot
Copy link

Nice, but doesn't work for me with Windows 11 Pro,

@vildevilde
Copy link

Work directly for me. Host-Siduction Guest-Win10

@jtovarro
Copy link

Worked for Windows 10 and Fedora as host. Thanks!

@speckz
Copy link

speckz commented Jan 17, 2025

This works with Windows 10 guest and Fedora host, but it does not work for Windows 11 guest on the same Fedora host. I even checked that 'Spice server' was set for Windows 11 in Virtual Machine Manager under Display Spice. The VirtIO Windows Guest Tools are also installed.

@jensanjo
Copy link

jensanjo commented Feb 4, 2025

It does not work for Windows server 2022 guest and Ubuntu 22.04 host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment