diff --git a/virt/libvirt/libvirt/hooks/qemu b/virt/libvirt/libvirt/hooks/qemu index 469105bd9..a1da758df 100755 --- a/virt/libvirt/libvirt/hooks/qemu +++ b/virt/libvirt/libvirt/hooks/qemu @@ -1,24 +1,11 @@ #!/bin/bash # -# Copyright (c) 2017 Wind River Systems, Inc. +# Copyright (c) 2019 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # This script logs to user.log # -# An instance with vTPM enable will have a QEMU config section in its XML file. -# e.g. -# -# -# -# -# -# -# -# -# -# For more information see the vTPM HLD in /folk/cgts/docs/security/ -# # The script is called with the following parameters # e.g. /etc/libvirt/hooks/qemu # @@ -79,49 +66,5 @@ if [ "${OPERATION}" == "prepare begin -" ] || [ "${OPERATION}" == "stopped end - fi fi -VTPM_OPER="" - -if [ "$OPERATION" == "prepare begin -" ]; then - - # Get the instance's uuid - UUID=$(echo $XML_DATA | grep -oP '(?<=).*?(?=)') - if [ -z "$UUID" ]; then - # This should not happen - logger -p err -t $0 "Failed to retrieve uuid for guest $GUEST_NAME" - exit 1 - fi - - # Grab the qemu line "&1 > /dev/null - rc=$? - if [[ $rc != 0 ]]; then - logger -p err -t $0 "setup_vtpm failed with return value $rc for device $VTPM and guest $UUID" - # Do not return error if we were just doing a clear - if [ "$VTPM_OPER" != "clear" ]; then - exit 1; - fi - fi - -fi - exit 0