<div dir="rtl"><div dir="ltr">hi...<br><br></div><div dir="ltr">i want apply this script on all vm on my host but found error when start vm i put my script file in before_vm_start:<br><br></div><div dir="ltr">script file is called: ticket<br>
<br><br></div><div dir="ltr">!/usr/bin/python<br><br>import os<br>import sys<br>import hooking<br>import traceback<br><br> try:<br> domxml = hooking.read_domxml()<br> display.setAttribute('disable-ticketing')<br>
hooking.write_domxml(domxml)<br><br><br> except:<br> sys.stderr.write('ticket: [unexpected error]: %s\n' % traceback.format_exc())<br> sys.exit(2)<br><br></div><div dir="ltr"><br><br>the error is:<br>
<br><br>hread-50::DEBUG::2014-08-18 08:15:24,502::utils::642::root::(execCmd) '/usr/libexec/vdsm/hooks/before_vm_start/ticket' (cwd None)<br>Thread-50::DEBUG::2014-08-18 08:15:24,522::utils::662::root::(execCmd) FAILED: <err> = ' File "/usr/libexec/vdsm/hooks/before_vm_start/ticket", line 8\n try:\n ^\nIndentationError: unexpected indent\n'; <rc> = 1<br>
Thread-50::INFO::2014-08-18 08:15:24,522::hooks::100::root::(_runHooksDir) File "/usr/libexec/vdsm/hooks/before_vm_start/ticket", line 8<br><br><br></div></div>