[libvirt-users] Guests can't connect to each other
by Anthony Bourguignon
Hi,
I'm using libvirt and qemu on Debian Wheezy. I'm having a strange
behavior. Guests can't connect to each other when they're on the same
host.
On the host I'm using bonding (in active / backup mode) and vlan. It
looks like this :
eth0 \ / macvtap0
bond0 --- vlan222
eth1 / \ macvtap1
So I've got two guests, let's say A and B. When I try to ping B from A,
it works :
# ping -s 3000 -c 5 78.109.95.11
PING 78.109.95.11 (78.109.95.11) 3000(3028) bytes of data.
3008 bytes from 78.109.95.11: icmp_req=1 ttl=64 time=0.065 ms
3008 bytes from 78.109.95.11: icmp_req=2 ttl=64 time=2.19 ms
3008 bytes from 78.109.95.11: icmp_req=3 ttl=64 time=1.43 ms
--- 78.109.95.11 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.065/0.960/2.197/0.760 ms
But nothing happens when I try to ssh it (not even a timeout). You'll
find enclosed the tcpdump captures on the source and the destination.
It's the same when I use netcat in udp.
At the same time, connection from the host to one guest is working
perfectly.
There is no iptables rule on the host, and nothing too on the guests.
Here are the virsh dumpxml of the different components :
# virsh dumpxml vm1
<domain type='kvm' id='11'>
<name>vm1</name>
<uuid>4eaaed00-c610-b468-ad55-600a0b4e244c</uuid>
<memory>2048000</memory>
<currentMemory>2048000</currentMemory>
<memoryBacking>
<hugepages/>
</memoryBacking>
<vcpu cpuset='0,2,4,8,10,12,14'>8</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='0,8'/>
<vcpupin vcpu='1' cpuset='2,10'/>
<vcpupin vcpu='2' cpuset='4,12'/>
<vcpupin vcpu='3' cpuset='6,14'/>
<vcpupin vcpu='4' cpuset='0,8'/>
<vcpupin vcpu='5' cpuset='2,10'/>
<vcpupin vcpu='6' cpuset='4,12'/>
<vcpupin vcpu='7' cpuset='6,14'/>
</cputune>
<os>
<type arch='x86_64' machine='pc-1.0'>hvm</type>
<boot dev='hd'/>
<boot dev='network'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cpu match='exact'>
<model>Westmere</model>
<vendor>Intel</vendor>
<topology sockets='1' cores='8' threads='1'/>
<feature policy='require' name='tm2'/>
<feature policy='require' name='est'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='ds'/>
<feature policy='require' name='smx'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vme'/>
<feature policy='require' name='dtes64'/>
<feature policy='require' name='rdtscp'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='dca'/>
<feature policy='require' name='pbe'/>
<feature policy='require' name='tm'/>
<feature policy='require' name='pdcm'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='ds_cpl'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='xtpr'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='monitor'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/vps/vm1'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</disk>
<interface type='network'>
<mac address='52:54:00:0e:58:ae'/>
<source network='vlan222'/>
<target dev='macvtap0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/0'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/0'>
<source path='/dev/pts/0'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0'
keymap='fr'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<video>
<model type='vga' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</memballoon>
</devices>
</domain>
# virsh dumpxml vm2
<domain type='kvm' id='13'>
<name>vm2</name>
<uuid>4f760831-22b1-ff3b-26e7-6b3fec49e918</uuid>
<memory>2048000</memory>
<currentMemory>2048000</currentMemory>
<memoryBacking>
<hugepages/>
</memoryBacking>
<vcpu cpuset='1,3,5,7,9,11,13,15'>8</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='1,3,5,7,9,11,13,15'/>
<vcpupin vcpu='1' cpuset='1,3,5,7,9,11,13,15'/>
<vcpupin vcpu='2' cpuset='1,3,5,7,9,11,13,15'/>
<vcpupin vcpu='3' cpuset='1,3,5,7,9,11,13,15'/>
<vcpupin vcpu='4' cpuset='1,3,5,7,9,11,13,15'/>
<vcpupin vcpu='5' cpuset='1,3,5,7,9,11,13,15'/>
<vcpupin vcpu='6' cpuset='1,3,5,7,9,11,13,15'/>
<vcpupin vcpu='7' cpuset='1,3,5,7,9,11,13,15'/>
</cputune>
<os>
<type arch='x86_64' machine='pc-1.0'>hvm</type>
<boot dev='hd'/>
<boot dev='network'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cpu match='exact'>
<model>Westmere</model>
<vendor>Intel</vendor>
<topology sockets='1' cores='4' threads='2'/>
<feature policy='require' name='tm2'/>
<feature policy='require' name='est'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='ds'/>
<feature policy='require' name='smx'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vme'/>
<feature policy='require' name='dtes64'/>
<feature policy='require' name='rdtscp'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='dca'/>
<feature policy='require' name='pbe'/>
<feature policy='require' name='tm'/>
<feature policy='require' name='pdcm'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='ds_cpl'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='xtpr'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='monitor'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/vps/vm2'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</disk>
<interface type='network'>
<mac address='52:54:00:cb:ce:41'/>
<source network='vlan222'/>
<target dev='macvtap1'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/1'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5901' autoport='yes' listen='0.0.0.0'
keymap='fr'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<video>
<model type='vga' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</memballoon>
</devices>
</domain>
# virsh net-dumpxml vlan222
<network>
<name>vlan222</name>
<uuid>2b763b5c-4ec1-9b5f-b29d-b7a7ea0f743d</uuid>
<forward dev='vlan222' mode='bridge'>
<interface dev='vlan222'/>
</forward>
</network>
Thanks in advance to help me understand this issue.
12 years, 7 months
[libvirt-users] USB Passthrough with two identical devices
by Hendrik Friedel
Hello,
I'd like to pass throug two identical devices to my VM. (using libvirt,
guest is debian). For one device, it works like this:
<hostdev mode='subsystem' type='usb'>
<source>
<vendor id='0x4fa'/>
<product id='0x2490'/>
</source>
<boot order='2'/>
</hostdev>
But now, I have another device just like this one:
Bus 001 Device 007: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1
Fob, 1-Wire adapter
Bus 001 Device 005: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1
Fob, 1-Wire adapter
Unfortunately, only one of these two devices appears for the Guest, even
if I duplicate the above entry.
Now, there's this option to pass devices:
<address bus='0x06' device='0x02''/>
But the Bus/Device can/might change... Maybe this can be overcome by
udev (and maybe this is the default in ubuntu? can someone confirm?)
I have tried the latter syntax aswell. Here the log-file:
Code:
LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc -cpu qemu32 -enable-kvm -m 256
-smp 1 -name WG -uuid fd90f0d6-122c-992f-a399-4105ee30d6e3 -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/WG.monitor,server,nowait
-monitor chardev:monitor -boot c -drive
file=/var/lib/zentyal/machines/WG/WG-Test.qcow2,if=scsi,index=0,boot=on,format=qcow2
-net nic,macaddr=00:16:3e:5d:c7:9e,vlan=0,name=nic.0 -net
tap,fd=29,vlan=0,name=tap.0 -serial none -parallel none -usb -usbdevice
mouse -vnc 0.0.0.0:0,password -k de -vga cirrus -usbdevice
host:04fa:2490 -usbdevice host:04fa:2490
usb_create: no bus specified, using "usb.0" for "usb-host"
husb: open device 1.5
husb: config #1 need -1
husb: 1 interfaces claimed for configuration 1
husb: grabbed usb device 1.5
usb_create: no bus specified, using "usb.0" for "usb-host"
What's odd in this:
-usbdevice host:04fa:2490 -usbdevice host:04fa:2490
And this, although I had used the bus/device syntax...
So, what would you recommend?
Regards,
Hendrik
12 years, 7 months
[libvirt-users] What does cpu_time returned by virDomainGetCPUStats mean?
by Zhihua Che
hi, everyone.
I find an 'interesting' thing involving virDomainGetCPUStats(). I
call it for cpu usage consumed by a domain and get a array of
virTypedParameter. My system is 2-core and hyperviser return 1
parameter per cpu. So the contents of the array is like this.
virTypedParameter[0]
{
.fiedl = "cpu_time"
.type = 4
.value.ul = 51640610899
}
virTypedParameter[1]
{
.field = "cpu_time"
.type = 4
.value.ul = 55302820304
}
I thought this value store the run time of the cpu since last boot.
But I find I was wrong because this value would increase until it
wraps down and doesn't reset even the domain is restarted.
So, what does this value mean?
How can I get the CPU usage of the domain?
I found nothing on the API reference doc page:-(. No word is
related with the meaning of the returned array of virTypedParameter by
virDomainGetCPUStats().
12 years, 7 months
[libvirt-users] Ansis Atteka has invited you to use Google Talk
by Ansis Atteka
------------------------------------------------------------------------
Ansis Atteka has invited you to sign up for Google Talk so you can talk to each other for free over your computers.
To sign-up, go to:
http://www.google.com/accounts/NewAccount?service=talk&sendvemail=true&sk...
Google Talk is a downloadable Windows* application that offers:
- Free calls over your computer anytime, from anywhere, and for as long as you want
- A simple and intuitive user interface for sending instant messages or making calls--no clutter, pop-ups or ads
- Superior voice quality through just a microphone and computer speaker
- Fast file transfers with no restrictions on file type
After signing-up, download Google Talk and sign in with your new Google Account username and password.
You can then begin inviting anyone you want to talk to for free.
Google Talk works with any computer speaker and microphone, such as the ones built-in to many PC laptops today,
as well as with wired and wireless headsets and USB phones. Google Talk also works across all firewalls.
Google Talk is still in beta. Just like with Gmail, we're working hard to add features and make improvements,
so we might also ask for your comments and suggestions periodically. We appreciate your help in making it even better!
Thanks,
The Google Talk Team
To learn more about Google Talk before signing up, visit:
http://www.google.com/talk/about.html
(If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser).
* Not a Windows user? No problem. You can also connect to the Google Talk service from any platform using third-party clients
(http://www.google.com/talk/otherclients.html).
12 years, 7 months
[libvirt-users] [API reference] confused by CPU time term
by Zhihua Che
Hi, everyone
I'm writing a virtual machine monitor based on libvirt. As I read
the api reference, I found I'm confused by some terms.
1, What is cumulative I/O wait CPU time?
API reference says that VIR_NODE_CPU_STATS_IOWAIT indicate
cumulative I/O wait CPU time. I'm confused by this time. As far as I
know, when cpu meets IO wait situation, it will schedule another task,
so, how this IO wait time is accounted?
2, How do I get VCPU runtime?
In my mind, VIR_DOMAIN_CPU_STATS_CPUTIME indicates the physical
cpu time consumed by the domain. Is there any API by which I can query
virtual CPU running stats in one domain?
12 years, 7 months
[libvirt-users] What's the precision of the domain cpu stats?
by Zhihua Che
Hi, everyone
I'm using libvirt and resort to virDomainGetCPUStats for cpu
usage by one domain. In my system, Ubuntu-11.10 64bit with 2 cores and
Qemu Hyperviser, this function returns something like this:
virTypedParameter[0]
{
field: "cpu_time"
type: 4
value.ul 51640610899
}
virTypedParameter[1]
{
field: "cpu_time"
type: 4
value.ul 55302820304
}
This 51640610899 and 55302820304 kind of conflict the result
returned by "cat /proc/stat | grep cpu"
cpu 449224 6812 89433 4407261 50327 1 2443 0 13041 0
cpu0 224251 2603 43144 2195672 34682 0 2350 0 6692 0
cpu1 224972 4209 46289 2211589 15644 0 93 0 6349 0
I know the precision of /proc/stat is 1/HZ, so what's the precision
of CPU stats returned by virDomainGetCPUStats?
12 years, 7 months
Re: [libvirt-users] libvirt slow responding after define poool with existing VG with some other lv
by Anton Gorlov
16.04.2012 18:05, Cole Robinson написал:
>> 16.04.2012 17:48, Cole Robinson МапОÑал:
>>> Sorry, I'd like to help, but judging by your log file this will be a pain to
>>> figure out and I can't spare the time. Hopefully we can narrow it down
>>> remotely.
>> familiar problem...
>> in strace i see
>> futex(0x7d1f84, FUTEX_WAIT_PRIVATE, 3, NULL) = -1 EAGAIN (Resource temporarily
>> unavailable)
>> futex(0x7d1f84, FUTEX_WAIT_PRIVATE, 5, NULL<detached ...>
> Hmm, maybe try a kernel downgrade?
downgrade kernel to 2.6.32 solve problem.
12 years, 7 months
[libvirt-users] libvirt slow responding after define poool with existing VG with some other lv
by Anton Gorlov
If I add VG with some other lv-s to libvirt pool then libvirt slow
responding. How to fix it?
<pool type='logical'>
<name>LVM_MAIN</name>
<uuid>a2713bed-ad4a-fb79-83b5-65a9e8f1094e</uuid>
<capacity>0</capacity>
<allocation>0</allocation>
<available>0</available>
<source>
<name>LVM_MAIN</name>
<format type='unknown'/>
</source>
<target>
<path>/dev/LVM_MAIN</path>
<permissions>
<mode>0700</mode>
<owner>-1</owner>
<group>-1</group>
</permissions>
</target>
</pool>
vgdisplay
File descriptor 7 (pipe:[37858]) leaked on vgdisplay invocation. Parent
PID 12554: bash
--- Volume group ---
VG Name LVM_MAIN
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 9
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 1.82 TiB
PE Size 4.00 MiB
Total PE 476931
Alloc PE / Size 139520 / 545.00 GiB
Free PE / Size 337411 / 1.29 TiB
VG UUID ymYQtb-Xjnd-OBNv-xnUQ-w9gi-5uxm-kjzo
not created libvirt
/dev/LVM_MAIN/os_mirror
VG Name LVM_MAIN
LV UUID iPfekp-PN1C-rPHP-Bo3K-TljL-cffi-NdDvpi
LV Write Access read/write
LV Status available
# open 1
LV Size 500.00 GiB
Current LE 128000
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
created by libvirt-install
--- Logical volume ---
LV Name /dev/LVM_MAIN/debian6.0-1.img
VG Name LVM_MAIN
LV UUID 23ncRV-yimL-2OTZ-K4ck-YKNo-s6x6-Bjh3cl
LV Write Access read/write
LV Status available
# open 0
LV Size 15.00 GiB
Current LE 3840
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Name /dev/LVM_MAIN/debian6.0-bacula.img
VG Name LVM_MAIN
LV UUID BFANbb-fFpC-k0wZ-ue5e-Y6bF-Rnbg-tmelt0
LV Write Access read/write
LV Status available
# open 0
LV Size 15.00 GiB
Current LE 3840
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
--- Logical volume ---
LV Name /dev/LVM_MAIN/debian6.0-bacula-1.img
VG Name LVM_MAIN
LV UUID nTOAaH-3B50-QtQ7-Xf9k-9Q0H-mftQ-p0zdO6
LV Write Access read/write
LV Status available
# open 0
LV Size 15.00 GiB
Current LE 3840
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
12 years, 7 months
[libvirt-users] A way to determine when a guest domain was launched?
by Amy Skinner
I've looked around at the API documents (I'm using python) and I know how to find the cpu active uptime of the domain, but that only increases if the domain is running something. Is there a way to determine when the domain was first launched, either as a date or uptime with idle uptime included?
/Amy
12 years, 7 months