[libvirt-users] libvirt and glusterfs integrate problem

lyz_pro lyz_pro at 163.com
Mon Apr 14 02:45:04 UTC 2014

Hi everyone

I have a problem when use libvirt and glusterfs. 
When I use libvirt to start a vm with glusterfs disk. the operation will block.
after I `CTL + c` the 'virsh start domainxx' comand ,
I use `virsh list` will find the vm in a strange state, kind like follow:
 Id    Name                           State
 20    vm10                           shut off 
and I when I start the vm again, It will promote the vm is in active.

the xml as follow ( is a glusterfs node):
<domain type='kvm' id='20'>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>4</vcpu>
    <type arch='x86_64' machine='rhel6.5.0'>hvm</type>
    <boot dev='hd'/>
  <clock offset='localtime'/>
    <disk type='network' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source protocol='gluster' name='h2216v5/tmp/vm10.img'>
        <host name=''/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    <interface type='bridge'>
      <mac address='00:0c:29:2f:aa:b1'/>
      <source bridge='virbr0'/>
      <target dev='vnet91'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5991' autoport='yes' listen='' keymap='en-us'>
      <listen type='address' address=''/>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
  <seclabel type='none'/>

I can use `qemu-kvm` command to start vm successful with gluster://
I have stop both nodes' iptables. and my libvirt and qemu version is :
Compiled against library: libvirt 1.1.4
Using library: libvirt 1.1.4
Using API: QEMU 1.1.4
Running hypervisor: QEMU 1.6.2

More information about the libvirt-users mailing list