Hi,
On a fresh FC12 system, I am able to create and run KVM-based vms with tap networking using the qemu-kvm command line but not using virsh.
I have user and group set to "root" in /etc/libvirt/qemu.conf. "user mode networking" works with virsh, but not tap!
I have this xml:
<domain type='kvm'>
<name>centos</name>
<uuid>22d9d573-d82c-c18d-36c0-d3ffef057468</uuid>
<memory>131072</memory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64'>hvm</type>
</os>
<features>
<acpi/>
<pae/>
</features>
<clock offset='utc'/>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<source file='/var/lib/images/centos.5-4.x86-64/centos-small.img'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='user'>
<mac address='52:54:00:7e:5b:58'/>
</interface>
<interface type='ethernet'>
<mac address='52:54:00:2e:33:c8'/>
<script path='/var/lib/images/centos.5-4.x86-64/qemu-ifup'/>
</interface>
<graphics type='vnc' port='5910' autoport='no' listen=''/>
</devices>
</domain>
This won't start even
when I execute virsh as root:
[root@fc12 centos.5-4.x86-64]# virsh -c qemu+unix:///system create domr.xml
error: Failed to create domain from domr.xml
error: monitor socket did not show up.: No such file or directory
[root@fc12 centos.5-4.x86-64]# tail -3 /var/log/libvirt/qemu/centos.log
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.11 -m 128 -smp 1 -name centos -uuid 22d9d573-d82c-c18d-36c0-d3ffef057468 -monitor unix:/var/lib/libvirt/qemu/centos.monitor,server,nowait -boot c -drive file=/var/lib/images/centos.5-4.x86-64/centos-small.img,if=ide,index=0,boot=on -net nic,macaddr=52:54:00:7e:5b:58,vlan=0,name=nic.0 -net user,vlan=0,name=user.0 -net nic,macaddr=52:54:00:2e:33:c8,vlan=1,name=nic.1 -net tap,script=/var/lib/images/centos.5-4.x86-64/qemu-ifup,vlan=1,name=tap.0 -serial none -parallel none -usb -vnc :10 -vga cirrus
warning: could not configure /dev/net/tun: no virtual
network emulation
qemu: Could not initialize device 'tap'
'***** But I can execute the same command line and it works!!********
[root@fc12 centos.5-4.x86-64]# LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.11 -m 128 -smp 1 -name centos -uuid 22d9d573-d82c-c18d-36c0-d3ffef057468 -monitor unix:/var/lib/libvirt/qemu/centos.monitor,server,nowait -boot c -drive file=/var/lib/images/centos.5-4.x86-64/centos-small.img,if=ide,index=0,boot=on -net nic,macaddr=52:54:00:7e:5b:58,vlan=0,name=nic.0 -net user,vlan=0,name=user.0 -net nic,macaddr=52:54:00:2e:33:c8,vlan=1,name=nic.1 -net tap,script=/var/lib/images/centos.5-4.x86-64/qemu-ifup,vlan=1,name=tap.0 -serial none -parallel none -usb -vnc :10 -vga cirrus &
[2] 4543
[root@fc12 centos.5-4.x86-64]# ps -ef | grep qemu
root 4543 3449 0 19:02 pts/12 00:00:00 /usr/bin/qemu-kvm -S -M pc-0.11
-m 128 -smp 1 -name centos -uuid 22d9d573-d82c-c18d-36c0-d3ffef057468 -monitor unix:/var/lib/libvirt/qemu/centos.monitor,server,nowait -boot c -drive file=/var/lib/images/centos.5-4.x86-64/centos-small.img,if=ide,index=0,boot=on -net nic,macaddr=52:54:00:7e:5b:58,vlan=0,name=nic.0 -net user,vlan=0,name=user.0 -net nic,macaddr=52:54:00:2e:33:c8,vlan=1,name=nic.1 -net tap,script=/var/lib/images/centos.5-4.x86-64/qemu-ifup,vlan=1,name=tap.0 -serial none -parallel none -usb -vnc :10 -vga cirrus