i want add sound card to domain xml when guest start,after google,i found libvirt provide hook function.i follow the instruction to make a python,and boot a guest,but after use "virsh edit" its still dont have sound card config/etc/libvirt/hooks/qemu:#!/usr/bin/pythonimport sysimport reimport oshooklog = '/tmp/hook.log'log = open(hooklog, 'w')stdinxml = sys.stdin.readlines()if sys.argv[2] == 'start':log.write("hook start,domain name: %s \n" % sys.argv[1])maxslot=-1for line in stdinxml:slotm = re.search("slot='(?P<slotnum>0x[0-9a-fA-F]{2})'", line)if slotm:slotnum = int(slotm.group('slotnum'),0)if slotnum > maxslot:maxslot = slotnumif '</devices>' in line:log.write("insert sound card config \n")slotnum = maxslot + 1line = " <sound model='ich6'>\n"line = line + " <address type='pci' domain='0x0000' bus='0x00' slot='0x%0.2X' function='0x0'/>\n" % slotnumline = line + " </sound>\n"line = line + " </devices>\n"stdoutxml = ''.join(line)sys.stdout.write(stdoutxml)tail -f /tmp/hook.log:hook start,domain name: instance-00000222insert sound card configtail /var/log/libvirt/libvirtd.log:2014-04-16 07:13:39.159+0000: 52199: warning : qemuDomainObjTaint:1377 : Domain id=81 name='instance-00000222' uuid=974d62b7-f316-4f20-a91c-d11cb85980fe is tainted: high-privilegesin these log,hook script seems to executed,but not effective.can anyone tell me where is wrong?