Ubuntu Samba KVM Virt-Manager

From richud.com
Jump to navigation Jump to search

Just some notes...I am using Ubuntu 14.10 x64 at time of writing. (Guest is Win 7 x64, yuk!)

virt-mgr, aka virtual machine manager, aka VMM) cannot support the qemu Samba function as libvirt doesn't have an API for it.

Fix execute permissions

Fix Samba >= 4.1 as used in Ubuntu 14.10 etc, (dont think this works in 14.04 as Samba 4.0 didn't have this fix. It wasn't needed in Samba 3.6)

Execute permissions have to be set on the linux host for a Windows guest to be able to execute (run) programs.

Fix by adding this into the [global] section of smb.conf which lets execute work (but wont show up on the windows permissions, that only happens if +x is set on linux in the share)

[global]
acl allow execute always = Yes

Fix share to be local on vibr0

Share done via nautilus 'share', with everything guest access, everyone etc.

Then assuming you are using libvirt, add this line to /var/lib/samba/usershares/<YOUR SHARE> so its only listening on the subnet.

hosts allow = 192.168.122.0/255.255.255.0

QMU Guest ADDitions

If you clock is going super fast and everything is going nuts when restoring the VM from a snapshot it needs qemu guest additions installing. 3 things to do.

Add the proper virtio channel

Add Hardware > Add Channel > Name: org.qemu.guest_agent.0, Device Tye: Unix Socket, Auto Socket ticked.

Fix apparmor to allow qmeu-guest-additions qemu-ga

sudo mkdir -p /var/lib/libvirt/qemu/channel/target
sudo chown -R libvirt-qemu:kvm /var/lib/libvirt/qemu/channel
echo '/var/lib/libvirt/qemu/channel/target/* rw' > /etc/apparmor.d/abstractions/libvirt-qemu

Install qemu-ga-x64.msi

Assuming guest is 64 bit windows

The qemu-ga is opensource and on qemu's site but no built executable downloadable, they have been (cross) compiled and available from inside some rpm's.


This can be extracted from various redhat/fedora rpm's , google these.

virtio-win-1.6.8-4.el6.src.rpm, rhev-guest-tools-iso-3.4-2.el6ev.noarch.rpm , rhev-guest-tools-iso-3.5-2.el6_5.noarch.rpm

  • Note in the redhat ones it is inside an ISO, then called RHEV-QGA64.msi