I was trying to Deploy Openstack for testing inside VirtualBox and i got an error "NoValidHost: No valid host was found.There are not enough hosts available." while trying to run an instance with nova boot command.
I did it after converting VDI to Qcow2 and trying to launch it on nova, check
This normally happens when you're using qemu as hypervisor inside VirtualBox instead of KVM acceleration to run Openstack Compute service (Nova).
From the perspective of the Compute service, the QEMU hypervisor is very similar to the KVM hypervisor. Both are controlled through libvirt, both support the same feature set, and all virtual machine images that are compatible with KVM are also compatible with QEMU. The main difference is that QEMU does not support native virtualization. Consequently, QEMU has worse performance than KVM and is a poor choice for a production deployment.
When you try to launch an instance with nova boot command and get status 'ERROR', the log file /var/log/nova/nova-conductor.log is likely outputting the error "NoValidHost: No valid host was found.There are not enough hosts available. ". You can check it by running:
For some operations you may also have to install the guestmount utility:
On Ubuntu/Debian
On openSUSE:
Both QEMU and KVM hypervisor supports the following virtual machine image formats:
Tags:
How to Setup Qemu as Openstack Hypervisor
How to Fix "NoValidHost: No valid host was found.There are not enough hosts available. " on CentOS 7 Openstack Host OS.
Installing guestfs-tools on Linux
Nova integration with Qemu
I did it after converting VDI to Qcow2 and trying to launch it on nova, check
How to convert VirtualBox Disk Image (VDI) and img to Qcow2 format
This normally happens when you're using qemu as hypervisor inside VirtualBox instead of KVM acceleration to run Openstack Compute service (Nova).
From the perspective of the Compute service, the QEMU hypervisor is very similar to the KVM hypervisor. Both are controlled through libvirt, both support the same feature set, and all virtual machine images that are compatible with KVM are also compatible with QEMU. The main difference is that QEMU does not support native virtualization. Consequently, QEMU has worse performance than KVM and is a poor choice for a production deployment.
When you try to launch an instance with nova boot command and get status 'ERROR', the log file /var/log/nova/nova-conductor.log is likely outputting the error "NoValidHost: No valid host was found.There are not enough hosts available. ". You can check it by running:
tail -f /var/log/nova/nova-conductor.logTo fix this problem, open nova.conf file and add the following lines.
compute_driver = libvirt.LibvirtDriverWe enabled QEMU with above command and make compute driver to be libvirt.LibvirtDriver
[libvirt]
virt_type = qemu
For some operations you may also have to install the guestmount utility:
On Ubuntu/Debian
sudo apt-get install guestmountOn CentOS and RHEL
sudo yum install libguestfs-tools
On openSUSE:
zypper install guestfs-tools
Both QEMU and KVM hypervisor supports the following virtual machine image formats:
- Raw
- QEMU Copy-on-write (qcow2)
- VMware virtual machine disk format (vmdk)
Tags:
How to Setup Qemu as Openstack Hypervisor
How to Fix "NoValidHost: No valid host was found.There are not enough hosts available. " on CentOS 7 Openstack Host OS.
Installing guestfs-tools on Linux
Nova integration with Qemu