[ovirt-users] vdsm-hook

Dan Kenigsberg danken at redhat.com
Tue Aug 19 10:58:49 UTC 2014


On Tue, Aug 19, 2014 at 09:04:59AM +0100, Dan Kenigsberg wrote:
> On Mon, Aug 18, 2014 at 01:03:46PM +0300, mhd wrote:
> > i want to disable ticket in spice protocol so i should use vdsm hook for
> > edit xml. this is my script and i want to run in all vm, i mean i don't
> > need custom probreties , no error found in vdsm log and vm is work but
> > nothing happened for disable ticket i try another attribute as example
> > 'type' i put vnc instend of spice and nothing happened stay  spice ....
> > 
> > what i must do ???
> > 
> > this my script:
> > 
> > #!/usr/bin/python
> > 
> > import os
> > import sys
> > import hooking
> > import traceback
> > 
> > try:
> >             domxml = hooking.read_domxml()
> >             graphics = domxml.getElementsByTagName('graphics')[0]
> >             graphics.setAttribute('disable-ticketing','true')
> >             hooking.write_domxml(domxml)
> > except:
> >        sys.stderr.write('ticket: [unexpected error]: %s\n' %
> > traceback.format_exc())
> >        sys.exit(2)
> > 
> > i search in libvirt xml about disable-ticketing schema but i don't found
> > http://libvirt.org/formatdomain.html

Oh - that's because it does not exist. Instead, you should drop the
passwdValidTo and passwd attributes from the <graphics> element.

> > 
> > 
> > i need disable ticket because i want use thin client hardware which connect
> > by spice protocol but i donn't want every connection create ticket by
> > computer machine..
> 
> Have you placed this executable under
> usr/libexec/vdsm/hooks/after_vm_set_ticket ? When you open a VM display,
> do you see attempts to call this script in vdsm.log?
> 
> Dan



More information about the Users mailing list