kvm does not generate a system uuid by default

Bug #959308 reported by James Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
goget-ubuntu-touch (Ubuntu)
Triaged
High
Unassigned
qemu-kvm (Ubuntu)
Won't Fix
High
Serge Hallyn
testdrive (Ubuntu)
Fix Released
Low
Andres Rodriguez
whoopsie-daisy (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Booting ubuntu_precise-desktop-i386.iso under kvm results in /var/log/upstart/whoopsie.log containing:

  Could not open the product uuid file.

This is because by default kvm does not create a uuid by default. As such, there is no /sys/class/dmi/id/product_uuid file which whoopsie is attempting to read.

kvm can generate a uuid by booting it with the --uuid option:

    kvm --uuid <uuid> ...

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: qemu-kvm 1.0+noroms-0ubuntu8
ProcVersionSignature: Ubuntu 3.2.0-19.30-generic-pae 3.2.11
Uname: Linux 3.2.0-19-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 1.94.1-0ubuntu2
Architecture: i386
Date: Mon Mar 19 14:05:46 2012
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
KvmCmdLine:
 UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
 james 30178 25913 18 168710 544196 0 13:51 pts/9 00:02:44 kvm -cdrom /home/james/.cache/testdrive/iso/ubuntu_precise-desktop-i386.iso -hda ubuntu-install-testing.kvm -net nic -net user -m 512
MachineType: LENOVO 2516CTO
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=fr_CA.UTF8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-19-generic-pae root=UUID=7ad192e9-7b26-49d1-8e1c-fefc7dc495cb ro acpi_sleep=nonvs console=ttyUSB0,115200n8r console=tty quiet splash vt.handoff=7
SourcePackage: qemu-kvm
UpgradeStatus: Upgraded to precise on 2012-01-12 (67 days ago)
dmi.bios.date: 08/27/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 6IET72WW (1.32 )
dmi.board.name: 2516CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6IET72WW(1.32):bd08/27/2010:svnLENOVO:pn2516CTO:pvrThinkPadT410:rvnLENOVO:rn2516CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 2516CTO
dmi.product.version: ThinkPad T410
dmi.sys.vendor: LENOVO

Revision history for this message
James Hunt (jamesodhunt) wrote :
Revision history for this message
Evan (ev) wrote :

This is of importance to the crash database. We want to offer users the ability to review crashes they have submitted, and we do this by passing a SHA-512 hash of the system UUID when submitting crashes.

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

Thanks - so it sounds like the simplest solution is to have the caller use --uuid. Is there a reason not to go that route? If there is, then we can carry a patch against upstream to change the default in qemu-kvm, but I prefer to avoid that if reasonable.

Revision history for this message
Evan (ev) wrote :

Serge,

The caller here is all our end users.

I'd like to argue for carrying a patch against upstream. All the other major virtual machines set a system UUID by default:
- VirtualBox: http://www.virtualbox.org/manual/ch08.html#idp12395280 (search for hardwareuuid)
- VMWare: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1541
- Parallels: http://forum.parallels.com/showthread.php?t=32400

Microsoft requires it for Logo Certification, as I understand it.

I can't imagine it doing any harm. I suspect there are countless more things in the wild depending on one being set than there are ones expecting a NULL value.

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

Thanks, I'll go ahead and add a patch.

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

Debdiff to fix this issue. I'll push this as soon as freeze is lifted. If you want it pushed with a freeze exception, please let me know.

I've posted the patch to the qemu-devel mailing list.

tags: added: patch
Revision history for this message
Evan (ev) wrote :

Serge,

The freeze is lifted :)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 959308] Re: kvm does not generate a system uuid by default

Evan,

upstream feedback included a question of whether it is ok for the uuid
to be different on every boot. Is that ok for you? Upstream won't
likely accept the patch.

Revision history for this message
Evan (ev) wrote :

Thanks for chasing this upstream.

No, an always-changing UUID defeats the purpose for us. We need a means of providing a key for users to see their crash data, persisted across installs.

> Not all platforms have a notion of platform UUID so as Ubuntu
> supports more architectures, this problem would have to be dealt
> with eventually.

Sure, and in architectures that do not have a platform UUID, such as ARM, we'll have to use a combination of other hardware identifiers (such as mac addresses) to fill the gap. See bug 963007 for one conversation on that.

But we ultimately need something that ties back to that machine.

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

Quoting Evan Dandrea (<email address hidden>):
> Thanks for chasing this upstream.
>
> No, an always-changing UUID defeats the purpose for us. We need a means
> of providing a key for users to see their crash data, persisted across
> installs.

A suggestion upstream was to use the uuid of the root filesystem. I'm
not sure things can happen in the right order for that, but I can give
that a shot.

> > Not all platforms have a notion of platform UUID so as Ubuntu
> > supports more architectures, this problem would have to be dealt
> > with eventually.
>
> Sure, and in architectures that do not have a platform UUID, such as
> ARM, we'll have to use a combination of other hardware identifiers (such
> as mac addresses) to fill the gap. See bug 963007 for one conversation
> on that.
>
> But we ultimately need something that ties back to that machine.

If you're going to have to do that anyway, can you use the root fs uuid?
Would that supplant the need for this qemu patch?

You said our end-users need this. Historically are all of the people
who will need this using either libvirt or testdrive? Can we simply
hack testdrive to do this for us?

Changed in testdrive (Ubuntu):
assignee: nobody → Andres Rodriguez (andreserl)
importance: Undecided → Low
status: New → In Progress
Changed in testdrive (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package testdrive - 3.16-0ubuntu1

---------------
testdrive (3.16-0ubuntu1) quantal; urgency=low

  [ Philip Muškovac ]
  * Correctly display versions for both -cli and -gtk

  [ Andres Rodriguez ]
  * testdrive/virt/kvm.py: Generate UUID. (LP: #959308)
  * correctly save arch's in preferences (LP: #873235)
  * Change tabs to spaces.
  * debian/source/format: Added.
  * fully migrate to dh_python2

  [ Robert Ancell ]
  * debian/control:
    - Drop dependency on python-launchpad-integration
  * bin/testdrive-gtk:
    - We no longer do Launchpad integration (LP: #999413)
 -- Andres Rodriguez <email address hidden> Tue, 15 May 2012 16:58:37 -0400

Changed in testdrive (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Evan (ev) wrote :

We now fall back to the SHA-512 hash of the MAC address when no system UUID is present.

Changed in whoopsie-daisy (Ubuntu):
status: New → Fix Committed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Upper layers have handled this, marking wontfix in qemu-kvm. Thanks.

Changed in qemu-kvm (Ubuntu):
status: Confirmed → Won't Fix
Evan (ev)
Changed in whoopsie-daisy (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Hm, but e.g. do managed VMs re-use uuid? E.g. I'd expect for libvirt created / managed VMs to have uuid working correctly. Similarly ubuntu-emulator should generate and store uuid.

Changed in goget-ubuntu-touch (Ubuntu):
assignee: nobody → Dimitri John Ledkov (xnox)
status: New → Triaged
importance: Undecided → High
Changed in goget-ubuntu-touch (Ubuntu):
assignee: Dimitri John Ledkov (xnox) → nobody
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.