[libvirt] How to stop libvirt from deleting tap device after shutdown

Matthias Dahl mdvirt at designassembly.de
Mon Mar 2 14:15:17 UTC 2009


I am currently setting up a new server machine which will host several kvm's 
managed largely by libvirt. The network setup though is done prior to libvirtd 
startup and shouldn't be touched by it.

So currently everything works just fine with 0.6.0 except that libvirt deletes 
the tap device after I shut a kvm machine down which is something I naturally 
don't want. I looked through all the documentation I could find but I could 
not come up with a solution.

Forgot to mention: all kvm machine are connected through a tap device with no 
bridge or whatsoever but 1:1 NAT. This done for performance reasons. As model 
I use "virtio".

Any help would be greatly appreciated.

Best regards,
Matthias Dahl

= XML File for one of the machines ===========================================

<domain type='kvm'>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <disk type='file' device='disk'>
      <source file='/dev/diskspace/kvm_charon'/>
      <target dev='vda' bus='virtio'/>
    <interface type='ethernet'>
      <mac address='52:54:00:25:6f:3f'/>
      <script path='/bin/true'/>
      <target dev='charon_pvnet1'/>
      <model type='virtio'/>
    <serial type='pty'>
      <source path='/dev/pts/1'/>
      <target port='0'/>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target port='0'/>

More information about the libvir-list mailing list