I wonder if there is a way to for xen to run script after guess is shutdown. I would like to pass sound card from linux to hvm guess and then when hvm guest is shutdown back to linux. Script can unload all usb modules and assign to hvm and back. #!/bin/bash if [ $# -ne 2 ]; then echo "Require PCI devices in format: <domain>:<bus>:<slot>.<function>" echo "Eg: $(basename $0) device_name 0000:00:1b.0" exit 1 fi devicename=$1 pcidev=$2 for pcidev in $@; do if [ -h /sys/bus/pci/devices/"$pcidev"/driver ]; then echo "Unbinding $pcidev from" $(basename $(readlink /sys/bus/pci/devices/"$pcidev"/driver)) echo -n "$pcidev" > /sys/bus/pci/devices/"$pcidev"/driver/unbind fi echo "Binding $pcidev to $devicename" echo -n "$pcidev" > /sys/bus/pci/drivers/$devicename/bind echo -n "$pcidev" > /sys/bus/pci/drivers/$devicename/new_slot done _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users