[libvirt-users] Problem creating VM: "tap: not a valid disk type"
by Arik Raffael Funke
Hi,
I am having problems creating VMs in virt-manager.
I have played with different xen hypervisor versions 3.0 & 3.4 (with rpm
-i --force) but have in principle gone back to the originals. - Though I
cannot absolutely exclude that something has gone wrong.
In principle I am using rhel 5.4 with the gitco xen 3.4 hypervisor.
Can anybody put me on the right track with the attached error message?
Note, the storage file I am attempting to use does exist.
Many thanks,
Arik
===
Unable to complete install 'libvirt.libvirtError POST operation failed:
xend_post: error from xen daemon: (xend.err 'Error creating domain:
Invalid Configuration: tap: not a valid disk type')
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 1485, in
do_install
dom = guest.start_install(False, meter = meter)
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 628,
in start_install
return self._do_install(consolecb, meter, removeOld, wait)
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 726,
in _do_install
self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib64/python2.4/site-packages/libvirt.py", line 1077, in
createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed',
conn=self)
libvirtError: POST operation failed: xend_post: error from xen daemon:
(xend.err 'Error creating domain: Invalid Configuration: tap: not a
valid disk type')
'
14 years, 9 months
[libvirt-users] poor network performance to one of two guests
by Philip Nelson
G'day, I have a host running two kvm guests. One of them gets very poor network
performance, testing with iperf I get ~10MBit/sec to guest A, >400MBit/sec to
guest B (running iperf between the host/guest). Both guests are using the same
bridge:
Guest A:
<interface type='bridge'>
<mac address='54:52:00:75:24:91'/>
<source bridge='br0'/>
</interface>
Guest B:
<interface type='bridge'>
<mac address='54:52:00:3b:13:2a'/>
<source bridge='br0'/>
</interface>
The host and guests are debian lenny, the host I have updated with some packages
from backports.org. The host is running 2.6.30 with qemu-kvm 0.12.2 and libvirt
0.7.5. The host has 8gig ram and a quad core xeon cpu. Each guest is given one
vcpu, guest A has 3gig memory, guest B 1gig.
I have tried starting them in a different order so that one gets vnet0 and one
gets vnet1, it doesn't make a difference, it's always guest A that is slow.
I'm a bit stuck here, I don't know what else to try. Below is some information
for the host/guests, not sure what might be helpful:
ifconfig eth1/br0/vnet0/1 output from the host:
eth1 Link encap:Ethernet HWaddr 00:25:64:3b:65:de
inet6 addr: fe80::225:64ff:fe3b:65de/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7828 errors:0 dropped:0 overruns:0 frame:0
TX packets:6664 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4034843 (3.8 MiB) TX bytes:466838 (455.8 KiB)
Interrupt:17
br0 Link encap:Ethernet HWaddr 00:25:64:3b:65:de
inet addr:192.168.108.1 Bcast:192.168.108.255 Mask:255.255.255.0
inet6 addr: fe80::225:64ff:fe3b:65de/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:110047 errors:0 dropped:0 overruns:0 frame:0
TX packets:111420 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5744145 (5.4 MiB) TX bytes:870431296 (830.1 MiB)
vnet0 Link encap:Ethernet HWaddr 72:48:bc:10:45:d4
inet6 addr: fe80::7048:bcff:fe10:45d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:107881 errors:0 dropped:0 overruns:0 frame:0
TX packets:581468 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:7129781 (6.7 MiB) TX bytes:873414210 (832.9 MiB)
vnet1 Link encap:Ethernet HWaddr 36:20:fc:df:52:66
inet6 addr: fe80::3420:fcff:fedf:5266/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7918 errors:0 dropped:0 overruns:0 frame:0
TX packets:21692 errors:0 dropped:0 overruns:16236 carrier:0
collisions:0 txqueuelen:500
RX bytes:534843 (522.3 KiB) TX bytes:32575099 (31.0 MiB)
# brctl show:
bridge name bridge id STP enabled interfaces
br0 8000.0025643b65de no eth1
vnet0
vnet1
# lsmod | grep kvm
kvm_intel 47336 6
kvm 159032 1 kvm_intel
ifconfig output from guest A:
eth0 Link encap:Ethernet HWaddr 54:52:00:75:24:91
inet addr:192.168.108.100 Bcast:192.168.108.0 Mask:255.255.255.0
inet6 addr: fe80::5652:ff:fe75:2491/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21708 errors:0 dropped:0 overruns:0 frame:0
TX packets:8155 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32576795 (31.0 MiB) TX bytes:553329 (540.3 KiB)
Interrupt:10
ifconfig output from guest B:
eth0 Link encap:Ethernet HWaddr 54:52:00:3b:13:2a
inet addr:192.168.108.101 Bcast:192.168.108.0 Mask:255.255.255.0
inet6 addr: fe80::5652:ff:fe3b:132a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:582733 errors:0 dropped:18 overruns:0 frame:0
TX packets:109328 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:865856730 (825.7 MiB) TX bytes:7230359 (6.8 MiB)
Interrupt:10 Base address:0xe000
Here is the guest A definition:
<domain type='kvm'>
<name>guestA</name>
<uuid>a32a9d3b-e5ae-5943-c6db-52bc118f99c6</uuid>
<memory>3145728</memory>
<currentMemory>3145728</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<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='disk'>
<source file='/var/lib/libvirt/images/guestA'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='file' device='disk'>
<source file='/var/lib/libvirt/images/guestA-data.img'/>
<target dev='vdb' bus='virtio'/>
</disk>
<interface type='bridge'>
<mac address='54:52:00:75:24:91'/>
<source bridge='br0'/>
</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' keymap='en-us'/>
</devices>
</domain>
And guest B:
<domain type='kvm'>
<name>guestB</name>
<uuid>1816a68e-929c-0b36-41ac-a380a4062298</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<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='disk'>
<source file='/var/lib/libvirt/images/guestB'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='file' device='disk'>
<source file='/var/lib/libvirt/images/guestB-data.img'/>
<target dev='vdb' bus='virtio'/>
</disk>
<interface type='bridge'>
<mac address='54:52:00:3b:13:2a'/>
<source bridge='br0'/>
</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' keymap='en-us'/>
</devices>
</domain>
Any help would be greatly appreciated.
-- Philip
14 years, 9 months
[libvirt-users] How to debug Ubuntu 8.04 LTS guest crash during install?
by Neil Aggarwal
Hello:
I am using kvm on a CentOS 5.4 server.
I am trying to install the TunkeyLinux Core appliance
found here: http://www.turnkeylinux.org/core
I downloaded the ISO file from the web site.
Then, I used this command to intall it:
virt-install -n tkl-core -r 512 --vcpus=1 --check-cpu --os-type=linux
--os-variant=ubuntuhardy -v --accelerate
-c /tmp/turnkey-core-2009.10-hardy-x86.iso
-f /var/lib/libvirt/images/tkl-core.img -s 15 -b br0 --vnc noautoconsole
When I connect to the VNC console, I get the Turnkey linux
options screen.
I select Install to hard disk from there and it seems to
start the install but crashes during the installer startup.
This is repeatable so there has to be a way to debug it.
I tried turning on the debug option for virt-install but that
did not give me any useful info.
Any ideas how to debug this?
Thanks,
Neil
--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net/cpanel
cPanel/WHM preinstalled on a virtual server for only $40/month!
No overage charges, 7 day free trial, PayPal, Google Checkout
14 years, 10 months
[libvirt-users] Stealing ownership: chown user->qemu->root
by Matthew Farrellee
F12, libvirt 0.7.1-15, qemu 0.11.0-12, 32 bit
I recently discovered that libvirt is stealing ownership of my disk images. How can I make it stop?
I have a disk image in my home directory, owned by matt. When I create a domain that uses the disk it gets chowned to qemu.qemu. When the domain terminates it is owned by root.root. I've lost access to the file.
It has been suggested that the user->qemu happens to make sure that the qemu account can read/write the file. chmod'ing would be far better and avoid this problem. It appears that libvirt just assumes the disk image was owned by root before being chown'd to qemu.
Another problem with this is qcow disks. If chown'ing to qemu is to ensure that qemu has access to all the disks needed for the domain, it fails for qcow, because the base disk is not chown'd as well. This can result in a very cryptic error message (funny period (.)):
monitor socket did not show up.: No such file or directory
For instance, base.img is owned by matt (u=rw,go=), a qcow disk qcow.img is linked to base.img. When a domain using qcow.img is created qcow.img is owned to qemu, but base.img is not.
Instead of chown'ing, will libvirt provide an error that could cover both these situations? The virt-manager GUI (or virsh TUI) could interpret that error and chmod the proper files transparently, or preemptively chmod the required files. Users of the libvirt API would have to make sure things are setup properly at first and would not have to worry about side-effect changes made by libvirtd.
I think the suggestion holds even if is only the qemu driver doing the chown.
Best,
matt
14 years, 10 months
[libvirt-users] domain -> IP
by Matthew Farrellee
How can I map from a domain to the IP(s) given to its network interfaces?
I'm not specifying a <mac .../> to the domain, so I don't have an upfront mapping setup.
Is the best way to do some upfront mapping, e.g. install static MAC -> IP in the DHCP server and add <mac .../> to my domains?
Best,
matt
14 years, 10 months
[libvirt-users] monitor option in libvirt ?
by Riccardo Veraldi
Hello,
I woudl liek to start qemu-kvm with -monitor myfile.pipe options
instead of default -monitor pty
Anyway I have not found any way to tell libvirt (using virsh) that I
want to set a specific
-monitor option to the qemu-kvm command line.
How can I do this ?
I do not want to start manually qemu-kvm because in this way I will
loose the libvirt VM management
thanks
Rick
14 years, 10 months
[libvirt-users] domain definition storage
by Arik Raffael Funke
Hi,
I defined several xen domains with libvirt. Can anybody tell me where
libvirt stores these definitions? E.g. what files would one need to back up?
Is it correct, that the xen domain definitions in /var/lib/xend/domains
are overwritten regularly by libvirt?
Many thanks,
Arik
14 years, 10 months
[libvirt-users] KVM virtio bonding bandwidth problem
by Didier Moens
(first post)
Dear all,
I have been wrestling with this issue for the past few days ; googling
around doesn't seem to yield anything useful, hence this cry for help.
Setup :
- I am running several RHEL5.4 KVM virtio guest instances on a Dell PE
R805 RHEL5.4 host. Host and guests are fully updated ; I am using iperf
to test available bandwidth from 3 different locations (clients) in the
network to both the host and the guests .
- To increase both bandwidth and fail-over, 3 1Gb network interfaces
(BCM5708, bnx2 driver) on the host are bonded (802.3ad) to a 3 Gb/s
bond0, which is bridged. As all guest interfaces are connected to the
bridge, I would expect total available bandwidth to all guests to be in
the range of 2-2.5 Gb/s.
- Testing with one external client connection to the bare metal host
yields approx. 940 Mb/s ;
- Testing with 3 simultaneous connections to the host yields 2.5 Gb/s,
which confirms a successful bonding setup.
Problem :
Unfortunately, available bandwidth to the guests proves to be problematic :
1. One client to one guest : 250-600 Mb/s ;
2a. One client to 3 guests : 300-350 Mb/s to each guest, total not
exceeding 980 Mb/s;
2b. Three clients to 3 guests : 300-350 Mb/s to each guest ;
2c. Three clients to host and 2 guests : 940 Mb/s (host) + 500 Mb/s to
each guest.
Conclusions :
1. I am experiencing a 40% performance hit (600 Mb/s) on each individual
virtio guest connection ;
2. Total simultaneous bandwidth to all guests seems to be capped at 1
Gb/s ; quite problematic, as this renders my server consolidation almost
useless.
I could bridge each host network interface separately and assign guest
interfaces by hand, but that would defy the whole idea of load balancing
and failover which is provided by the host bonding.
Any ideas anyone, or am I peeking in the wrong direction (clueless
setup, flawed testing methodology, ...) ?
Thanks in advance for any help,
Didier
--
Didier Moens , IT services
Department for Molecular Biomedical Research (DMBR)
VIB - Ghent University
14 years, 10 months
[libvirt-users] libvirt restarting vms on restart?
by Tom Hughes
Recent versions of libvirt seem to have taken to starting new copies of
my vms when they restart.
Any vm marked to start when libvirt is started is started, even if it is
already running, which leads to multiple running vms trying to use the
same disk image.
I think this probably started with the upgrade from 0.7.4 to 0.7.5 but I
can't be entirely sure as I only realised yesterday that I had somehow
managed to get multiple instances of a VM running. It definitely
happened this morning when the updated from 0.7.5.-1 to 0.7.5-3 in the
F12 virt-preview repo caused a restart.
Tom
--
Tom Hughes (tom(a)compton.nu)
http://www.compton.nu/
14 years, 10 months
Re: [libvirt-users] [libvirt] Set MAC address for host virtual interface?
by Neil Aggarwal
Daniel:
This discussion used to be on the libvirt list, but seems
more appropriate for the users list so I am replying here.
> At some time in the past we did set the MAC address on the
> host interface
> too, but it caused networking problems in some configurations
I see. Thanks for the background info.
> I guess you have Cacti configured to pull stats directly from the TAP
> devices on the host ?
I am using bridging, but you are correct. I installed snmpd and
have Cacti pulling stats from it.
> Cacti has the ability to run scripts to pull
> in statistics, so my recommendation would be to add a shell script which
> calls the 'domifstat' command in virsh
> virsh domifstat DOMNAME TAPDEVNAME
The Cacti server is running in a separate machine, not on the host.
I guess I will have to find something that makes the domifstat data
available via an snmp interface.
Do you know of such a tool?
Thanks,
Neil
--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net/centos
CentOS 5.4 VPS with unmetered bandwidth only $25/month!
No overage charges, 7 day free trial, PayPal, Google Checkout
14 years, 10 months