I'm currently switching to Virt-Manager (QEMU/KVM) and leave VirtualBox behind (as it is slow), but I find Virt-Manager hard to configure. In VBox and VMware, all you have to do is install the guest additions, then everything will work including the display, folder sharing, etc..
I would like to have a Windows guest (either 7 or 10) with at least a working network, display drivers, and folder sharing. Setting a Filesystem passthrough does not seem to work in Windows guests (and I also got sick and tired of trying Samba to work).
What's the proper way to create a Windows guest with working display and sharing? Maybe I missed some dependencies or Virt-Manager specific settings?
"How to" guides I followed:
- How to setup Samba for File Sharing in Linux
- How to share files with Samba (SMB) from Ubuntu and mount on Windows
I tried the nautilus-share
, and the manual /etc/samba/smb.conf
configuration, and try to mount the folder in guest OS with \\IP.ADDRESS\SHARED_FOLDER
, but nothing worked.
EDIT
Sadly, no 3D acceleration support for Windows guest... Guess I'll just stick to VirtualBox/VMware for now...
For future reference, here's my fully working Network, Display, and Folder Sharing QEMU/KVM setup on Ubuntu-based 18.04 LTS (specifically, Pop! OS 18.04). Initially, I'm using the Android Emulator for development with KVM installed. So, then I decided to switch from VBox and VMware to Virt-Manager for OS testing, and primarily, for softwares I used in Windows, since it also target Kernel-based VMs and is faster.
Setup
1. Install and verify KVM:
$ sudo apt install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
$ kvm-ok
Needs restart to work properly.
2. Install Red Hat Virtual Machine Manager:
$ sudo apt install virt-manager
3. Create Windows VM:
I use dynamically allocated QCOW2 storage format:
$ sudo qemu-img create -f qcow2 /var/lib/libvirt/images/test-vm.qcow2 30G
with VirtIO-type Storage and Network (requires VirtIO drivers):
Include VirtIO drivers image file:
4. Windows guest installation:
Load VirtIO Storage and Network drivers (and proceed to standard installation):
For the Network driver, you'll probably don't see any listed drivers while loading it during installation. This occurred to me when I use NAT in network interface, but not in Bridge mode. If that's the case, then you can manually update the driver later on.
5. Install and configure Samba for basic public folder sharing over network:
Install Samba on host OS:
$ sudo apt install samba
Add a basic public folder config:
$ sudo nano /etc/samba/smb.conf
Append the following lines:
[Public]
comment = Public shared folder
path = /path/to/public/folder
read only = yes
guest ok = true
acl allow execute always = true
Restart Samba service (or perform a full reboot
):
$ testparm
$ sudo service smbd restart
You can then map the folder in Windows guest with \\<host-ip-address>\Public
:
6. Download the SPICE guest tools for Display and other VirtIO drivers, etc..
You can then use the public shared folder to install it to the Windows guest OS.
guest ok = true
) you are exposing your host to anyone who happens to be on the same network as yourself. Any random stranger will also be able to read the files you are sharing.