When using vnc gaphics over a unix socket, virt-aa-helper needs to provide
access for the qemu domain to access the sockfile.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
if (vah_add_file(&buf, ctl->def->os.loader, "r") != 0)
goto clean;
+ for (i = 0; i < ctl->def->ngraphics; i++) {
+ if (ctl->def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
+ ctl->def->graphics[i]->data.vnc.socket &&
+ vah_add_file(&buf, ctl->def->graphics[i]->data.vnc.socket, "rw"))
+ goto clean;
+ }
+
if (ctl->def->ngraphics == 1 &&
ctl->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL)
if (vah_add_file(&buf, ctl->def->graphics[0]->data.sdl.xauth,
sed -e "s,###UUID###,$uuid,g" -e "s,###DISK###,$disk1,g" "$template_xml" > "$test_xml"
testme "0" "hugepages" "-r -u $valid_uuid -F /run/hugepages/kvm/\*\*" "$test_xml"
+sed -e "s,###UUID###,$uuid,g" -e "s,###DISK###,$disk1,g" -e "s,<graphics.*>,<graphics type='vnc' socket='/var/lib/libvirt/qemu/myself.vnc'><listen type='address' address='0.0.0.0'/></graphics>,g" "$template_xml" > "$test_xml"
+testme "0" "vnc socket" "-r -u $valid_uuid" "$test_xml"
+
testme "0" "help" "-h"
echo "" >$output