conf: require target for external virtiofsd

When adding support for externally launched virtiofsd,
I was too liberal and did not require a target.

But the target is required, because it's passed to the
QEMU device, not to virtiofsd.

https://bugzilla.redhat.com/show_bug.cgi?id=1969232

Fixes: 12967c3e13
Fixes: 56dcdec1ac
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko 2021-06-16 15:35:16 +02:00
parent 2dabd16588
commit e8863b91fb
4 changed files with 6 additions and 1 deletions

View File

@ -3261,6 +3261,7 @@ A directory on the host that can be accessed directly from the guest.
<filesystem type='mount'>
<driver type='virtiofs' queue='1024'/>
<source socket='/tmp/sock'/>
<target dir='tag'/>
</filesystem>
...
</devices>

View File

@ -180,4 +180,5 @@ control and need to be set by the application running virtiofsd.
<filesystem type='mount'/>
<driver type='virtiofs' queue='1024'/>
<source socket='/var/virtiofsd.sock'/>
<target dir='tag'/>
</filesystem>

View File

@ -2036,8 +2036,10 @@ virDomainShmemDefValidate(const virDomainShmemDef *shmem)
static int
virDomainFSDefValidate(const virDomainFSDef *fs)
{
if (fs->dst == NULL && !fs->sock) {
if (fs->dst == NULL) {
const char *source = fs->src->path;
if (!source)
source = fs->sock;
virReportError(VIR_ERR_NO_TARGET,
source ? "%s" : NULL, source);

View File

@ -29,6 +29,7 @@
<filesystem type='mount'>
<driver type='virtiofs' queue='1024'/>
<source socket='/tmp/sock'/>
<target dir='tag'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</filesystem>
<input type='mouse' bus='ps2'/>