After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707803 - Detection of installation from "Live" session not reliable
Detection of installation from "Live" session not reliable
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: installer
unspecified
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
: 703988 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-09 20:13 UTC by Derek Moore
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vm-creator: Don't ignore force shutdown (2.06 KB, patch)
2013-11-03 18:04 UTC, Zeeshan Ali
committed Details | Review

Description Derek Moore 2013-09-09 20:13:46 UTC
Many installers now are also live CDs. I installed "ubuntu-gnome-13.04-desktop-amd64.iso" on a VM, Boxes detected it as a "Live" VM, and now I cannot change or remove the ISO from the VM, even after Ubuntu GNOME is fully installed and booting off of the vhd (via a boot option on the ISO).

I want to deleted the installer ISO and be able to mount other ISOs as needed, but GNOME Boxes is blocking me from doing this because it is stupid at being smart.
Comment 1 Zeeshan Ali 2013-09-09 20:29:38 UTC
To be clear, you installed ubuntu on the disk image created and assigned by Boxes to the VM? Once the installation is complete, you need to reboot for Boxes to be able to see that live session created an installation. It simply checks if disk usage of the VM is more than a few KBs (nothing very smart) to determine that. If there was an installation, Boxes unmarks the 'live' status and leave the VM be but deletes it automatically if live session simply ended w/o any installation.
Comment 2 Derek Moore 2013-09-09 21:04:37 UTC
Hmm... Ok, I had rebooted several times... But I just did an "apt-get update && apt-get dist-upgrade" to install a new kernel, and after THAT reboot I can finally change the CD/DVD device.

Not sure what's up, but it didn't work for several reboots.
Comment 3 Derek Moore 2013-09-09 21:07:40 UTC
Also, it did not work for several quits and re-opens of Boxes. Both forced-shutdowns on VM and quit and reopen and leave-running and quit and reopen.
Comment 4 Derek Moore 2013-09-09 21:11:27 UTC
So... For me: Live status was stuck, but installation to disk was successful and disk was not deleted, and I could boot from the disk from the ISO boot menu to "boot from first hard disk". The reboot after dist-upgrade finally skipped booting the ISO and directly booted from the vhd.
Comment 5 Bastien Nocera 2013-10-31 11:17:53 UTC
(In reply to comment #1)
> To be clear, you installed ubuntu on the disk image created and assigned by
> Boxes to the VM? Once the installation is complete, you need to reboot for
> Boxes to be able to see that live session created an installation.

That didn't work for me, after installing a RHEL image. What debug should I get?
Comment 6 Zeeshan Ali 2013-11-02 16:27:43 UTC
(In reply to comment #5)
> (In reply to comment #1)
> > To be clear, you installed ubuntu on the disk image created and assigned by
> > Boxes to the VM? Once the installation is complete, you need to reboot for
> > Boxes to be able to see that live session created an installation.
> 
> That didn't work for me, after installing a RHEL image. What debug should I
> get?

There is a 'Troubleshooting log' option in properties. As starter, you can provide the output there.
Comment 7 Zeeshan Ali 2013-11-03 16:14:58 UTC
Hmm.. I can reproduce this issue with Ubuntu. The problem is that Ubuntu asks you to eject the cdrom before rebooting and since Boxes doesn't allow that, you can only force shutdown the VM. However Boxes doesn't do the 'install detection' on force shutdowns anymore as a fix for bug#685846.
Comment 8 Zeeshan Ali 2013-11-03 18:04:41 UTC
Created attachment 258873 [details] [review]
vm-creator: Don't ignore force shutdown

Instead of completing ignoring force shutdown and not checking for
installations at all, just don't automatically delete live VMs on force
shutdown when no installation is performed by last live session.

Some OSes (e.g Ubuntu) require you to eject the CDROM before rebooting
after installation. Since we don't allow that during installation/live
session (see commit 4bed1f5 or bug#690779 for details on why), only
option user has is to work around this by force shutting down the VM and
that won't actually work w/o this change as VM will continue to be
marked as 'live'.
Comment 9 Zeeshan Ali 2013-11-03 18:05:35 UTC
The attached patch in comment#8 solves the issue for me or at least allows for the easy work around.
Comment 10 Bastien Nocera 2013-11-03 21:30:07 UTC
That's probably what happened, as I remember the Live installation failing to shutdown.
Comment 11 Zeeshan Ali 2013-11-04 15:31:50 UTC
Attachment 258873 [details] pushed as 13a45cc - vm-creator: Don't ignore force shutdown

Ok, I'll push this now but I wonder if there could be a better fix. Maybe instead of stopping user from ejecting the source media during installation/live session, we should warn them instead?
Comment 12 Zeeshan Ali 2013-12-20 13:40:24 UTC
*** Bug 703988 has been marked as a duplicate of this bug. ***