Instance web with m1.small flavor fails to launch for Openstack course in Red Hat Online Learning.

Solution Verified - Updated -

Environment

  • Red Hat Online Learning.
  • Openstack course version 5.
  • CL210 v5.

Issue

  • Instance web with m1.small flavor fails to launch while instance small with m2.tiny flavor launches successfully.
  • When instance web is launched, below error is received,
Error: Failed to launch instance "web": No valid host was found.
  • Below errors are captured when instance web is launched,
Cannot set up guest memory 'pc.ram': cannot allocate memory

Resolution

  • This is a known issue in the CL210v5 course.
  • The libvirtd tests to see if there is enough memory available before it allows a VM to be launched. Hence, it does not allow the instance web to launch. The issue is encountered due to the hypervisor which does not have enough swap space nor there is enough free RAM to launch the instance. The workaround is to add some swap space from server1-a:
server1-a #  dd if=/dev/zero of=/swapspace bs=1M count=4096
server1-a #  mkswap /swapspace
server1-a #  swapon /swapspace
server1-a #  echo '/swapspace  swap swap defaults 0 0' >> /etc/fstab
  • The aforementioned step will create a 4 GB file, enable and activate it as swap space and enable it at boot time.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments