[Pkg-libvirt-maintainers] Bug#598149: Bug#598149: libvirt-bin: autostart fails on reboot

Jean-Louis Dupond jean-louis at dupond.be
Mon Sep 27 09:22:10 UTC 2010


On Mon, 27 Sep 2010 11:16:35 +0200, Guido Günther <agx at sigxcpu.org> wrote:
> 
> Could you check the permissions of /dev/net/tun the same way please?
> 
> Also please check if setting user=root/group=root in
> /etc/libvirt/qemu.conf changes anything.
> 
> Please attache the domain xml of the domain that fails to start.
> Cheers,
>  -- Guido

Permissions of /dev/net/tun:
crw-rw---- 1 root uml-net 10, 200 Sep 27 10:21 /dev/net/tun


The guests are running under the user: libvirt-qemu
Thats why I make the tap devices in /etc/network/interfaces with the
correct user.

Changing the group/user to root should fix it, but thats not what I want.
It should be able to use the created tap's.

The XML:
<domain type='kvm'>
  <name>dupondje</name>
  <uuid>28e9972d-c3ef-dfff-792e-5f80cd51a68a</uuid>
  <memory>1048576</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-0.12'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='cdrom'>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/dupondje'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
    </controller>
    <interface type='ethernet'>
      <mac address='52:54:00:xx:xx:xx'/>
      <script path='no'/>
      <target dev='tap2'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
    </video>
  </devices>
</domain>


In the /etc/network/interfaces:
auto tap2
iface tap2 inet static
  address xxx.xx.xx.xx
  netmask 255.255.255.255
  tunctl_user libvirt-qemu
  up route add xx.xx.xx.xx/32 dev tap2





More information about the Pkg-libvirt-maintainers mailing list