diff --git a/libvirt/hooks/qemu.d/ws b/libvirt/hooks/qemu.d/ws index 9a611e99..3459a071 100755 --- a/libvirt/hooks/qemu.d/ws +++ b/libvirt/hooks/qemu.d/ws @@ -1,35 +1,48 @@ #!/bin/bash -echo "wsargs=$@" +{ + echo "wsargs=$@" -guest_name="$1" -operation="$2" + 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="" - - if [[ "$operation" == "started" ]] + # Operation migrate will: + # 1. Trigger migrate->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="--open" - - # 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