*SOLVED* Is there a way to "suspend" a VE? [message #13553] |
Tue, 29 May 2007 23:11 |
kingneutron
Messages: 30 Registered: May 2007 Location: NE IL, USA
|
Member |
|
|
--I'm pretty sure I can duplicate .vmdk disk functionality by mounting things in a loopback file if $client requires that level of security/portability.
--However: Can a VE be "suspended" temporarily? This is useful for:
o Backups
o Quick resume of VE functionality
o VE is using too much CPU or is out of control
--I'm talking about sending a VE the equivalent of SIGSTOP and SIGCONT, and/or a full suspend-state-to-disk like vmware does. (This can survive host reboots.)
TIA
[Updated on: Mon, 04 June 2007 07:11] by Moderator Report message to a moderator
|
|
|
|
|
Re: Is there a way to "suspend" a VE? [message #13556 is a reply to message #13555] |
Tue, 29 May 2007 23:34 |
rickb
Messages: 368 Registered: October 2006
|
Senior Member |
|
|
when you say suspend, do you mean on a technical or business level?
ie, suspend could mean disable/"turn off temporarily" or freeze the running processes so that the environment can be moved or otherwise started later in the same state.
I saw your point, "o VE is using too much CPU or is out of control" and I assumed you were looking for the first option.
VZ architecture terms
---------------------
disabled: VE will not start/autostart. its like unplugging the power cable.
checkpoint: snapshot data and kernel memory so that environment can be started on another or the same server later with an identical state. upon doing this, the VE is not stopped nor disallowed from starting.
-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions
UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
[Updated on: Tue, 29 May 2007 23:50] Report message to a moderator
|
|
|
Re: Is there a way to "suspend" a VE? [message #13558 is a reply to message #13556] |
Wed, 30 May 2007 00:04 |
kingneutron
Messages: 30 Registered: May 2007 Location: NE IL, USA
|
Member |
|
|
> freeze the running processes
...Can come in handy in some cases... But mostly I was looking for checkpoint/restore.
--If you can send a SIGSTOP equivalent to a running VE, and not have it crash due to I/O waits, this could be useful. i.e.:
o It stops processing events RIGHTNOW,
o Outstanding writes are SYNCed,
o Its filesystem is still mounted,
o It shows up in vzlist as "run-suspended", and
o What it was doing can be resumed immediately.
--This would be faster than a full suspend(checkpoint) and resume(restore).
--Equivalent to hitting ^Z (SIGSTOP) at the Bash prompt, so you can list jobs, issue "fg" and "bg" (could also resume with reduced-priority), etc. With a debugger attached to the VE, you could also look at what's it's doing at a deeper level (/proc and such like ' vzctl exec ' should still respond); but that's beyond my scope.
[Updated on: Wed, 30 May 2007 00:07] Report message to a moderator
|
|
|
Re: Is there a way to "suspend" a VE? [message #13577 is a reply to message #13558] |
Wed, 30 May 2007 10:47 |
Andrey Mirkin
Messages: 193 Registered: May 2006
|
Senior Member |
|
|
kingneutron wrote on Tue, 29 May 2007 20:04 |
--If you can send a SIGSTOP equivalent to a running VE, and not have it crash due to I/O waits, this could be useful. i.e.:
o It stops processing events RIGHTNOW,
o Outstanding writes are SYNCed,
o Its filesystem is still mounted,
o It shows up in vzlist as "run-suspended", and
o What it was doing can be resumed immediately.
|
It is possible just to freeze processes without writing their state to image file:
vzctl chkpnt VEID --suspend
and resume it later:
vzctl chkpnt VEID --resume
After suspend you can take snapshot of processes state:
vzctl chkpnt VEID --dump --dumpfile=PATH
Also after suspend you can just kill your VE:
As you can see "chkpnt" command is equal to sequential execution of 3 subcommands: --suspend, --dump and --kill.
Quote: |
--Equivalent to hitting ^Z (SIGSTOP) at the Bash prompt, so you can list jobs, issue "fg" and "bg" (could also resume with reduced-priority), etc. With a debugger attached to the VE, you could also look at what's it's doing at a deeper level (/proc and such like ' vzctl exec ' should still respond); but that's beyond my scope.
|
You will be able to see list of processes after you did "vzctl chkpnt VEID --suspend", but you won't be able to debug them, as all VE processes will be in the same state - they will be in kernel's refrigerator() function.
Andrey Mirkin
|
|
|
|