Ask Your Question
1

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

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

vathanlal gravatar image

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

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'>
  <name>instance-00000081</name>
  <uuid>d7c2feae-ce57-4492-b892-35b86d1559f6</uuid>
  <metadata>
    <nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
      <nova:package version="14.0.10"/>
      <nova:name>testingimage</nova:name>
      <nova:creationTime>2018-02-13 13:47:56</nova:creationTime>
      <nova:flavor name="m1.small">
        <nova:memory>1024</nova:memory>
        <nova:disk>10</nova:disk>
        <nova:swap>0</nova:swap>
        <nova:ephemeral>0</nova:ephemeral>
        <nova:vcpus>1</nova:vcpus>
      </nova:flavor>
      <nova:owner>
        <nova:user uuid="b378a2ff41af45bc8e458a2f17c30c3f">vmsec</nova:user>
        <nova:project uuid="7814cec0fc1943b6b08a1a052ffeb4f7">vmsec</nova:project>
      </nova:owner>
      <nova:root type="image" uuid="790b87d7-e345-47a8-9d5e-f7bcc6f7202b"/>
    </nova:instance>
  </metadata>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <shares>1024</shares>
  </cputune>
  <sysinfo type='smbios'>
    <system>
      <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>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-model'>
    <model fallback='allow'/>
    <topology sockets='1' cores='1' threads='1'/>
  </cpu>
  <clock offset='utc'>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

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

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

Thanks

edit flag offensive delete link more

Comments

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 -0500 )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 -0500 )edit

I used this link for customizing .xml https://ask.openstack.org/en/question... . But not working as I mentioned in above comment.

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

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

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

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

Radhakrishnan Rk gravatar image

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

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

Comments

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 -0500 )edit
Deepa gravatar imageDeepa ( 2018-02-26 04:46:01 -0500 )edit

https://openstack.nimeyo.com/104548/o... 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 -0500 )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 -0500 )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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

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

Seen: 170 times

Last updated: Feb 26