Nova can't spawn new instance with "virDomain instance has no attribute 'createWithFlags'" error on RHEL6.0

Bug #757283 reported by Andrey Brindeyev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Andrey Brindeyev

Bug Description

# virsh list --all
 Id Name State
----------------------------------

# source novarc
# euca-run-instances ami-2a835aae --kernel aki-34cf3629 --ramdisk ari-217d77df -k rhelkey -t m1.tiny
RESERVATION r-i9nxdcy8 rhelimg default
INSTANCE i-00000001 ami-2a835aae scheduling rhelkey (rhelimg, None) 0 m1.tiny 2011-04-11T08:52:49Z unknown zone

2011-04-11 12:52:51,544 nova.virt.libvirt_conn: instance instance-00000001: Creating image
2011-04-11 12:52:51,641 nova.utils: Attempting to grab semaphore "34cf3629" for method "call_if_not_exists"...
2011-04-11 12:52:51,656 nova.utils: Running cmd (subprocess): cp /var/lib/nova/instances/_base/34cf3629 /var/lib/nova/instances/instance-00000001/kernel
2011-04-11 12:52:51,693 nova.utils: Attempting to grab semaphore "217d77df" for method "call_if_not_exists"...
2011-04-11 12:52:51,707 nova.utils: Running cmd (subprocess): cp /var/lib/nova/instances/_base/217d77df /var/lib/nova/instances/instance-00000001/ramdisk
2011-04-11 12:52:51,759 nova.utils: Attempting to grab semaphore "2a835aae_sm" for method "call_if_not_exists"...
2011-04-11 12:52:52,024 nova.utils: Running cmd (subprocess): qemu-img create -f qcow2 -o cluster_size=2M,backing_file=/var/lib/nova/instances/_base/2a835aae_sm /var/lib/nova/instances/instance-00000001/disk
2011-04-11 12:52:52,064 nova.virt.libvirt_conn: instance instance-00000001: injecting key into image 713251502
2011-04-11 12:52:52,081 nova.compute.disk: Mounting disk...
2011-04-11 12:52:56,717 nova.compute.disk: Injecting SSH key...
2011-04-11 12:52:57,474 nova.compute.disk: Deleting guestfs object...
2011-04-11 12:52:59,280 nova.exception: Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/python2.6/site-packages/nova/exception.py", line 120, in _wrap
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/usr/lib/python2.6/site-packages/nova/virt/libvirt_conn.py", line 611, in spawn
(nova.exception): TRACE: domain = self._create_new_domain(xml)
(nova.exception): TRACE: File "/usr/lib/python2.6/site-packages/nova/virt/libvirt_conn.py", line 1072, in _create_new_domain
(nova.exception): TRACE: domain.createWithFlags(launch_flags)
(nova.exception): TRACE: AttributeError: virDomain instance has no attribute 'createWithFlags'
(nova.exception): TRACE:
2011-04-11 12:52:59,281 nova.compute.manager: ERROR [WYUWXZ5CBTCE7-NTFUKK abr rhelimg] Instance '1' failed to spawn. Is virtualization enabled in the BIOS?
(nova.compute.manager): TRACE: Traceback (most recent call last):
(nova.compute.manager): TRACE: File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 234, in run_instance
(nova.compute.manager): TRACE: self.driver.spawn(instance_ref)
(nova.compute.manager): TRACE: File "/usr/lib/python2.6/site-packages/nova/exception.py", line 126, in _wrap
(nova.compute.manager): TRACE: raise Error(str(e))
(nova.compute.manager): TRACE: Error: virDomain instance has no attribute 'createWithFlags'
(nova.compute.manager): TRACE:
2011-04-11 12:53:39,710 nova.compute.manager: Found instance 'instance-00000001' in DB but no VM. State=5, so setting state to shutoff.
2011-04-11 12:54:39,742 nova.compute.manager: Found instance 'instance-00000001' in DB but no VM. State=5, so setting state to shutoff.

Revision history for this message
Andrey Brindeyev (abrindeyev) wrote :

Forgot to specify environment: bzr972 + patch from Bug #755666

Revision history for this message
Andrey Brindeyev (abrindeyev) wrote :

Probably outdated version of libvirt (0.8.1) is main source of that bug.
createWithFlags was added in 0.8.2

summary: Nova can't spawn new instance with "virDomain instance has no attribute
- 'createWithFlags'" error
+ 'createWithFlags'" error on RHEL6.0
Thierry Carrez (ttx)
Changed in nova:
status: New → Invalid
Revision history for this message
justinsb (justin-fathomdb) wrote :

Hi Andrey - indeed, an older version of libvirt is almost definitely to blame. Nova depends on its own patched version of libvirt anyway, so I don't think we can even try to be compatible with older versions.

Revision history for this message
Andrey Brindeyev (abrindeyev) wrote :

I can confirm that same codebase work ok with libvirt 0.8.7.

Changed in nova:
assignee: nobody → Andrey Brindeyev (abrindeyev)
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.