@ Serge
I write down the process I have tried to solve this issue...
First the nova-compute.log show an ERROR as follow...
2013-05-21 16:19:11.230 ERROR nova.compute.manager [req-0e30e53b-
8d93-4a0b-b378-672a02d6eb417c0d5d8e458f4580972e14af22e8a6ca
8d6292b82686470bb5a46d3c1a565c03] [instance:
71c40047-8422-4623-aaf0-f06353dfcb75] Error: ['Traceback (most recent
call last):\n', ' File "/usr/lib/python2.7/dist-
packages/nova/compute/manager.py", line 834, in _run_instance\n
set_access_ip=set_access_ip)\n', ' File "/usr/lib/python2.7/dist-
packages/nova/compute/manager.py", line 1093, in _spawn\n
LOG.exception(_(\'Instance failed to spawn\'), instance=instance)\n', '
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__\n
self.gen.next()\n', ' File "/usr/lib/python2.7/dist-
packages/nova/compute/manager.py", line 1089, in _spawn\n
block_device_info)\n', ' File "/usr/lib/python2.7/dist-
packages/nova/virt/libvirt/driver.py", line 1520, in spawn\n
block_device_info)\n', ' File "/usr/lib/python2.7/dist-
packages/nova/virt/libvirt/driver.py", line 2435, in
_create_domain_and_network\ndomain = self._create_domain(xml,
instance=instance)\n', ' File "/usr/lib/python2.7/dist-
packages/nova/virt/libvirt/driver.py", line 2395, in _create_domain\n
domain = self._conn.defineXML(xml)\n', ' File "/usr/lib/python2.7/dist-
packages/eventlet/tpool.py", line 187, in doit\nresult =
proxy_call(self._autowrap, f, *args, **kwargs)\n', ' File
"/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 147, in
proxy_call\nrv = execute(f,*args,**kwargs)\n', ' File
"/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 76, in
tworker\nrv = meth(*args,**kwargs)\n', ' File "/usr/lib/python2.7
/dist-packages/libvirt.py", line 2760, in defineXML\nif ret is
None:raise libvirtError(\'virDomainDefineXML() failed\', conn=self)\n',
"libvirtError: internal error no supported architecture for os type
'hvm'\n"]
Then I check the "/usr/lib/python2.7/dist-packages/libvirt.py" at line
2760, it is a function in class virConnect
def defineXML(self, xml):
ret = libvirtmod.virDomainDefineXML(self._o, xml)
if ret is None:raise libvirtError('virDomainDefineXML() failed',
conn=self)
__tmp = virDomain(self,_obj=ret)
return __tmp
To output the xml I add some code as follow and restart nova-compute
service
def defineXML(self, xml):
# save xml files to a temporary location
import __builtin__ as bu
f = bu.open("/tmp/libvirt.xml", "w")
f.write(xml) # Write a string to a file
f.close()
ret = libvirtmod.virDomainDefineXML(self._o, xml)
if ret is None:raise libvirtError('virDomainDefineXML() failed',
conn=self)
__tmp = virDomain(self,_obj=ret)
return __tmp
When re-create a vm use OpenStack Dashboard, I got the /tmp/libvirt.xml
as follow
563fab12-f8b3-4689-b9b6-b3ba89c98246
instance-0007
524288
1
OpenStack Foundation
OpenStack Nova
2013.1
c56740d8-bfbc-db37-fe43-75ba7c50cdb8
563fab12-f8b3-4689-b9b6-b3ba89c98246
hvm
One can find the first line () that it still specify to use
KVM rather than Qemu, though I already specify "libvirt_type=qemu" in
nova.conf. According to #3 @Jamie's post, I found two possible way to solve it.
1. change the first line to
2. change the line 16 to hvm
For testing, I have added some code in /usr/lib/python2.7/dist-
packages/libvirt.py to change the xml (ex. xml =
xml.replace('type="kvm"', 'type="qemu"',1)). Both method works fine.
So I still do not sure is it the bug of libvirt of Nova?
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to nova in Ubuntu.
https://bugs.launchpad.net/bugs/1031063
Title:
internal error no supported architecture for os type 'hvm'
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1031063/+subscriptions
--
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs