#!/bin/bash # # Note: libvirt hook scripts execute with uid=0(root) gid=0(root) for all # operations, i.e., started, stopped. # # TODO: re-enable after the possible libvirt deadlock is fixed. exit 0 { echo "wsargs=$@" domain_xml=$(prepare->start->started operation on the destination host. # 2. Trigger stopped->release operations on the source host. if [[ "$operation" == "started" || "$operation" == "stopped" ]] then ws_open_flag="" ws_port_flag="" ws_suuid_flag="" if [[ "$operation" == "started" ]] then ws_open_flag="--open" # Cannot call $ virsh vncdisplay... because libvirt hooks # cannot call anything related to libvirt, i.e., virsh, because # a deadlock will happen. server_vnc_port=$( grep ")[^\s]+(?=<)" <<<$domain_xml ) ws_suuid_flag="--server-uuid ${server_uuid}" local_host_uuid=$(>/var/log/anvil.log