[Bug 830675] New: VM do not do savestate when shutdown the host-machine.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c0 Summary: VM do not do savestate when shutdown the host-machine. Classification: openSUSE Product: openSUSE Factory Version: 13.1 Milestone 3 Platform: x86-64 OS/Version: SUSE Other Status: NEW Severity: Critical Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: marcelolemos@adinet.com.uy QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 You can do VBoxManage manually but vboxes.services do not work. # rcvboxes status Virtualbox machines: no virtual machines running. skipped vboxes.service - LSB: Autostart Virtual Box VMs Loaded: loaded (/etc/init.d/vboxes) Active: inactive (dead) since lun 2013-07-22 22:38:01 UYT; 22min ago Process: 4670 ExecStop=/etc/init.d/vboxes stop (code=exited, status=0/SUCCESS) Process: 4646 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS) Reproducible: Always Steps to Reproduce: 1. Follow the virtualbox steps "autostart" http://www.virtualbox.org/manual/ch09.html#autostart-linux 2. Start a vm make it run anyting (like top or write on the tty), then save and start it again. 3. reboot the host, and check the VM state is the same as I left it, before reboot the guest. Actual Results: The VM start from scratch. or aborted. Savestate does not work. Expected Results: same as in openSUSE 11.3 (x86_64). I works all the machines whit only write the VM name and the owner in /etc/sysconfig/vbox. VBOX_AUTOSTART="test-machine;root" Same bug on 12.1, 12.2, 12.3 or I don't know how to use it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c1 --- Comment #1 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-07-22 17:21:31 UTC --- # rpm -q virtualbox virtualbox-4.2.14-2.2.x86_64 forgot to add that. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c FeiXiang Zhang <fxzhang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |mseben@gmail.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c2 Andrey Borzenkov <arvidjaar@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arvidjaar@gmail.com --- Comment #2 from Andrey Borzenkov <arvidjaar@gmail.com> 2013-07-26 07:09:47 UTC --- Please as root 1. enable systemd debug output: /usr/bin/kill -SIGRTMIN+22 1 2. Try to start virtualbox script rcvboxes start 3. Dump log for current boot journalctl -b > /tmp/vboxes.log Attach vboxes.log You can also reset debug output back after that /usr/bin/kill -SIGRTMIN+23 1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c3 --- Comment #3 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-07-26 12:37:26 UTC --- Created an attachment (id=549729) --> (http://bugzilla.novell.com/attachment.cgi?id=549729) log from milestone 3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c4 --- Comment #4 from Andrey Borzenkov <arvidjaar@gmail.com> 2013-07-27 03:56:46 UTC --- Your log shows that immediately after VMs are started "vboxes stop" is invoked. Did you manually invoke "rcvboxes stop" or "systemctl stop vboxes.service"? jul 26 18:30:08 linux-mh9j systemd[11556]: Executing: /etc/init.d/vboxes start jul 26 18:30:08 linux-mh9j vboxes[11556]: Starting Virtualbox machines: suse_12.3 (user: root) .. jul 26 18:30:08 linux-mh9j vboxes[11556]: Virtual machine: suse_12.3 (user: root) is already running..done .. jul 26 18:30:08 linux-mh9j systemd[1]: vboxes.service got final SIGCHLD for state start jul 26 18:30:08 linux-mh9j systemd[1]: About to execute: /etc/init.d/vboxes stop .. jul 26 18:30:08 linux-mh9j systemd[11580]: Executing: /etc/init.d/vboxes stop .. jul 26 18:30:08 linux-mh9j vboxes[11580]: Shutting down Virtualbox machines: suse_12.3 (user: root) Could you attach output of "systemctl show vboxes.service"? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c5 Marcelo Lemos <marcelolemos@adinet.com.uy> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marcelolemos@adinet.com.uy --- Comment #5 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-07-29 13:02:20 UTC --- I notice that... "Your log shows that immediately after VMs are started "vboxes stop" is invoked. Did you manually invoke "rcvboxes stop" or "systemctl stop vboxes.service"?" .. but I did not run it manually. will add "systemctl show vboxes.service" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c6 --- Comment #6 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-07-29 13:05:49 UTC --- Created an attachment (id=549906) --> (http://bugzilla.novell.com/attachment.cgi?id=549906) attacment of systemctl show vboxes.service -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c7 Andrey Borzenkov <arvidjaar@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |marcelolemos@adinet.com.uy --- Comment #7 from Andrey Borzenkov <arvidjaar@gmail.com> 2013-07-29 15:52:09 UTC --- OK, so what happens here is - default behavior for sysvinit script is RemainAfterExit=yes - /etc/init.d/vboxes launches command(s) to start VMs in background and exits - systemd assumes scripts started daemon and resets RemainAfterExit to no - command(s) to start VM exit so systemd thinks service has stopped and executes stop command I think the most simple way to fix it is to add hint to initscript (I do not see any advantage in adding service that just calls initscript). Please try to add X-Systemd-RemainAfterExit: true Between lines ### BEGIN INIT INFO and ### END INIT INFO run "systemctl daemon-reload" and try to start with "rcvboxes start" again. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c8 --- Comment #8 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-07-29 17:54:04 UTC --- Andrey; When I added just plain "X-Systemd-RemainAfterExit: true" I couldn't get this work. linux-mh9j:~ # vi /etc/init.d/vboxes linux-mh9j:~ # systemctl --system daemon-reload linux-mh9j:~ # systemctl restart vboxes inux-mh9j:~ # systemctl status vboxes vboxes.service - LSB: Autostart Virtual Box VMs Loaded: loaded (/etc/init.d/vboxes) Active: inactive (dead) since lun 2013-07-29 23:27:09 UYT; 3min 16s ago Process: 3712 ExecStop=/etc/init.d/vboxes stop (code=exited, status=0/SUCCESS) Process: 3672 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS) jul 29 23:27:08 linux-mh9j su[3698]: (to root) root on (null) jul 29 23:27:08 linux-mh9j su[3698]: pam_unix(su:session): session opened for user root by (uid=0) jul 29 23:27:08 linux-mh9j vboxes[3672]: Starting virtual machine: suse_12.3 (user: root)..done jul 29 23:27:08 linux-mh9j systemd[1]: Started LSB: Autostart Virtual Box VMs. jul 29 23:27:08 linux-mh9j su[3707]: (to root) root on (null) jul 29 23:27:08 linux-mh9j su[3707]: pam_unix(su:session): session opened for user root by (uid=0) jul 29 23:27:09 linux-mh9j vboxes[3712]: /etc/init.d/vboxes: line 18: X-Systemd-RemainAfterExit:: comm...ound jul 29 23:27:09 linux-mh9j su[3727]: (to root) root on (null) jul 29 23:27:09 linux-mh9j su[3727]: pam_unix(su:session): session opened for user root by (uid=0) jul 29 23:27:09 linux-mh9j vboxes[3712]: Shutting down Virtualbox machines: no virtual machines runnin...pped On the other hand, when I run "systemctl restart vboxes" only go half the way (only save the VM save) but does not start the VM again. when I comment the line: "# X-Systemd-RemainAfterExit: true" linux-mh9j:~ # vi /etc/init.d/vboxes linux-mh9j:~ # systemctl --system daemon-reload linux-mh9j:~ # systemctl restart vboxes linux-mh9j:~ # systemctl status vboxes vboxes.service - LSB: Autostart Virtual Box VMs Loaded: loaded (/etc/init.d/vboxes) Active: active (exited) since lun 2013-07-29 23:31:40 UYT; 2s ago Process: 4059 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS) jul 29 23:31:40 linux-mh9j systemd[1]: Starting LSB: Autostart Virtual Box VMs... jul 29 23:31:40 linux-mh9j vboxes[4059]: Starting Virtualbox machines: suse_12.3 (user: root) jul 29 23:31:40 linux-mh9j su[4073]: (to root) root on (null) jul 29 23:31:40 linux-mh9j su[4073]: pam_unix(su:session): session opened for user root by (uid=0) jul 29 23:31:40 linux-mh9j vboxes[4059]: Virtual machine: suse_12.3 (user: root) is already running..done jul 29 23:31:40 linux-mh9j systemd[1]: Started LSB: Autostart Virtual Box VMs. this actually works, anyway I did test it again with no good results. Any other Idea? regards, Marcelo -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c9 --- Comment #9 from Andrey Borzenkov <arvidjaar@gmail.com> 2013-07-29 18:16:47 UTC --- (In reply to comment #8)
"# X-Systemd-RemainAfterExit: true"
Yes, it had to be comment, of course.
linux-mh9j:~ # vi /etc/init.d/vboxes linux-mh9j:~ # systemctl --system daemon-reload linux-mh9j:~ # systemctl restart vboxes linux-mh9j:~ # systemctl status vboxes vboxes.service - LSB: Autostart Virtual Box VMs Loaded: loaded (/etc/init.d/vboxes) Active: active (exited) since lun 2013-07-29 23:31:40 UYT; 2s ago Process: 4059 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS)
So it looks good.
jul 29 23:31:40 linux-mh9j vboxes[4059]: Virtual machine: suse_12.3 (user: root) is already running..done
this actually works, anyway I did test it again with no good results.
I do not understand - what works and what has no good results? What happens when you reboot with modified vboxes script that includes # X-Systemd-RemainAfterExit: true ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c10 --- Comment #10 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-07-29 18:38:39 UTC --- whith "# X-Systemd-RemainAfterExit: true" vboxes looks like it works (manually). If I run "systemctl stop vboxes" the VM saves state correctly. If I run "systemctl start vboxes" the VM start from saves state correctly. If I run "systemctl restart vboxes" the VM saves state & starts correctly. If I restart the host...this does not happend as intented. I check the VM (after host reboot) and notice that the machine is not running from last savestate, instead, it starts from scratch. sorry my english. regards, Marcelo -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c11 --- Comment #11 from Andrey Borzenkov <arvidjaar@gmail.com> 2013-08-25 07:28:36 UTC --- Could you attach output of "journalctl _SYSTEMD_UNIT=vboxes.service"? Also enable systemd debug (/usr/bin/kill -SIGRTMIN+22 1) reboot and attach output of "journalctl --since TIMR-BEFOR-REBOOT" like bor@opensuse:~> /usr/bin/kill -SIGRTMIN+22 1 bor@opensuse:~> date +"%F %T" 2013-08-25 11:26:56 .. reboot ... after reboot bor@opensuse:~> journalctl --since "2013-08-25 11:26:56" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c12 --- Comment #12 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-08-26 15:18:24 UTC --- log.systemunit is the first attachment. log.journal is the the second. if you want, I could let you login the PC's, so you can test without waiting for us to reply, the PC is configured with a static IP, maybe that could help much more, and we could work arround the issue faster. ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c13 --- Comment #13 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-08-26 15:21:00 UTC --- Created an attachment (id=554253) --> (http://bugzilla.novell.com/attachment.cgi?id=554253) journalctl --since "2013-08-26 21:05:14" > log.journal -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c14 --- Comment #14 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-08-26 15:22:09 UTC --- Created an attachment (id=554254) --> (http://bugzilla.novell.com/attachment.cgi?id=554254) journalctl _SYSTEMD_UNIT=vboxes.service > log.systemdunit -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c15 --- Comment #15 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-09-27 14:21:20 UTC --- Details vboxes on openSUSE 13.1 Beta 1 (x86_64) --------------------------------------------------------------------- rpm -q virtualbox virtualbox-4.2.18-1.1.x86_64 --------------------------------------------------------------------- what I have done: only added the vm to the file "/etc/sysconfig/vbox" (used to work on opensuse 11.3) linux-ka1i:~ # cat /etc/sysconfig/vbox VBOX_AUTOSTART="opensuse;root" --------------------------------------------------------------------- when host boot up: Last login: Fri Sep 27 19:07:01 2013 from dartmouth.site Have a lot of fun... linux-ka1i:~ # systemctl status vboxes.service vboxes.service - LSB: Autostart Virtual Box VMs Loaded: loaded (/etc/init.d/vboxes) Active: inactive (dead) since vie 2013-09-27 19:13:47 UYT; 3min 45s ago Process: 2419 ExecStop=/etc/init.d/vboxes stop (code=exited, status=0/SUCCESS) Process: 2350 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS) sep 27 19:13:47 linux-ka1i su[2372]: pam_unix(su:session): session opened for user root...=0) sep 27 19:13:47 linux-ka1i su[2404]: (to root) root on (null) sep 27 19:13:47 linux-ka1i su[2404]: pam_unix(su:session): session opened for user root...=0) sep 27 19:13:47 linux-ka1i vboxes[2350]: Starting virtual machine: opensuse (user: root...one sep 27 19:13:47 linux-ka1i systemd[1]: Started LSB: Autostart Virtual Box VMs. sep 27 19:13:47 linux-ka1i su[2413]: (to root) root on (null) sep 27 19:13:47 linux-ka1i su[2413]: pam_unix(su:session): session opened for user root...=0) sep 27 19:13:47 linux-ka1i su[2433]: (to root) root on (null) sep 27 19:13:47 linux-ka1i su[2433]: pam_unix(su:session): session opened for user root...=0) sep 27 19:13:47 linux-ka1i vboxes[2419]: Shutting down Virtualbox machines: no virtual ...ped Hint: Some lines were ellipsized, use -l to show in full. linux-ka1i:~ # --------------------------------------------------------------------- but the vm is running linux-ka1i:~ # VBoxManage list runningvms "opensuse" {8c3782e7-d49e-4acd-9194-32859e8db379} --------------------------------------------------------------------- Small explanation: On 11.3 if a do a shut down of the host all the vm do savestate before the host is poweroff. On 12.1/2/3 - 13.1 this the vm rebooted along the host (savestate does not work). --------------------------------------------------------------------- Debuggin only with the "/etc/sysconfig/vbox" configuration. --------------------------------------------------------------------- sr/bin/kill -SIGRTMIN+22 1 linux-ka1i:~ # systemctl start vboxes.service çQt WARNING: libpng warning: iCCP: known incorrect sRGB profile Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile linux-ka1i:~ # çQt WARNING: libpng warning: iCCP: known incorrect sRGB profile Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile -bash: $'\303\247': no se encontró la orden linux-ka1i:~ # journalctl -b > /tmp/vboxes.log linux-ka1i:~ # /usr/bin/kill -SIGRTMIN+23 1 linux-ka1i:~ # date +"%F %T" 2013-09-27 19:41:19 (reboot) linux-ka1i:~ # journalctl --since "2013-09-27 19:41:19" > /tmp/reboot_vbox.log --------------------------------------------------------------------- Now will add all the steps of the new configuration propousal from virtualbox how-to (http://www.virtualbox.org/manual/ch09.html#autostart-linux) Removing /etc/sysconfig/vbox config first! --------------------------------------------------------------------- Edit the file /etc/default/virtualbox I'm only setting up the shutdown method I need. cat /etc/default/virtualbox # /etc/default/virtualbox # # ------------------------------------------------------------------------------------------------- # In the "SHUTDOWN_USERS" list all users for which a check for runnings VMs should be done during # shutdown of "vboxdrv" resp. the server: # SHUTDOWN_USERS="foo bar" # # Set "SHUTDOWN" to one of "poweroff", "acpibutton" or "savestate" depending on which of the # shutdown methods for running VMs are wanted: # SHUTDOWN="poweroff" # SHUTDOWN="acpibutton" # SHUTDOWN="savestate" # ------------------------------------------------------------------------------------------------- # SHUTDOWN_USERS="root" SHUTDOWN="savestate" --------------------------------------------------------------------- restarted vboxes: linux-ka1i:~ # /usr/bin/kill -SIGRTMIN+24 1 linux-ka1i:~ # systemctl restart vboxes.service linux-ka1i:~ # journalctl -b > /tmp/vboxes.new.log linux-ka1i:~ # /usr/bin/kill -SIGRTMIN+25 1 linux-ka1i:~ # date +"%F %T" 2013-09-27 20:05:01 linux-ka1i:~ # VBoxManage list runningvms "opensuse" {8c3782e7-d49e-4acd-9194-32859e8db379} (reboot) linux-ka1i:/tmp # journalctl --since "2013-09-27 20:05:01" > /tmp/reboot_vbox.new.log --------------------------------------------------------------------- save the logs in vbox01 (with old config) and vbox02 (with the new ones). regards Marcelo. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c16 --- Comment #16 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-09-27 14:22:28 UTC --- Created an attachment (id=560582) --> (http://bugzilla.novell.com/attachment.cgi?id=560582) with old configuration of virtualbox -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=830675 https://bugzilla.novell.com/show_bug.cgi?id=830675#c17 --- Comment #17 from Marcelo Lemos <marcelolemos@adinet.com.uy> 2013-09-27 14:23:04 UTC --- Created an attachment (id=560583) --> (http://bugzilla.novell.com/attachment.cgi?id=560583) the new configuration -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com