[virt-tools-list] Is qemu-ifup script called through the virt-manager?

Cole Robinson crobinso at redhat.com
Tue Nov 27 16:25:19 UTC 2012


On 11/14/2012 06:43 AM, faiza anwar wrote:
> Hi,
> 
> I was doing some experimentation with the networking of qemu VMs (configured
> in bridged networking mode). For this, I needed to do some modifications in
> the qemu-ifup script. Actually I wanted that the virtual (tap) interfaces
> should not be added in the linux bridge as they are added in the qemu-ifup
> script. I did those changes in the script and booted the Virtual Machine
> through Virt-Manager GUI. But It seems that the qemu-ifup script is not
> invoked by the Virt-manager at VM startup. Although the VM gets booted
> properly and the created virtual interface is added to the bridge.
> 
> When I see the running processes after booting up the VM I see a long kvm
> command used to boot up the VM.
>> */usr/bin/kvm -S -M pc-1.0 -enable-kvm -m 1024 -smp
> 1,sockets=1,cor**es=1,threads=1 -name VM2 -uuid
> d1e5f7f6-847b-e**127-64bb-d91fdc**e53acd -nodefconfig -nodefaults -chardev
> socket,id=charm**onitor,path=/va**r/lib/libvirt/q**emu/VM2.monitor**,server,nowait
> -mon chardev=charmon**itor,id=monitor**,mode=control -rtc base=utc
> -no-shutdown -drive
> file=/var/lib/l**ibvirt/images/V**M2.img,if=none,**id=drive-virtio**-disk0,format=r**aw
> -device
> virtio-blk-pci,**bus=pci.0,addr=**0x5,drive=drive**-virtio-disk0,i**d=virtio-disk0,**bootindex=1
> -drive if=none,media=c**drom,id=drive-i**de0-1-0,readonl**y=on,format=raw
> -device ide-drive,bus=i**de.1,unit=0,dri**ve=drive-ide0-1**-0,id=ide0-1-0
> -netdev tap,fd=18,id=ho**stnet0 -device
> virtio-net-pci,**netdev=hostnet0**,id=net0,mac=52**:54:00:5e:48:1c**,bus=pci.0,addr**=0x3
> -chardev pty,id=charseri**al0 -device
> isa-serial,char**dev=charserial0**,id=serial0 -usb -vnc�127.0.0.1:0�-vga
> cirrus -device intel-hda,id=so**und0,bus=pci.0,**addr=0x4 -device
> hda-duplex,id=s**ound0-codec0,bu**s=sound0.0,cad=**0 -device
> virtio-balloon-**pci,id=balloon0**,bus=pci.0,addr**=0x6**
> 
> *�If I run that command directly to boot the VM the qemu-ifup script is
> invoked. I assumed that the qemu-ifup script should be invoked through the GUI
> as well but it is not the case. Can you please tell if I am missing on some
> thing here?
> 
> If the qemu-ifup script is not run, where are the virtual interfaces added in
> the bridge?

Libvirt does the programmatically using C code, and passing the open file
descriptors to VM on the command line.

You can make libvirt use the qemu-ifup script if you like but you need to edit
the XML by hand:

http://libvirt.org/formatdomain.html#elementsNICSEthernet

- Cole




More information about the virt-tools-list mailing list