unable to create a vm

Asked by santoshsas

i am using virtual box and following kevin jackson guide i am able install nova with no errors however using two Virtual machines one with nova compute services and other with nova clinet .. Accesing with nova through nova-client using euca tools to register a small linux image images get registered however not able to acesses the instances check the logs of nova and compute
and libvirt value is set to kvm in nova.conf and nova-compute also

Pointers please thank you ...

client@dev-VirtualBox:~/Desktop/openstack$ nova list
+--------------------------------------+----------+--------+----------+
| ID | Name | Status | Networks |
+--------------------------------------+----------+--------+----------+
| 46256ddd-271a-4339-a3a9-19bd5be4dace | Server 7 | ERROR | |
+--------------------------------------+----------+--------+----------+
client@dev-VirtualBox:~/Desktop/openstack$ nova show 46256ddd-271a-4339-a3a9-19bd5be4dace
+-------------------------------------+----------------------------------------------------------------------------------+
| Property | Value |
+-------------------------------------+----------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | dev-VirtualBox |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| OS-EXT-SRV-ATTR:instance_name | instance-00000007 |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | spawning |
| OS-EXT-STS:vm_state | error |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2013-01-02T10:16:01Z |
| fault | {u'message': u'libvirtError', u'code': 500, u'created': u'2013-01-02T10:16:07Z'} |
| flavor | m1.small |
| hostId | c51557a3627c3fa63a9371ae2716172afe92d6dff467726149d33761 |
| id | 46256ddd-271a-4339-a3a9-19bd5be4dace |
| image | image/cirros-0.3.0-x86_64-blank.img |
| key_name | openstack |
| metadata | {} |
| name | Server 7 |
| status | ERROR |
| tenant_id | cookbook |
| updated | 2013-01-02T10:16:07Z |
| user_id | openstack |

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Keith Tobin (keith-tobin) said :
#1

You got a libvirt error while spwaning, can you post the logs (section with error) from the log and your nova config.
Can you manually launch a KVM VM outside of openstack/libvirt on compute node, if you can't do this then we will focus more on HV.

Depending on setup logs may be in /var/logs/nova/

Revision history for this message
santoshsas (santoshsas02) said :
#2

thank you for your reply i followed your advice installed virt-manager and tried to create a virtual machine and getting a warning kvm mdoules are not loaded

Revision history for this message
santoshsas (santoshsas02) said :
#3

error message getting in the nova.compute.log

2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 183, in decorated_function
2013-01-07 15:20:59 TRACE nova.rpc.amqp sys.exc_info())
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-01-07 15:20:59 TRACE nova.rpc.amqp self.gen.next()
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 177, in decorated_function
2013-01-07 15:20:59 TRACE nova.rpc.amqp return function(self, context, instance_uuid, *args, **kwargs)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 676, in run_instance
2013-01-07 15:20:59 TRACE nova.rpc.amqp do_run_instance()
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 945, in inner
2013-01-07 15:20:59 TRACE nova.rpc.amqp retval = f(*args, **kwargs)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 675, in do_run_instance
2013-01-07 15:20:59 TRACE nova.rpc.amqp self._run_instance(context, instance_uuid, **kwargs)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 476, in _run_instance
2013-01-07 15:20:59 TRACE nova.rpc.amqp self._set_instance_error_state(context, instance_uuid)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-01-07 15:20:59 TRACE nova.rpc.amqp self.gen.next()
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 457, in _run_instance
2013-01-07 15:20:59 TRACE nova.rpc.amqp self._deallocate_network(context, instance)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-01-07 15:20:59 TRACE nova.rpc.amqp self.gen.next()
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 454, in _run_instance
2013-01-07 15:20:59 TRACE nova.rpc.amqp injected_files, admin_password)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 617, in _spawn
2013-01-07 15:20:59 TRACE nova.rpc.amqp self._legacy_nw_info(network_info), block_device_info)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
2013-01-07 15:20:59 TRACE nova.rpc.amqp return f(*args, **kw)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 952, in spawn
2013-01-07 15:20:59 TRACE nova.rpc.amqp self._create_new_domain(xml)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 1618, in _create_new_domain
2013-01-07 15:20:59 TRACE nova.rpc.amqp domain.createWithFlags(launch_flags)
2013-01-07 15:20:59 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/libvirt.py", line 581, in createWithFlags
2013-01-07 15:20:59 TRACE nova.rpc.amqp if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)
2013-01-07 15:20:59 TRACE nova.rpc.amqp libvirtError: internal error process exited while connecting to monitor: char device redirected to /dev/pts/12
2013-01-07 15:20:59 TRACE nova.rpc.amqp Failed to allocate 2147483648 B: Cannot allocate memory
2013-01-07 15:20:59 TRACE nova.rpc.amqp

nova.conf

--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--force_dhcp_release
--iscsi_helper=tgtadm
--libvirt_use_virtio_for_bridges
--connection_type=libvirt
--root_helper=sudo nova-rootwrap
--verbose
--ec2_private_dns_show_ip
--sql_connection=mysql://nova:123@172.16.0.1/nova
--use_deprecated_auth
--s3_host=172.16.0.1
--rabbit_host=172.16.0.1
--ec2_host=172.16.0.1
--ec2_dmz_host=172.16.0.1
--public_interface=eth1
--image_service=nova.image.glance.GlanceImageService
--glance_api_servers=172.16.0.1:9292
--auto_assign_floating_ip=true
--scheduler_default_filters=AllHostsFilter
--libvirt_type=qemu

Revision history for this message
santoshsas (santoshsas02) said :
#4

i tried to change permissions in libvirtd.conf and then ran small linux imge in the kvm vm i ran sucessfully by giving a warnig that kvm is not loaded properly

Revision history for this message
Keith Tobin (keith-tobin) said :
#5

It seems you have KVM problems, lets first establish if KVM is able to create a VM on you host.
First run kvm-ok http://manpages.ubuntu.com/manpages/lucid/man1/kvm-ok.1.html

Next

On command line create a KVM vom, use any command line method you want.
Here is a tutorial
https://help.ubuntu.com/community/KVM/CreateGuests

What you are attempting to do is establish if kvm is installed and working.

What OS are you using and what version?

You need to check the bios is setup for hardware virtualising, KVM-ok will check this, if you using ubuntu?

Then you need to establish the KVM is working by deploying a VM

The you need to deploy a VM using libvirt and virsh command line tool

Then when all that is working, openstack can use libvirt, I suspect their is something wrong with KVM.

Revision history for this message
Vish Ishaya (vishvananda) said :
#6

FYI if you are in virtualbox kvm will not be available, you will have to use qemu instead. Based on the stack trace it looks like you are running out of ram on your host. You might want to give your host vm more ram and/or boot a smaller guest (flavor=1)

Can you help with this problem?

Provide an answer of your own, or ask santoshsas for more information if necessary.

To post a message you must log in.