Ask Your Question
1

[Libvirt] VM does not boot in Ocata (libvirt.xml missing, wrong owner for console.log)

asked 2017-03-02 13:09:35 -0600

Herr-Herner gravatar image

updated 2017-03-03 03:48:08 -0600

I am setting up OpenStack Ocata as HA deployment on Ubuntu 16.04. and I am confronted with a heavy blocker. I have set up Keystone, Glance, Nova, Neutron and Horizon. I am able to create and spawn a VM, but it does not boot.

The block device is created and available in my Ceph cluster. Libvirt gives me only:

Mar 2 17:09:11 os-compute01 virtlogd[3218]: End of file while reading data: Input/output error

The instances folder located under /var/lib/nova/instances contains a folder for the VM, but it contains only the empty file console.log and NO libvirt.xml. Another strange thing is that console.log is owned by root:root. Under Newton the file is owned by libvirt-qemu:kvm. The user libvirt-qemu is not able to write to that file.

I have tried to correct the ownership manaully and copied the VM specification file from "/etc/libvirt/qemu/instance-*.xml" to /var/lib/nova/instancs/[VM-UUID]/libvirt.xml. After rebooting the VM the console.log is owned by root:root again and the VM does not boot, maybe the file is just removed and recreated.

There seems to be problem in the current Ocata release of Nova.

Any hints how to workaround or fix the problem?

Thank you very much!

This is my nova.conf on os-compute01:

[DEFAULT]
compute_monitors = cpu.virt_driver
debug = true
firewall_driver = nova.virt.firewall.NoopFirewallDriver
host = os-compute01
instance_usage_audit = true
instance_usage_audit_period = hour
notify_on_state_change = vm_and_task_state
instances_path = $state_path/instances
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
log_dir = /var/log/nova
memcached_servers = os-memcache:11211
my_ip = 10.30.200.111
notification_driver = messagingv2
resume_guests_state_on_host_boot = true
state_path = /var/lib/nova
transport_url = rabbit://nova:SECRET@os-rabbit01:5672,nova:SECRET@os-rabbit02:5672/openstack
use_neutron = true

[api]
auth_strategy = keystone

[cache]
enabled = true
backend = oslo_cache.memcache_pool
memcache_servers = os-memcache:11211

[cinder]
catalog_info = volumev2:cinderv2:internalURL

[conductor]
use_local = false

[glance]
api_servers = http://os-image:9292

[keystone_authtoken]
auth_type = password
auth_uri = http://os-identity:5000
auth_url = http://os-identity:35357
memcached_servers = os-memcache:11211
password = SECRET
project_domain_name = default
project_name = service
service_token_roles_required = true
user_domain_name = default
username = nova

[neutron]
auth_type = password
auth_uri = http://os-identity:5000
auth_url = http://os-identity:35357
password = SECRET
project_domain_name = default
project_name = service
region_name = RegionOne
url = http://os-network:9696
user_domain_name = default
username = neutron

[oslo_concurrency]
lock_path = /var/lock/nova

[oslo_messaging_rabbit]
amqp_durable_queues = true
rabbit_ha_queues = true
rabbit_retry_backoff = 2
rabbit_retry_interval = 1

[placement]
auth_type = password
auth_uri = http://os-identity:5000
auth_url = http://os-identity:35357
username = placement
password = SECRET
user_domain_name = default
project_name = service
project_domain_name = default
os_interface = internal
os_region_name = RegionOne

[vnc]
enabled = true
novncproxy_base_url = https://os-cloud.materna.com:6080/vnc_auto.html
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip

and my nova-compute.conf:

[DEFAULT]
compute_driver = libvirt.LibvirtDriver

[libvirt]
cpu_mode = custom
cpu_model = SandyBridge
disk_cachemodes="network=writeback"
hw_disk_discard = unmap
images_rbd_ceph_conf = /etc/ceph/ceph.conf
images_rbd_pool = vms
images_type = rbd
inject_key = false
inject_partition = -2
inject_password = false
rbd_secret_uuid = SECRET
rbd_user = cinder
virt_type = kvm
edit retag flag offensive close merge delete

Comments

Have something similar with ubuntu ocata and libvirt 2.5. Libvirt group was changed to from libvirtd to libvirt, but still don't know how to fix that. If find a solution, please share it

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-03-02 16:03:06 -0600 )edit

I solved the issue by adding libvirt.hw_machine_type = "x86_64=pc-i440fx-xenial,i686=pc-i440fx-xenial" to my nova-compute.conf.

Herr-Herner gravatar imageHerr-Herner ( 2017-03-06 08:27:17 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-03-03 03:45:24 -0600

Herr-Herner gravatar image

updated 2017-03-06 05:00:02 -0600

There is another strange thing. I am on Ubuntu 16.04.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

When I create a VM a corresponding xml file gets created in /etc/libvirt/qemu/instance-[id].xml:

<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit instance-0000003c
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>instance-0000003c</name>
  <uuid>7151c8b7-1ea5-4701-bb79-b482d9e253b8</uuid>
  <metadata>
    <nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
      <nova:package version="15.0.0"/>
      <nova:name>test-vm01</nova:name>
      <nova:creationTime>2017-03-03 08:58:02</nova:creationTime>
      <nova:flavor name="mat.medium">
        <nova:memory>4096</nova:memory>
        <nova:disk>20</nova:disk>
        <nova:swap>0</nova:swap>
        <nova:ephemeral>0</nova:ephemeral>
        <nova:vcpus>1</nova:vcpus>
      </nova:flavor>
      <nova:owner>
        <nova:user uuid="17aafbe8a8754c2a8e4de9dc1f0643dc">admin</nova:user>
        <nova:project uuid="53eed6212bd54ff5acc4ad110e9899ac">demo</nova:project>
      </nova:owner>
      <nova:root type="image" uuid="6112eee2-4bbb-450d-b132-e8b0fdaf03f2"/>
    </nova:instance>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</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'>15.0.0</entry>
      <entry name='serial'>3b3fc34f-f5f8-6258-950b-284758b6d5ce</entry>
      <entry name='uuid'>7151c8b7-1ea5-4701-bb79-b482d9e253b8</entry>
      <entry name='family'>Virtual Machine</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-zesty'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
    <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='network' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <auth username='cinder'>
        <secret type='ceph' uuid='e5479084-e43e-4a1e-959a-b9989f02e632'/>
      </auth>
      <source protocol='rbd' name='vms/7151c8b7-1ea5-4701-bb79-b482d9e253b8_disk'>
        <host name='10.30.200.141' port='6789'/>
        <host name='10.30.200.142' port='6789'/>
        <host name='10.30.200.143' port='6789'/>
      </source>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='piix3-uhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <interface type='bridge'>
      <mac address='02:05:69:29:af:e1'/>
      <source bridge='qbr5663b508-00'/>
      <target dev='tap5663b508-00'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <log file='/var/lib/nova/instances/7151c8b7-1ea5-4701-bb79-b482d9e253b8/console.log' append='off'/>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <log file='/var/lib/nova/instances/7151c8b7-1ea5-4701-bb79-b482d9e253b8/console.log' append='off'/>
      <target type='serial ...
(more)
edit flag offensive delete link more

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

1 follower

Stats

Asked: 2017-03-02 13:09:35 -0600

Seen: 1,247 times

Last updated: Mar 06 '17