I wrote this a couple of weeks ago but I hadn’t had a chance to test it in real use until yesterday:
It assumes you’ve created groups for your vhosts using this:
Then you run:
func-vhost-reboot fqdn-of-virthost [@virthost-group]
It connects to all of the guests on the virthost, looks to see if there are any users logged in and displays that info if there is. Then it asks you to confirm halting the guests. It waits for them to halt. Then it reboots the virthost and waits for it to come back up. Once it is back up it confirms that the guests have returned in the same state as they were before they were halted. I did a bunch of tests on it yesterday and it worked pretty well.
Take a look.