VMware Cloud Community
DwyaneWade
Contributor
Contributor

suspend VM

when suspend button gets clicked, how does guest OS know suspend event is triggered? is there vmtools script?

but I tried with my guest OS without vmtools installed, suspend button still works.

thank you very much~

Reply
0 Kudos
5 Replies
nielse
Expert
Expert

When you suspend a virtual machine, a file with a .vmss extension is created. This file contains the entire state of the virtual machine. When you resume the virtual machine, its state is restored from the .vmss file.

@nielsengelen - http://foonet.be - VCP4/5
Reply
0 Kudos
DwyaneWade
Contributor
Contributor

Thank you nielse,

do you know which script will be called when suspend gets triggered and then it will create the .vmss file? I need to know the code which grabs the suspend event.

Reply
0 Kudos
weinstein5
Immortal
Immortal

VMware suspend is independent of the OS that is why it still works without VMware tools installed - its is a feature of the ESXi server basically freezing the VM and wiriting all pending instructions to disk - when the VM is unsuspended the instructions are cued back to the vcpu

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
DwyaneWade
Contributor
Contributor

Hi weinstein5,

Nice explanation, so you mean guest OS cannot know the suspend is triggered? in our guest OS, I plan to do some operations when suspend is triggered. If there is a way for guest OS to know the suspend is triggered, I can do something on the event handler.

Thank you very much for your great explanation.

Reply
0 Kudos
weinstein5
Immortal
Immortal

You should be able to script that will execute a commend within the vm and then initiate the suspend  - you might post a question in the automation tools section of VMTN

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos