Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to promote a resource configuration change during VM reboot cycle. Preferably, I'd like to do that without user intervention, as in: I ask the VM to reboot, and between the shutdown and the start, the VM resource change is performed by a script.

However, I haven't been able to find a decent hook to execute that script.

Does such a hook exist?

I'm using win2008 Datacenter R2. I don't have access to the VM internals (we rent it out to a customer), but of course I do have full control over the host.

share|improve this question

I do not know of such a hook, but I am not a Hyper-V expert either.

Would you be able to use a PowerShell script to accomplish the same thing? The PowerShell Management Library for Hyper-V should allow you to write a script that shuts down the VM, reconfigures it however you like, and then restarts it.

share|improve this answer
This is indeed a possible route, but it requires us to reboot the system, outside of the customer's control. – Koert Apr 1 '11 at 6:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.