[ovirt-users] vdsm-hook
mhd
aymanrifai000000 at gmail.com
Mon Aug 18 04:21:02 EDT 2014
hi...
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:
script file is called: ticket
!/usr/bin/python
import os
import sys
import hooking
import traceback
try:
domxml = hooking.read_domxml()
display.setAttribute('disable-ticketing')
hooking.write_domxml(domxml)
except:
sys.stderr.write('ticket: [unexpected error]: %s\n' %
traceback.format_exc())
sys.exit(2)
the error is:
hread-50::DEBUG::2014-08-18 08:15:24,502::utils::642::root::(execCmd)
'/usr/libexec/vdsm/hooks/before_vm_start/ticket' (cwd None)
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
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140818/329db16f/attachment.html>
More information about the Users
mailing list