OpenVZ Forum


Home » Mailing lists » Users » Resume on restart?
Resume on restart? [message #23520] Mon, 19 November 2007 14:51
Dariush Pietrzak is currently offline  Dariush Pietrzak
Messages: 40
Registered: November 2007
Member
From: openvz.org
What do you think about something like this in startup scripts:

--- /etc/init.d/vz      2007-01-27 23:22:29.000000000 +0100
+++ vz-with-resume      2007-11-19 15:48:56.610649500 +0100
@@ -224,8 +224,14 @@
                                        need_restart="${need_restart} ${veid}"
                                fi
                        fi
+                       if [ -e /var/tmp/Dump.$veid ] 
+                       then
+                       startcmd=restore
+                       else
+                       startcmd=start
+                       fi
                fi
-               msg=`$VZCTL start ${veid} 2>&1`
+               msg=`$VZCTL $startcmd ${veid} 2>&1`
                if [ $? -eq 0 ]; then
                        print_success
                else

with this, kernel upgrades can be optionally performed like this:
vzctl chkpnt server01
vzctl chkpnt server02
...
reboot

-- 
Key fingerprint = 40D0 9FFB 9939 7320 8294  05E0 BCC7 02C4 75CC 50D9
 Total Existance Failure
Previous Topic: loop device and filesystems in VEs
Next Topic: venet0: hw csum failure.
Goto Forum:
  


Current Time: Wed Dec 12 13:02:17 GMT 2018