Robert, following
http://www.howtoforge.com/virtualization-with-kvm-on-a-debian-squeeze-server
i reach to the conclusion that using kvm network config is
"troublesome".
I ended using "--network=bridge:br0 " on startup the vm, with qemu .
Anyway, from another squeeze (my work computer), installed Virtual
machine manager and never
looked back. virsh never worked right for me .
Regards.
Pablo Sánchez
PS:
http://www.techotopia.com/index.php/Creating_Xen_and_KVM_RHEL_5_Virtual_Machines_from_the_Command-line_%28virt-install_and_virsh%29
was also helpful
I have tried a KVM setup 2 different ways. The first was using a
straight bridge without using tap at all. The WinXP VM is using
the latest known version of the virtio drivers. The bridge is on
a gigabit nic.
The second setup was using a bridge containing a tap0 interface
and using the tap0 interface in the KVM config.
I have tested network speeds from the host with other machines in
the network using iperf. Bridge interface to other machine on the
network is fast with with speeds you would expect from using 1G
nics. Using the same iperf tests, I get about 1/100 of the speed
when using the bridge or tap0 interfaces with the virtio nic.
WinXP shows the virtio nic as being 1 Gbps device.
I am including some of my config below. Anyone have suggestions
on how to get greater than 1MBs transfer rates when using KVM in a
bridged setup?
####interfaces####
iface br0 inet static
address 192.168.0.155
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
# gateway 192.168.0.1
bridge_ports eth3 tap0
bridge_stp off
bridge_maxwait 0
bridge_fd 0
pre-up /usr/sbin/tunctl -u libvirt-qemu -t tap0
pre-up ifconfig tap0 up
post-down ifconfig tap0
####interfaces####
###libvirt xml file###
<domain type='kvm'>
<name>WINXPVM</name>
<uuid>f1340442-6088-11e0-a43a-001b214871e8</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc-0.12'>hvm</type>
<boot dev='cdrom'/>
</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='disk'>
<driver name='qemu' type='raw'/>
<source file='/kvm/WINXP/WINXP.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0'
unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/kvm/iso/WINXP-PRO-SP3-VIRTIO.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1'
unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
</controller>
<interface type='ethernet'>
<mac address='de:ad:be:ef:9a:9e'/>
<target dev='tap0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='29005' autoport='no'
keymap='en-us'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
###libvirt xml file###
--
Robert Goley
FOSS
Implementation Specialist
Toll Free: (800) 338-4984
Local: (770) 479-7933
Fax: (770) 479-4076
www.openrda.com
America's only Free & Open Source
fund accounting software company.
|