[Bug 1031063] Re: internal error no supported architecture for os type 'hvm'

2013-05-22 Thread shedoh
@ 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

 domain type=kvm
  uuid563fab12-f8b3-4689-b9b6-b3ba89c98246/uuid
  nameinstance-0007/name
  memory524288/memory
  vcpu1/vcpu
  sysinfo type=smbios
system
  entry name=manufacturerOpenStack Foundation/entry
  entry name=productOpenStack Nova/entry
  entry name=version2013.1/entry
  entry name=serialc56740d8-bfbc-db37-fe43-75ba7c50cdb8/entry
  entry name=uuid563fab12-f8b3-4689-b9b6-b3ba89c98246/entry
/system
  /sysinfo
  os
typehvm/type
boot dev=hd/
smbios mode=sysinfo/
  /os
  features
acpi/
apic/
  /features
  clock offset=utc
timer name=pit tickpolicy=delay/
timer name=rtc tickpolicy=catchup/
  /clock
  cpu mode=host-model match=exact/
  devices
disk type=file device=disk
  driver name=qemu type=qcow2 cache=none/
  source 
file=/var/lib/nova/instances/563fab12-f8b3-4689-b9b6-b3ba89c98246/disk/
  target bus=virtio dev=vda/
/disk
interface type=bridge
  mac address=fa:16:3e:dd:b1:94/
  model type=virtio/
  source bridge=br-int/
  target dev=tapcd5492b6-18/
  virtualport type=openvswitch
parameters interfaceid=cd5492b6-1835-464a-b705-d5fed0766237/
  /virtualport
/interface
serial type=file
  source 
path=/var/lib/nova/instances/563fab12-f8b3-4689-b9b6-b3ba89c98246/console.log/
/serial
serial type=pty/
input type=tablet bus=usb/
graphics type=vnc autoport=yes keymap=en-us listen=0.0.0.0/
  /devices
/domain

One can find the first line (domain type=kvm) 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 domain type=qemu
2. change the line 16 to type arch='x86_64'hvm/type

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 

[Bug 1031063] Re: internal error no supported architecture for os type 'hvm'

2013-05-22 Thread shedoh
@ 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

 domain type=kvm
  uuid563fab12-f8b3-4689-b9b6-b3ba89c98246/uuid
  nameinstance-0007/name
  memory524288/memory
  vcpu1/vcpu
  sysinfo type=smbios
system
  entry name=manufacturerOpenStack Foundation/entry
  entry name=productOpenStack Nova/entry
  entry name=version2013.1/entry
  entry name=serialc56740d8-bfbc-db37-fe43-75ba7c50cdb8/entry
  entry name=uuid563fab12-f8b3-4689-b9b6-b3ba89c98246/entry
/system
  /sysinfo
  os
typehvm/type
boot dev=hd/
smbios mode=sysinfo/
  /os
  features
acpi/
apic/
  /features
  clock offset=utc
timer name=pit tickpolicy=delay/
timer name=rtc tickpolicy=catchup/
  /clock
  cpu mode=host-model match=exact/
  devices
disk type=file device=disk
  driver name=qemu type=qcow2 cache=none/
  source 
file=/var/lib/nova/instances/563fab12-f8b3-4689-b9b6-b3ba89c98246/disk/
  target bus=virtio dev=vda/
/disk
interface type=bridge
  mac address=fa:16:3e:dd:b1:94/
  model type=virtio/
  source bridge=br-int/
  target dev=tapcd5492b6-18/
  virtualport type=openvswitch
parameters interfaceid=cd5492b6-1835-464a-b705-d5fed0766237/
  /virtualport
/interface
serial type=file
  source 
path=/var/lib/nova/instances/563fab12-f8b3-4689-b9b6-b3ba89c98246/console.log/
/serial
serial type=pty/
input type=tablet bus=usb/
graphics type=vnc autoport=yes keymap=en-us listen=0.0.0.0/
  /devices
/domain

One can find the first line (domain type=kvm) 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 domain type=qemu
2. change the line 16 to type arch='x86_64'hvm/type

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
Bugs, which is subscribed to 

[Bug 1031063] Re: internal error no supported architecture for os type 'hvm'

2013-05-21 Thread shedoh
Hi,

Any update / solution on this issue?

I got the same problem as I install OpenStack Grizzly on VM with OS Ubuntu 
12.04 (The Host OS is Ubuntu 12.04 as well).
set libvirt_type=qemu in nova.conf does not work too.

When execute virsh capabilities I got...

    some information omited...
  guest
os_typehvm/os_type
arch name='x86_64'
  wordsize64/wordsize
  emulator/usr/bin/qemu-system-x86_64/emulator
  machinepc-1.0/machine
  machine canonical='pc-1.0'pc/machine
  machinepc-0.14/machine
  machinepc-0.13/machine
  machinepc-0.12/machine
  machinepc-0.11/machine
  machinepc-0.10/machine
  machineisapc/machine
  domain type='qemu'
  /domain
/arch
features
  cpuselection/
  deviceboot/
  acpi default='on' toggle='yes'/
  apic default='on' toggle='no'/
/features
  /guest

The domain type is already qemu. I can create VM with virt-manager
without any problem.

@To Valeriy,
   I cannot find libvirt.xml.template in my machine. The libvirt version I 
installed is 1.0.2 on Ubuntu 12.04. Any suggestion?

-- 
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


[Bug 1031063] Re: internal error no supported architecture for os type 'hvm'

2013-05-21 Thread shedoh
Hi,

Any update / solution on this issue?

I got the same problem as I install OpenStack Grizzly on VM with OS Ubuntu 
12.04 (The Host OS is Ubuntu 12.04 as well).
set libvirt_type=qemu in nova.conf does not work too.

When execute virsh capabilities I got...

    some information omited...
  guest
os_typehvm/os_type
arch name='x86_64'
  wordsize64/wordsize
  emulator/usr/bin/qemu-system-x86_64/emulator
  machinepc-1.0/machine
  machine canonical='pc-1.0'pc/machine
  machinepc-0.14/machine
  machinepc-0.13/machine
  machinepc-0.12/machine
  machinepc-0.11/machine
  machinepc-0.10/machine
  machineisapc/machine
  domain type='qemu'
  /domain
/arch
features
  cpuselection/
  deviceboot/
  acpi default='on' toggle='yes'/
  apic default='on' toggle='no'/
/features
  /guest

The domain type is already qemu. I can create VM with virt-manager
without any problem.

@To Valeriy,
   I cannot find libvirt.xml.template in my machine. The libvirt version I 
installed is 1.0.2 on Ubuntu 12.04. Any suggestion?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to 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-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs