The "once" parameter does not work with "-boot"

Bug #719448 reported by Deric Sullivan
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Fix Released
Low
Serge Hallyn
Lucid
Fix Released
Undecided
Unassigned
Maverick
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: qemu-kvm

Package: qemu-kvm

The "once" parameter does not seem to work with the "-boot" option.

To reproduce:
create an image file to be used as a hard disk:
qemu-img create test-img 1G

Starting a VM guest using "once" + "order" ignores the "once":
/usr/bin/qemu-system-x86_64 -hda test-img -m 4G -smp 2 -enable-kvm -vnc 127.0.0.1:1 -name test-vm -boot order=c,once=n

Starting a VM guest using "once" ignores the "once":
/usr/bin/qemu-system-x86_64 -hda test-img -m 4G -smp 2 -enable-kvm -vnc 127.0.0.1:1 -name test-vm -boot once=n

Starting a VM guest without "once" works fine:
/usr/bin/qemu-system-x86_64 -hda test-img -m 4G -smp 2 -enable-kvm -vnc 127.0.0.1:1 -name test-vm -boot order=n

# lsb_release -rd
Description: Ubuntu 10.04.2 LTS
Release: 10.04
# apt-cache policy qemu-kvm
qemu-kvm:
  Installed: 0.12.3+noroms-0ubuntu9.3
  Candidate: 0.12.3+noroms-0ubuntu9.3

Thanks for the help, Deric

=================================
SRU justification:
=================================

Impact: users (and management software) cannot use a single qemu command to boot the first time from install media (network or cdrom) and afterward from hard disk.

How addressed: the bug is fixed upstream. The relevant code was patched to match the upstream code.

Patch: see the associated bzr tree

TEST CASE: Install a valid OS, say lucid, on disk.img Download a valid ISO, say natty-server-amd64.iso. Then run:

kvm -hda disk.img -cdrom natty-server-amd64.so -boot once=d

It will boot from hard disk

5. Regression potential: The code which was updated affects only the 'once' and 'order' options to the '-boot' flag. Regressions could cause advanced users to boot from the wrong device. For that matter, any users who are mis-using these flags could end up with different (correct) results.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hm,

on a fresh install of 10.04.2 server, I did:

kvm -hda natty.img -cdrom natty-server-amd64.iso -m 1024M -smp 2 -vnc :1 -boot once=d

It proceeded to install, reboot, and then boot from hard disk.

I wonder whether this is particular to net-booting.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ah, I see. If there is a valid OS on the hard drive, then it will boot from the hard drive and ignore the 'once='.

Changed in qemu-kvm (Ubuntu):
status: New → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Does not happen in natty.

Changed in qemu-kvm (Ubuntu):
importance: Undecided → Low
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I waffled on priority because I was uncertain about a good workaround. However,

-boot priority=cn

seems to do the trick, so marking this low priority (unless I hear of a reason why that workaround is insufficient).

Changed in qemu-kvm (Ubuntu):
importance: Low → High
importance: High → Low
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

With the tree at
https://code.launchpad.net/~serge-hallyn/ubuntu/lucid/qemu-kvm/fix-boot-once/

'boot once=d' works correctly for me. The package is building at ppa:serge-hallyn/virt.

I'm pushing the amd64 debs to the bug here. If you're on amd64, please test and let me know if they also work for you.

Changed in qemu-kvm (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Natty version is unaffected, so marking fix released for there.

Changed in qemu-kvm (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Please forget about the ppa and just test the packages in the tarball, thank.

Revision history for this message
Deric Sullivan (deric-sullivan) wrote : Re: [Bug 719448] Re: The "once" parameter does not work with "-boot"

Hi Serge,

     Thanks for looking into this.

     I am using amd64 so I'll try out the fix.
     Using "once" did not work for me even if there wasn't a valid OS on
the hard drive.
     I'm OK with an importance of "low", I was using the workaround of
simply stopping the qemu-kvm after the first boot of "-boot order=n" and
starting it again with "-boot order=c". I'll check out your workaround
of "-boot priority=cn" although I was not even aware of the "priority"
parameter - I don't see it in the man page.

Thanks,
Deric

On 02/17/11 18:01, Serge Hallyn wrote:
> With the tree at
> https://code.launchpad.net/~serge-hallyn/ubuntu/lucid/qemu-kvm/fix-boot-once/
>
> 'boot once=d' works correctly for me. The package is building at ppa
> :serge-hallyn/virt.
>
> I'm pushing the amd64 debs to the bug here. If you're on amd64, please
> test and let me know if they also work for you.
>
> ** Changed in: qemu-kvm (Ubuntu)
> Status: Confirmed => In Progress
>
> ** Changed in: qemu-kvm (Ubuntu)
> Assignee: (unassigned) => Serge Hallyn (serge-hallyn)
>

Revision history for this message
Deric Sullivan (deric-sullivan) wrote :

Thanks, that fixed the problem. Will that fix make it into "lucid-updates"?

Deric

On 02/17/11 18:40, Deric Sullivan wrote:
> Hi Serge,
>
> Thanks for looking into this.
>
> I am using amd64 so I'll try out the fix.
> Using "once" did not work for me even if there wasn't a valid OS
> on the hard drive.
> I'm OK with an importance of "low", I was using the workaround of
> simply stopping the qemu-kvm after the first boot of "-boot order=n"
> and starting it again with "-boot order=c". I'll check out your
> workaround of "-boot priority=cn" although I was not even aware of the
> "priority" parameter - I don't see it in the man page.
>
> Thanks,
> Deric
>
> On 02/17/11 18:01, Serge Hallyn wrote:
>> With the tree at
>> https://code.launchpad.net/~serge-hallyn/ubuntu/lucid/qemu-kvm/fix-boot-once/
>>
>>
>> 'boot once=d' works correctly for me. The package is building at ppa
>> :serge-hallyn/virt.
>>
>> I'm pushing the amd64 debs to the bug here. If you're on amd64, please
>> test and let me know if they also work for you.
>>
>> ** Changed in: qemu-kvm (Ubuntu)
>> Status: Confirmed => In Progress
>>
>> ** Changed in: qemu-kvm (Ubuntu)
>> Assignee: (unassigned) => Serge Hallyn (serge-hallyn)
>>

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Quoting Deric Sullivan (<email address hidden>):
> Thanks, that fixed the problem. Will that fix make it into "lucid-
> updates"?

Great, thanks for testing. Yes, I'll request the SRU.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

For posterity - yes, 'priority' is not a valid option :)

description: updated
description: updated
description: updated
Revision history for this message
Deric Sullivan (deric-sullivan) wrote :

Hi Serge,

     Was the SRU for lucid to fix the "once" bug in qemu-kvm denied?
I've seen an update since you requested the SRU but it doesn't seem to
include the fix for the "once" bug.

Thanks,
Deric

On 02/17/11 20:41, Serge Hallyn wrote:
> Quoting Deric Sullivan (<email address hidden>):
>> Thanks, that fixed the problem. Will that fix make it into "lucid-
>> updates"?
> Great, thanks for testing. Yes, I'll request the SRU.
>

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

No it was not denied. I've gone ahead and accepted the bug for lucid/maverick SRU.

Changed in qemu-kvm (Ubuntu Lucid):
status: New → Confirmed
Changed in qemu-kvm (Ubuntu Maverick):
status: New → Confirmed
Revision history for this message
Deric Sullivan (deric-sullivan) wrote :

Great. Thanks.

Deric

On 04/30/11 15:16, Clint Byrum wrote:
> No it was not denied. I've gone ahead and accepted the bug for
> lucid/maverick SRU.
>
> ** Also affects: qemu-kvm (Ubuntu Lucid)
> Importance: Undecided
> Status: New
>
> ** Also affects: qemu-kvm (Ubuntu Maverick)
> Importance: Undecided
> Status: New
>
> ** Changed in: qemu-kvm (Ubuntu Lucid)
> Status: New => Confirmed
>
> ** Changed in: qemu-kvm (Ubuntu Maverick)
> Status: New => Confirmed
>

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted qemu-kvm into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in qemu-kvm (Ubuntu Lucid):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in qemu-kvm (Ubuntu Maverick):
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted qemu-kvm into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Deric Sullivan (deric-sullivan) wrote : Re: [Bug 719448] Please test proposed package

I installed the lucid proposed qemu-kvm package and the bug is fixed.

Thanks,
Deric

On 05/03/11 05:42, Martin Pitt wrote:
> Accepted qemu-kvm into maverick-proposed, the package will build now and
> be available in a few hours. Please test and give feedback here. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
> enable and use -proposed. Thank you in advance!
>

Revision history for this message
Deric Sullivan (deric-sullivan) wrote : Re: [Bug 719448] Re: The "once" parameter does not work with "-boot"

I installed the lucid proposed qemu-kvm package and the bug is fixed.

Thanks,
Deric

On 05/03/11 05:40, Martin Pitt wrote:
> Accepted qemu-kvm into lucid-proposed, the package will build now and be
> available in a few hours. Please test and give feedback here. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
> enable and use -proposed. Thank you in advance!
>
> ** Changed in: qemu-kvm (Ubuntu Lucid)
> Status: Confirmed => Fix Committed
>
> ** Tags added: verification-needed
>
> ** Changed in: qemu-kvm (Ubuntu Maverick)
> Status: Confirmed => Fix Committed
>

Revision history for this message
Deric Sullivan (deric-sullivan) wrote : Re: [Bug 719448] Please test proposed package

Please note that I tried this on lucid only (and the bug was fixed). I
don't have access to any maverick systems.

Thanks,
Deric

On 05/03/11 17:30, Deric Sullivan wrote:
> I installed the lucid proposed qemu-kvm package and the bug is fixed.
>
> Thanks,
> Deric
>
> On 05/03/11 05:42, Martin Pitt wrote:
>> Accepted qemu-kvm into maverick-proposed, the package will build now and
>> be available in a few hours. Please test and give feedback here. See
>> https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
>> enable and use -proposed. Thank you in advance!
>>

Martin Pitt (pitti)
tags: added: verification-done
Revision history for this message
Deric Sullivan (deric-sullivan) wrote : Re: [Bug 719448] Re: The "once" parameter does not work with "-boot"

Hi,

I'm trying to figure out if there is anything else that I'm supposed to
do to get this fix into lucid-updates.

When I look at the web page for "Pending Ubuntu stable release updates"
(at "http://people.canonical.com/~ubuntu-archive/pending-sru.html") I
see, in the lucid section, that qemu-kvm is listed. But the bug #719448
is highlighted in purple which means "bugs in purple are verified for a
task but need verification for another task". What is the other
verification that is needed? Is that something that I'm supposed to do?

Thanks,
Deric

On 05/04/11 05:37, Martin Pitt wrote:
> ** Tags added: verification-done
>

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Quoting Deric Sullivan (<email address hidden>):
> Hi,
>
> I'm trying to figure out if there is anything else that I'm supposed to
> do to get this fix into lucid-updates.

I don't think so. The fix has not been verified for maverick, but it
has for lucid. And there are no other deltas between the lucid-updates
and lucid-proposed versions. So IIUC the lucid-proposed version should
be pushed to lucid-updates immediately. Will pursue on irc.

Revision history for this message
Patrick Wright (patrickmwright) wrote :

Hi Deric,
First, thank you for testing! Your help is much appreciated. The reason you are seeing both verification-done and verification-needed tags is because the Launchpad ticket is only partially tested. This is common when the same fix has been committed for multiple distributions. There is nothing further required on your part for the Lucid fix.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

The package will be moved to lucid-updates 7 days after this bug
was marked verification-done.

Revision history for this message
Deric Sullivan (deric-sullivan) wrote :

Thanks again.

Deric

On 05/06/11 15:52, Serge Hallyn wrote:
> The package will be moved to lucid-updates 7 days after this bug
> was marked verification-done.
>

Revision history for this message
Martin Pitt (pitti) wrote :

Serge Hallyn [2011-05-06 15:52 -0000]:
> The package will be moved to lucid-updates 7 days after this bug
> was marked verification-done.

More precisely, it will be moved to -updates after 7 days of being in
-proposed if it is verified at that time. The 7 days period is for
having a time to catch regressions, which is orthogonal to verifying
the bug fix.

Revision history for this message
Deric Sullivan (deric-sullivan) wrote :

Martin, thanks for the clarification on how/when the fixed package moves from -proposed to -updates.
But is there anything else needed? I waited 10 days to be safe, and still the package is not in -updates. It's also still listed on the "Pending Ubuntu stable release updates" web page.

Thanks,
Deric

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from Deric Sullivan's message of Fri May 13 13:52:58 UTC 2011:
> Martin, thanks for the clarification on how/when the fixed package moves from -proposed to -updates.
> But is there anything else needed? I waited 10 days to be safe, and still the package is not in -updates. It's also still listed on the "Pending Ubuntu stable release updates" web page.
>

Deric, last week was the Ubuntu Developer Summit. We were all quite busy
having face to face meetings to discuss the plans for Oneiric. I'm sure
it will move to -updates soon.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu-kvm - 0.12.3+noroms-0ubuntu9.6

---------------
qemu-kvm (0.12.3+noroms-0ubuntu9.6) lucid-proposed; urgency=low

  * Pull in changes to vl.c from upstream to fix 'boot once=x'.
    (LP: #719448)
 -- Serge Hallyn <email address hidden> Mon, 02 May 2011 14:37:40 -0500

Changed in qemu-kvm (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Keeping v-needed for maverick.

Martin Pitt (pitti)
tags: removed: verification-done
tags: added: testcase
Revision history for this message
Rolf Leggewie (r0lf) wrote :

maverick has seen the end of its life and is no longer receiving any updates. Marking the maverick task for this ticket as "Won't Fix".

Changed in qemu-kvm (Ubuntu Maverick):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.