User Tools

Site Tools


virt:qemu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
virt:qemu [2010/08/02 13:35] – created - external edit 127.0.0.1virt:qemu [2025/11/18 15:37] (current) phil
Line 37: Line 37:
  
 As usual, Windows needs some drivers first. Best get the ISO As usual, Windows needs some drivers first. Best get the ISO
-[[http://blog.famzah.net/2010/01/09/kvm-qemu-virtio-storage-and-network-drivers-for-32-bit64-bit-windows-7-windows-vista-windows-xp-and-windows-2000/|here]]+[[https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/Driver-installation|here]]
 or the original ZIP files or the original ZIP files
 [[http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers|here]]. [[http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers|here]].
Line 54: Line 54:
       -drive file=/tmp/dummy,cache=none,if=virtio \       -drive file=/tmp/dummy,cache=none,if=virtio \
       -net nic,model=virtio -net tap -boot c       -net nic,model=virtio -net tap -boot c
 +
 +===== Hiding the Hypervisor =====
 +
 +To avoid "special" behaviour of (usually windows-)software when running in a
 +virtualized host, some extra measures are advisable to make the VM unaware of
 +itself. Basically found the instructions
 +[[https://superuser.com/questions/1387935/hiding-virtual-machine-status-from-guest-operating-system|here]]:
 +
 +  * Make sure to not use "Hypervisor Default" CPU model, better go with "Copy host CPU configuration". (Has this become the standard meanwhile anyway?)
 +
 +For the remaining two, edit the VM's XML (``virsh edit <vm>``):
 +
 +  * Inside the ''<cpu>'' tag, add:
 +
 +  <feature policy='disable' name='hypervisor'/>
 +
 +  * Inside the ''<features>'' tag, add:
 +
 +  <kvm>
 +    <hidden state='on'/>
 +  </kvm>
 +
 +If everything went well, Task Manager's Performance tab should no longer read
 +''Virtual machine: yes'' but ''Virtualization: enabled'' instead.
 +
 +===== Sharing Directories with Windows Guests =====
 +
 +Using a network filesystem or hacks like sshfs works but feels clumsy. With
 +[[https://virtio-fs.gitlab.io/|virtiofs]] there finally seems to be a nice
 +solution. Tested in libvirt only for now:
 +
 +In virt-manager, edit the machine and add a "filesystem" hardware. Use ''virtiofs'' for driver, browse ''source path'' to a local directory which should be shared and choose a name as ''target path''.
 +
 +In the Windows VM, install [[https://virtio-fs.gitlab.io/howto-windows.html|WinFsp]]. If Virtio-Win drivers are installed, it seems to suffice opening a ''cmd.exe'' as Administrator and calling:
 +  C:\> sc start VirtioFsSvc
 +The shared directories appear with drive letters Z: and downwards. This might need another call to become persistent upon reboots:
 +  C:\> sc config VirtioFsSvc start=auto
 +
  
virt/qemu.1280756111.txt.gz · Last modified: by 127.0.0.1