Ugly error spewed when kernel doesn't support virtualisation

Bug #1266995 reported by Julian Edwards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-test
Triaged
Medium
Unassigned

Bug Description

It would be nice if it caught this and presented a nicer error - in particular I just needed to reboot because my kernel was out of date.
=================
2014-01-08 12:58:31,842 INFO Checking for KVM extensions.
2014-01-08 12:58:31,883 INFO Checking for virtualised hardware...
2014-01-08 12:58:31,973 INFO Scanning for unexpected DHCP servers on testing network...
2014-01-08 12:58:35,197 INFO Checking for running proxy instance...
2014-01-08 12:58:35,198 INFO Starting proxy...
2014-01-08 12:58:35,207 INFO Done starting proxy.
2014-01-08 12:58:35,214 INFO Downloading KVM image for series=saucy, arch=amd64...
2014-01-08 13:11:36,328 INFO Done downloading KVM image for series=saucy, arch=amd64.
2014-01-08 13:11:36,740 INFO Creating virtual machine c3dd8de0-7810-11e3-944d-e4115b13819f, arch=amd64...
2014-01-08 13:11:40,400 INFO Killing proxy...
2014-01-08 13:11:40,479 INFO Done killing proxy.
ERROR

======================================================================
ERROR: setUpClass (maastest.main.ConfiguredTestMAAS)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maastest/cases.py", line 95, in setUpClass
    cls.fixtures.useFixture(cls.machine)
  File "/usr/lib/python2.7/dist-packages/maastest/cases.py", line 46, in useFixture
    super(ClassFixture, self).useFixture(fixture)
  File "/usr/lib/python2.7/dist-packages/fixtures/fixture.py", line 192, in useFixture
    fixture.setUp()
  File "/usr/lib/python2.7/dist-packages/maastest/kvmfixture.py", line 148, in setUp
    self.start()
  File "/usr/lib/python2.7/dist-packages/maastest/kvmfixture.py", line 274, in start
    input=template, check_call=True)
  File "/usr/lib/python2.7/dist-packages/maastest/utils.py", line 70, in run_command
    raise make_exception(args, retcode, stdout, stderr)
Exception: Command 'sudo uvt-kvm create --ssh-public-key-file=/home/ubuntu/.config/maas-test/vm_ssh_id_rsa.pub --unsafe-caching --memory 2047 --disk 20 c3dd8de0-7810-11e3-944d-e4115b13819f arch=amd64 release=saucy --template -' failed (1):

Warning: this CLI is experimental and may change.
wrote ds.img with filesystem=iso9660 and diskformat=raw
libvirt: Domain Config error : unknown OS type hvm
Traceback (most recent call last):
  File "/usr/bin/uvt-kvm", line 597, in <module>
    main(sys.argv[1:])
  File "/usr/bin/uvt-kvm", line 593, in main
    args.func(parser, args)
  File "/usr/bin/uvt-kvm", line 436, in main_create
    unsafe_caching=args.unsafe_caching,
  File "/usr/bin/uvt-kvm", line 321, in create
    domain = conn.defineXML(xml)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2930, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirt.libvirtError: unknown OS type hvm

----------------------------------------------------------------------
Ran 0 tests in 785.317s

Changed in maas-test:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Raphaël Badin (rvb) wrote :

I agree that it would be nice explaining the user out to fix this… But is an out of date kernel really the cause of this? I've seen this happen a couple of times and it turned out that running the following command made the problem disappear:
$ sudo service libvirt-bin restart

It might be work poking rbasak about this.

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.