libvirt not allocating CPU and Disk to VM's after the OS update.

asked 2018-02-13 09:33:52 -0600

vathanlal gravatar image

updated 2018-02-26 06:25:26 -0600

Hello, In my OpenStack cluster(newton) after the OS update(ubuntu 16.04) of compute nodes it is not possible to create new VM's. When I create a new VM it is showing in horizon as active and IP is also shown as allocated to the VM in the horizon. But ssh into the VM is not possible. Then I check the console log of the VMs and I found error related to root disk as below

 Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  LABEL=cloudimg-rootfs does not exist.  Dropping to a shell!

BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) [6n[  963.757213] random: nonblocking pool is initialized

After Inspecting libvirt in compute nodes I found all my newly created VM's are using sda and scsi and all of them have the above same error. All the VM's which I created before the update is working fine and is using vda and virtio. Then I checked the libvirt instance.xml file and I found libvirt is not allocating CPU to the VM's and it always using sda and scsi. I think this happened due to the OS update. How can I solve this issue?? any help is really appreciated. one of the instance.xml is as below

<domain type='kvm'>
    <nova:instance xmlns:nova="">
      <nova:package version="14.0.10"/>
      <nova:creationTime>2018-02-13 13:47:56</nova:creationTime>
      <nova:flavor name="m1.small">
        <nova:user uuid="b378a2ff41af45bc8e458a2f17c30c3f">vmsec</nova:user>
        <nova:project uuid="7814cec0fc1943b6b08a1a052ffeb4f7">vmsec</nova:project>
      <nova:root type="image" uuid="790b87d7-e345-47a8-9d5e-f7bcc6f7202b"/>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <sysinfo type='smbios'>
      <entry name='manufacturer'>OpenStack Foundation</entry>
      <entry name='product'>OpenStack Nova</entry>
      <entry name='version'>14.0.10</entry>
      <entry name='serial'>5b8fe22f-532c-4114-b52a-905b91050f9b</entry>
      <entry name='uuid'>d7c2feae-ce57-4492-b892-35b86d1559f6</entry>
      <entry name='family'>Virtual Machine</entry>
    <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  <cpu mode='host-model'>
    <model fallback='allow'/>
    <topology sockets='1' cores='1' threads='1'/>
  <clock offset='utc'>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='hpet' present='no'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var ...
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2018-02-24 05:21:07 -0600

Radhakrishnan Rk gravatar image

updated 2018-02-24 05:25:01 -0600

Have you checked kvm configuration file. Can you show me kvm configuration file. Is your kvm hypervisor package is compatible to your system architecture. Please share boot log as well.

Please disable apparmour service running in your host.

edit flag offensive delete link more


Thanks for the response I disabled apparmor service "systemctl stop apparmor.service". But still the same error. My /etc/libvirtd.conf in one of the compute node is added in the question. Please go through it, Or do you meant any other file. What do you meant by boot log?? console log of VM??

vathanlal gravatar imagevathanlal ( 2018-02-26 04:39:04 -0600 )edit
Deepa gravatar imageDeepa ( 2018-02-26 04:46:01 -0600 )edit I already seen this. But there no clear solution is mentioned there. Thanks for the response.

vathanlal gravatar imagevathanlal ( 2018-02-26 05:43:02 -0600 )edit

Thanks for the update. Yes boot log refers the console log of the guest vm. Also I need the hypervisor log while you turn on the vm.

Radhakrishnan Rk gravatar imageRadhakrishnan Rk ( 2018-02-26 06:11:10 -0600 )edit

I updated the logs in the question please go through it. I dont have any logs related to libvirt because in /var/log/libvirt there is libvirtd.log but nothing is actually written in this log.

vathanlal gravatar imagevathanlal ( 2018-02-26 06:27:56 -0600 )edit

answered 2018-02-26 07:31:13 -0600

TijoV gravatar image

Hi, can you try edit on libvirt instance.xml file

<cpu mode="host-passthrough"> instead of <cpu mode="host-model"> save and try powering back the VM again.

Let know if this worked ..


edit flag offensive delete link more


How can I edit the instance.xml file and start the VM with that xm file?? Because I edited /etc/libvirt/qemu/instance.xml to use virtio and started the VM using 'virsh start' but in horizon VM is showing powering off as task and then goes to shutdown state.

vathanlal gravatar imagevathanlal ( 2018-02-26 07:39:20 -0600 )edit

But in nova console of that instance there is no error as I mentioned. It got the boot disk and IP and even boots fine then it goes to poweroff state. When I reboot the instance using nova it replaces the .xml file with scsi and again the same error.

vathanlal gravatar imagevathanlal ( 2018-02-26 07:40:25 -0600 )edit

I used this link for customizing .xml . But not working as I mentioned in above comment.

vathanlal gravatar imagevathanlal ( 2018-02-26 07:43:42 -0600 )edit

Please take a look at this link, hope this will be helpful.

TijoV gravatar imageTijoV ( 2018-02-27 04:42:18 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2018-02-13 09:33:52 -0600

Seen: 400 times

Last updated: Feb 26 '18