<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Samba on Major Hayden</title><link>https://major.io/tags/samba/</link><description>Recent content in Samba on Major Hayden</description><generator>Hugo</generator><language>en</language><managingEditor>major@mhtx.net (Major Hayden)</managingEditor><webMaster>major@mhtx.net (Major Hayden)</webMaster><copyright>All content licensed [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)</copyright><lastBuildDate>Sun, 07 Jun 2026 23:39:03 +0000</lastBuildDate><atom:link href="https://major.io/tags/samba/index.xml" rel="self" type="application/rss+xml"/><item><title>Boot VM’s with virt-manager and libvirt with ISO’s stored remotely via samba/cifs</title><link>https://major.io/p/boot-vms-with-virt-manager-and-libvirt-with-isos-stored-remotely-via-sambacifs/</link><pubDate>Sun, 07 Jul 2013 01:51:10 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/boot-vms-with-virt-manager-and-libvirt-with-isos-stored-remotely-via-sambacifs/</guid><description>&lt;p&gt;&lt;img alt="1" loading="lazy" src="https://major.io/wp-content/uploads/2013/07/qnap.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Pairing &lt;a href="http://virt-manager.org/"&gt;virt-manager&lt;/a&gt; with KVM makes booting new VM&amp;rsquo;s pretty darned easy. I have a &lt;a href="http://www.qnap.com/en/?lang=en&amp;amp;sn=822&amp;amp;c=1655&amp;amp;sc=1656&amp;amp;t=1660&amp;amp;n=6703"&gt;QNAP NAS&lt;/a&gt; at home with a bunch of ISO&amp;rsquo;s stored in share available to guests and I wanted to use that with libvirt to boot new VM&amp;rsquo;s. (By the way, if you&amp;rsquo;re looking for an off-the-shelf NAS that is built with solid hardware and pretty reliable software, try one of the QNAP devices. You still get access to many of the usual commands that you would normally find on a Linux box for emergencies. More on that in a later post.)&lt;/p&gt;
&lt;p&gt;The first step was creating a mountpoint and configuring the mount in /etc/fstab:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# mkdir /mnt/iso
# grep qemu /etc/passwd
qemu❌107:107:qemu user:/:/sbin/nologin
# echo &amp;#34;//qnap/ISO /mnt/iso cifs _netdev,guest,uid=107,gid=107,defaults 0 0&amp;#34; &amp;gt;&amp;gt; /etc/fstab
# mount /mnt/iso
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;My QNAP is already in /etc/hosts so I didn&amp;rsquo;t need to specify the IP in the file. Adding &lt;code&gt;_netdev&lt;/code&gt; ensures that the network will be up before the mount is made. The &lt;code&gt;guest&lt;/code&gt; option ensures that I won&amp;rsquo;t be prompted for credentials and the &lt;code&gt;uid=107,gid=107&lt;/code&gt; mounts the share as the qemu user. If you forget this, virt-manager will throw some ugly permissions errors from libvirt.&lt;/p&gt;
&lt;p&gt;From there, I had another permissions error and I suspected that SELinux was preventing libvirt from accessing the files in the share. A quick check of /var/log/messages revealed that I was right:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Jul 6 16:12:51 nuc1 setroubleshoot: SELinux is preventing /usr/bin/qemu-system-x86_64 from open access on the file /mnt/iso/livecd.iso. For complete SELinux messages. run sealert -l c1c80b2c-b5df-4114-86c7-ffee98274552
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here&amp;rsquo;s the output from sealert:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# sealert -l c1c80b2c-b5df-4114-86c7-ffee98274552
SELinux is preventing /usr/bin/qemu-system-x86_64 from open access on the file /mnt/iso/livecd.iso.

***** Plugin catchall_boolean (89.3 confidence) suggests *******************

If you want to allow virt to use samba
Then you must tell SELinux about this by enabling the &amp;#39;virt_use_samba&amp;#39; boolean.
You can read &amp;#39;None&amp;#39; man page for more details.
Do
setsebool -P virt_use_samba 1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The fix is a quick one:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# setsebool -P virt_use_samba 1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You should be all set after that. Press “Browse Local” in virt-manager when you look for your ISO to boot the virtual machine and navigate over to /mnt/iso for your list of ISO&amp;rsquo;s.&lt;/p&gt;</description></item></channel></rss>