Re: [libvirt-users] C code to generate domain XML

2015-03-19 Thread Eric Blake
On 03/19/2015 02:50 PM, Parvathi wrote:
 Hi,
 
 Are there any C code (in libvirt) to generate domain XML like the one we
 supply to virsh?

As to your direct question, yes, libvirt.git contains code to generate
domain XML - when you do something like 'virsh edit', you are doing a
round trip of libvirtd generating XML, virsh displaying it for you to
edit, virsh handing your edits back to libvirtd, and libvirtd parsing
the edited XML.  The libvirtd side of that lives in
src/conf/domain_conf.c and friends.

But it sounds like you may be asking a higher-level question not about
libvirtd's internals but about what other client softward can use to
ease its own management of XML.  You may be interested in the
libvirt-glib project.  Here's a blog entry with more details:

https://www.berrange.com/posts/2011/11/22/introducing-the-libvirt-glib-a-mapping-of-the-libvirt-api-and-xml-to-glibgobject/

In particular, the libvirt-gconfig subproject deals with C code (and
other language bindings) for more easily generating libvirt XML within
the framework of glib's GObject classes.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Regarding save and restore in libvirt 1.2.2

2015-03-19 Thread cool dharma06
hi all,

i am exploring openstack. By the openstack i experimented the resizing
instance its working fine.

But from virsh i tried save and redstore VM its not working properly.

i put GDB on libvirtd process also its not showing anything. its running
perfectly.

while virsh save vm id filename - saving the VM and get into shutdown
state.

then i tried to restore by virsh restore filename --running - its showing
as running then its getting destroyed automatically. I cant able find the
issue.

I grepped the logs also its not showing anything related to errors.

2. By virsh save-image-edit  filename
i tried to edit the vCPUs number but i am not able to edit and save the
file. Its showing the following error -  error: unsupported
configuration: Target domain vCPU count 2 does not match source 1

Give some suggestions to resolve the issue.

Thanks  regrads,
cooldharma06  .. :)
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] pty pairing host - guest

2015-03-19 Thread Daniel P. Berrange
On Thu, Mar 19, 2015 at 01:29:37PM +0530, Neel Basu wrote:
 HI!,
 
 I am using virt-manager GUI. There I can add a `Console Device`  through
 Add Hardware. I can add a virtio pty WITHOUT restarting the VM. also I get
 a pty allocated to host machine say `/dev/pty/M`
 
 My expectation is this `host:/dev/pty/M` is connected with a
 `guest:/dev/ttyN`. so If I open minicom or screen and write to
 `host:/dev/pty/M` it will be propagated to 'guest:/dev/ttyN'. Is my
 expectation correct ?
 
 If it is correct how will I know what is the guest tty allocated against
 this host pty ?

No, that's not how it works.  The console devices are exposed to
the guest as /dev/hvcNN devices. Starting with NN==0


 Similar to console device I can add a Serial device but that requires a
 reboot of the guest VM. However I tried that though I prefer to do it
 without a guest restart.
 
 serial type='pty'
   source path='/dev/pts/1'/
   target port='0'/
   alias name='serial0'/
  /serial
 
 here also I expected host:/dev/pts/1 is paired with /dev/ttyS0 but couldn't
 communicate.

The serial port device supported is a 1990 era ISA bus serial port
so there's no hotplug for that. Only the paravirt consoles can be
hotplugged.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


[libvirt-users] pty pairing host - guest

2015-03-19 Thread Neel Basu
HI!,

I am using virt-manager GUI. There I can add a `Console Device`  through
Add Hardware. I can add a virtio pty WITHOUT restarting the VM. also I get
a pty allocated to host machine say `/dev/pty/M`

My expectation is this `host:/dev/pty/M` is connected with a
`guest:/dev/ttyN`. so If I open minicom or screen and write to
`host:/dev/pty/M` it will be propagated to 'guest:/dev/ttyN'. Is my
expectation correct ?

If it is correct how will I know what is the guest tty allocated against
this host pty ?

This is what I've tried:

dumpxml returns
console type='pty' tty='/dev/pts/1'
  source path='/dev/pts/1'/
  target type='serial' port='0'/
  alias name='serial0'/
 /console

I expected host:/dev/pts/1 is paired with guest:/dev/ttyS0. so I opened
screen/cat/echo on both sides but could not exchange messages

--

Similar to console device I can add a Serial device but that requires a
reboot of the guest VM. However I tried that though I prefer to do it
without a guest restart.

serial type='pty'
  source path='/dev/pts/1'/
  target port='0'/
  alias name='serial0'/
 /serial

here also I expected host:/dev/pts/1 is paired with /dev/ttyS0 but couldn't
communicate.

My sole requirement is to have a tty pair in host and guest that can be
used to communicate with each other. I am using qemu-kvm.

Thank You.
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] getting oriented/networking

2015-03-19 Thread Boylan, Ross
I've been using virt-manager and kvm with a disk image (as in the raw bits) 
from a physical windows 7 machine.  Initial performance was dreadful, but 
improved as I switched to virtio and spice.  I've been running linux VM's 
somewhat longer (much longer if you count kvm without libvirt).

There are lots of choices exposed by virt-manager.  How do I find out what the 
choices mean, and which are good ones?  This was true for the video (resolved 
by following instructions for spice, though I still wonder what the other 
settings are for), disks and the network.

In particular, I have a choice of lots of interfaces for my network; I picked 
eth1:macvtap because I wanted to bridge eth1.  But there is a Source Mode 
which I left at VEPA, even though Bridged was another choice.  But the bridge 
would already seem implicit in picking a source device of eth1:macvtap.  I 
don't know what source mode means.  The choices in the GUI seem like some of 
the options listed under forward on http://libvirt.org/formatnetwork.html; is 
that a good place to look for clarification.

I started a 2nd VM that also used eth1:macvtap (with virtio) and it had almost 
no network throughput.  So maybe I should use some other method?  I notice the 
network manager connection gui allows creation of bridges on the network; 
should I be using that?

I have been reading documentation, but I haven't found either a task-oriented 
discussion (to get a windows machine working well, use these options or 
follow these steps) or an easy way to go from the choices in the GUI to a 
discussion of their meaning.

Thanks for any help you can offer.
Ross Boylan

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


Re: [libvirt-users] libvirt-python Segfaults

2015-03-19 Thread Harish Vishwanath
Trying again.

Is there another mailer list for libvirt-python related discussions?

Regards,
Harish

On Thu, Mar 19, 2015 at 9:02 PM, Harish Vishwanath harish.shas...@gmail.com
 wrote:

 Hello

 I am trying to get libvirt-python working in Ubuntu 14.04 64 bit system. I
 tried installing the binaries from the repo itself:

 1.

 root@test-vm8-109:/home/test# libvirtd --version
 libvirtd (libvirt) 1.2.2
 root@test-vm8-109:/home/test# python
 Python 2.7.6 (default, Mar 22 2014, 22:59:56)
 [GCC 4.8.2] on linux2
 Type help, copyright, credits or license for more information.
  import libvirt
  libvirt.__file__
 '/usr/lib/python2.7/dist-packages/libvirt.pyc'
  c = libvirt.virConnect(lxc:///)
  c.listAllDomains()
 Segmentation fault (core dumped)


 2. Installing the latest libvirt-python from pypi (1.2.13) also has the
 same issue.


 This is the gdb bt of the core:

 [Thread debugging using libthread_db enabled]
 Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
 Core was generated by `python test.py'.
 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  0x7fd8d91b19a9 in virObjectIsClass () from /usr/lib/libvirt.so.0
 (gdb) bt
 #0  0x7fd8d91b19a9 in virObjectIsClass () from /usr/lib/libvirt.so.0
 #1  0x7fd8d9268d02 in virConnectListAllDomains () from
 /usr/lib/libvirt.so.0
 #2  0x7fd8d964db96 in libvirt_virConnectListAllDomains
 (self=optimized out, args=optimized out)
 at libvirt-override.c:2470
 #3  0x0052c6d5 in PyEval_EvalFrameEx ()
 #4  0x0055c594 in PyEval_EvalCodeEx ()
 #5  0x0052ca8d in PyEval_EvalFrameEx ()
 #6  0x0055c594 in PyEval_EvalCodeEx ()
 #7  0x005b7392 in PyEval_EvalCode ()
 #8  0x00469663 in ?? ()
 #9  0x004699e3 in PyRun_FileExFlags ()
 #10 0x00469f1c in PyRun_SimpleFileExFlags ()
 #11 0x0046ab81 in Py_Main ()
 #12 0x7fd8da894ec5 in __libc_start_main (main=0x46ac3f main, argc=2,
 argv=0x7fff0fcbd218,
 init=optimized out, fini=optimized out, rtld_fini=optimized out,
 stack_end=0x7fff0fcbd208)
 at libc-start.c:287
 #13 0x0057497e in _start ()


 Am I missing something?

 Regards,
 Harish

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Building libvirt 1.2.13 from source

2015-03-19 Thread Shanzhi Yu
- Original Message -

| From: Harish Vishwanath harish.shas...@gmail.com
| To: libvirt-users libvirt-users@redhat.com
| Sent: Thursday, March 19, 2015 11:35:53 PM
| Subject: [libvirt-users] Building libvirt 1.2.13 from source

| Hello

| I am trying to build libvirt 1.2.13 (latest) from source on a Ubuntu 14.04 64
| bit box. After installing all the dependencies (libyajl, libdevmapper,
| libpciaccess, libnl), I could finish the build and install. However,
| invoking libvirtd throws this:

| root@ubuntu:/home/hvishwanath/Downloads/libvirt-1.2.13# libvirtd
| libvirtd: /usr/lib/libvirt-qemu.so.0: version `LIBVIRT_QEMU_1.2.3' not found
| (required by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.9' not found (required
| by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.3' not found (required
| by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.11' not found (required
| by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.7' not found (required
| by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.12' not found (required
| by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.5' not found (required
| by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.6' not found (required
| by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.8' not found (required
| by libvirtd)
| libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_1.2.13' not found
| (required by libvirtd)

| Any help is much appreciated.

I usually try to create the correct soft link for 
libvirt.so.0/libvirt-qemu.so.0 when I met this. 
like below: 

# ldd `which libvirtd` 
linux-vdso.so.1 = (0x7ffc64e92000) 
libvirt-lxc.so.0 = /lib64/libvirt-lxc.so.0 (0x7f2206e3) 
libvirt-qemu.so.0 = /lib64/libvirt-qemu.so.0 (0x7f2206c2c000) 
libvirt.so.0 = not found 
 
# ln -s /usr/lib64/libvirt.so.0.1002.14 /usr/lib64/libvirt.so.0 

# ldd `which libvirtd` 
linux-vdso.so.1 = (0x7ffd42327000) 
libvirt-lxc.so.0 = /lib64/libvirt-lxc.so.0 (0x7fbe43a1e000) 
libvirt-qemu.so.0 = /lib64/libvirt-qemu.so.0 (0x7fbe4381a000) 
libvirt.so.0 = /lib64/libvirt.so.0 (0x7fbe432e) 
 

# libvirtd 

| Regards,
| Harish

| ___
| libvirt-users mailing list
| libvirt-users@redhat.com
| https://www.redhat.com/mailman/listinfo/libvirt-users
-- 
Regards 
shyu 
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Building libvirt 1.2.13 from source

2015-03-19 Thread Eric Blake
On 03/19/2015 09:35 AM, Harish Vishwanath wrote:
 Hello
 
 I am trying to build libvirt 1.2.13 (latest) from source on a Ubuntu 14.04
 64 bit box. After installing all the dependencies (libyajl, libdevmapper,
 libpciaccess, libnl), I could finish the build and install. However,
 invoking libvirtd throws this:
 
 root@ubuntu:/home/hvishwanath/Downloads/libvirt-1.2.13# libvirtd
 libvirtd: /usr/lib/libvirt-qemu.so.0: version `LIBVIRT_QEMU_1.2.3' not
 found (required by libvirtd)

Usually, this is a sign of your self-built images conflicting with
distro images (that is pulling in an older distro .so instead of your
just-built .so), and often because you used different configure
arguments than your distro.  I don't build much on Ubuntu so I can't
tell you the exact recipe to use, but I can recommend two possible
solutions:

1. completely uninstall the pre-built distro version, so that you have
only your self-built version accessible

2. when self-building, make sure you use the same configure arguments as
your distro would do (on Fedora-based distros, you can do this with
./autogen.sh --system, when building from git)

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Development of application on using the libvirt API(s)

2015-03-19 Thread Parvathi
Hi,

I am developing an application that would essentially control/run VMs on a
X86_64 host machine. The existing OS is 32 bit based so the application
needs to be 32bit too. KVM/QEMU are 64 bit so that guests could be either
be 32 or 64 bit. Does using libvirt as 32bit library on a 64bit host
(capable of hosting 32 and 64 bit guests) pose any problems? Will it even
work?

Thanks,
Parvathi
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Building libvirt 1.2.13 from source

2015-03-19 Thread Michal Privoznik
On 19.03.2015 16:35, Harish Vishwanath wrote:
 Hello
 
 I am trying to build libvirt 1.2.13 (latest) from source on a Ubuntu
 14.04 64 bit box. After installing all the dependencies (libyajl,
 libdevmapper, libpciaccess, libnl), I could finish the build and
 install. However, invoking libvirtd throws this:
 
 root@ubuntu:/home/hvishwanath/Downloads/libvirt-1.2.13# libvirtd 
 libvirtd: /usr/lib/libvirt-qemu.so.0: version `LIBVIRT_QEMU_1.2.3' not
 found (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.9' not found
 (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.3' not found
 (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.11' not found
 (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.7' not found
 (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.12' not found
 (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.5' not found
 (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.6' not found
 (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.8' not found
 (required by libvirtd)
 libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_1.2.13' not
 found (required by libvirtd)
 
 Any help is much appreciated.


What arguments have you passed to configure? I usually use:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
--libdir=/usr/lib64/

Michal

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


Re: [libvirt-users] Development of application on using the libvirt API(s)

2015-03-19 Thread Eric Blake
On 03/19/2015 11:44 AM, Parvathi wrote:
 Hi,
 
 I am developing an application that would essentially control/run VMs on a
 X86_64 host machine. The existing OS is 32 bit based so the application
 needs to be 32bit too. KVM/QEMU are 64 bit so that guests could be either
 be 32 or 64 bit. Does using libvirt as 32bit library on a 64bit host
 (capable of hosting 32 and 64 bit guests) pose any problems? Will it even
 work?

Yes, a 32-bit libvirt.so client on one host can correctly control a
64-bit libvirtd on another host.  There are some APIs that (for
historical reasons) pass a 'long'; these APIs properly flag overflow if
a value cannot be converted from 64-bit on the host down to the limited
32-bit on the client.  But as long as the API doesn't trigger that large
of a value, you are fine.  And for everything specified as 'int' or
'long long', it all works just fine.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] C code to generate domain XML

2015-03-19 Thread Parvathi
Hi,

Are there any C code (in libvirt) to generate domain XML like the one we
supply to virsh?

Thanks!
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] still possible to use traditional bridge network setup ?

2015-03-19 Thread Lentes, Bernd
Laine wrote:


 -Original Message-
 From: sendmail [mailto:justsendmailnothinge...@gmail.com] On Behalf
 Of Laine Stump
 Sent: Tuesday, March 17, 2015 3:57 PM
 To: libvirt-users@redhat.com
 Cc: Lentes, Bernd
 Subject: Re: [libvirt-users] still possible to use traditional bridge network
 setup ?

 On 03/16/2015 01:07 PM, Lentes, Bernd wrote:
  Bernd wrote:
 
  Laine wrote:
 
  -Original Message-
  From: sendmail [mailto:justsendmailnothinge...@gmail.com] On
  Behalf Of
  Laine Stump
  Sent: Monday, March 16, 2015 4:12 PM
  To: libvirt-users@redhat.com
  Cc: Lentes, Bernd
  Subject: Re: [libvirt-users] still possible to use traditional
  bridge network setup ?
 
  On 03/16/2015 10:08 AM, Lentes, Bernd wrote:
  Hi,
 
  i'm currently installing a SLES 12 64bit system.
  libvirt-client-1.2.5-
  13.3.x86_64 and libvirt-daemon-1.2.5-13.3.x86_64.
  Formerly I created my vm's (KVM) using a traditional bridge in my
  host
  systems, mostly SLES 11 SP3.
  But with SLES 12 I don't succeed. I can use the macvtap device in
  the
  host, but I like to be able to communicate between host and guest.
  Is the traditional bridge setup not any longer available ?
  Nothing has been removed in libvirt. Traditional bridges work just
 fine.
  What failure did you see?
  Hi Laine,
 
  thank you for your answer. Well, it simply does not work:
 
  this is my setup:
 
  pc63422:/etc/sysconfig/network # cat ifcfg-br0 BOOTPROTO='dhcp4'
  TYPE='Bridge'
  BRIDGE='yes'
  DEVICE='br0'
  BRIDGE_FORWARDDELAY='0'
  BRIDGE_PORTS='eth0'
  BRIDGE_STP='off'
  BROADCAST=''
  DHCLIENT_SET_DEFAULT_ROUTE='yes'
  ETHTOOL_OPTIONS=''
  IPADDR=''
  MTU=''
  NAME=''
  NETMASK=''
  NETWORK=''
  REMOTE_IPADDR=''
  STARTMODE='auto'
  USERCONTROL='no
 
  pc63422:/etc/sysconfig/network # cat ifcfg-eth0 #
 BOOTPROTO='dhcp'
  BROADCAST=''
  ETHTOOL_OPTIONS=''
  IPADDR=''
  MTU=''
  NAME=''
  NETMASK=''
  NETWORK=''
  REMOTE_IPADDR=''
  STARTMODE='auto'
  DHCLIENT_SET_DEFAULT_ROUTE='yes'
  PREFIXLEN=''
  BOOTPROTO='static'
  USERCONTROL='no'
  BRIDGE='br0'
 
 
  guest.xml:
  ...
  interface type='bridge'
mac address='52:54:00:37:92:b1'/
source bridge='br0'/
model type='rtl8139'/
address type='pci' domain='0x' bus='0x00' slot='0x03'
  function='0x0'/
  /interface
  ...
 
  pc63422:/etc/sysconfig/network # ip addr
  1: lo: LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state
 UNKNOWN
  group default
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo
 valid_lft forever preferred_lft forever
  inet6 ::1/128 scope host
 valid_lft forever preferred_lft forever
  2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc
 pfifo_fast
  master br0 state UP group default qlen 1000
  link/ether 78:24:af:9c:bd:a6 brd ff:ff:ff:ff:ff:ff
  inet6 fe80::7a24:afff:fe9c:bda6/64 scope link
 valid_lft forever preferred_lft forever
  27: br0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc
 noqueue
  state UP group default
  link/ether 78:24:af:9c:bd:a6 brd ff:ff:ff:ff:ff:ff
  inet 10.35.34.115/24 brd 10.35.34.255 scope global br0
 valid_lft forever preferred_lft forever
  inet6 fe80::7a24:afff:fe9c:bda6/64 scope link
 valid_lft forever preferred_lft forever
  28: vnet0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc
  pfifo_fast master br0 state UNKNOWN group default qlen 500
  link/ether fe:54:00:37:92:b1 brd ff:ff:ff:ff:ff:ff
  inet6 fe80::fc54:ff:fe37:92b1/64 scope link
 valid_lft forever preferred_lft forever
 
 
  Attached is what I choose during creation of the vm. It's german,
  network source means something like name of the shared device.
 
  I attached the host to a network hub to be able to sniff all packets.
  But I don't see any packet from the guest. E.g. I choosed dhclient
  after booting a knoppix cd in the guest, but no packet from the
  guest. Also using a windows 7 installation cd - no packet from the
  guest. But I see packets from the host.
  Hi,
 
  using the above mentioned setup, i booted the guest using a knoppix
 cd. Inside the guest I configured the ip address statically. I can ping from
 host to guest and vice versa, but nothing else. Of course the host is able
 to connect everything, but the guest just reaches the host.

 I assume your dhcp server is on a different machine (since your host is
 also using dhcp on that interface), so if communication between the
 guest and the outside didn't work later, it's not going to work for dhcp
 either. The most common two causes of this symptom in a bridged setup
 are:

 1) there are iptables rules in place (on the host) that prevent the traffic
 crossing the bridge, and the bridge module tunable net.bridge.bridge-nf-
 call-iptables is set to 1 (on the host). You can determine this by running:

sysctl net.bridge.bridge-nf-call-iptables

 If it's set to 1, set it to 0 with:

sysctl -w net.bridge.bridge-nf-call-iptables=0

 (Note that 

[libvirt-users] libvirt-python Segfaults

2015-03-19 Thread Harish Vishwanath
Hello

I am trying to get libvirt-python working in Ubuntu 14.04 64 bit system. I
tried installing the binaries from the repo itself:

1.

root@test-vm8-109:/home/test# libvirtd --version
libvirtd (libvirt) 1.2.2
root@test-vm8-109:/home/test# python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type help, copyright, credits or license for more information.
 import libvirt
 libvirt.__file__
'/usr/lib/python2.7/dist-packages/libvirt.pyc'
 c = libvirt.virConnect(lxc:///)
 c.listAllDomains()
Segmentation fault (core dumped)


2. Installing the latest libvirt-python from pypi (1.2.13) also has the
same issue.


This is the gdb bt of the core:

[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `python test.py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7fd8d91b19a9 in virObjectIsClass () from /usr/lib/libvirt.so.0
(gdb) bt
#0  0x7fd8d91b19a9 in virObjectIsClass () from /usr/lib/libvirt.so.0
#1  0x7fd8d9268d02 in virConnectListAllDomains () from
/usr/lib/libvirt.so.0
#2  0x7fd8d964db96 in libvirt_virConnectListAllDomains (self=optimized
out, args=optimized out)
at libvirt-override.c:2470
#3  0x0052c6d5 in PyEval_EvalFrameEx ()
#4  0x0055c594 in PyEval_EvalCodeEx ()
#5  0x0052ca8d in PyEval_EvalFrameEx ()
#6  0x0055c594 in PyEval_EvalCodeEx ()
#7  0x005b7392 in PyEval_EvalCode ()
#8  0x00469663 in ?? ()
#9  0x004699e3 in PyRun_FileExFlags ()
#10 0x00469f1c in PyRun_SimpleFileExFlags ()
#11 0x0046ab81 in Py_Main ()
#12 0x7fd8da894ec5 in __libc_start_main (main=0x46ac3f main, argc=2,
argv=0x7fff0fcbd218,
init=optimized out, fini=optimized out, rtld_fini=optimized out,
stack_end=0x7fff0fcbd208)
at libc-start.c:287
#13 0x0057497e in _start ()


Am I missing something?

Regards,
Harish
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Building libvirt 1.2.13 from source

2015-03-19 Thread Harish Vishwanath
Hello

I am trying to build libvirt 1.2.13 (latest) from source on a Ubuntu 14.04
64 bit box. After installing all the dependencies (libyajl, libdevmapper,
libpciaccess, libnl), I could finish the build and install. However,
invoking libvirtd throws this:

root@ubuntu:/home/hvishwanath/Downloads/libvirt-1.2.13# libvirtd
libvirtd: /usr/lib/libvirt-qemu.so.0: version `LIBVIRT_QEMU_1.2.3' not
found (required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.9' not found
(required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.3' not found
(required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.11' not found
(required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.7' not found
(required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.12' not found
(required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.5' not found
(required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.6' not found
(required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_1.2.8' not found
(required by libvirtd)
libvirtd: /usr/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_1.2.13' not found
(required by libvirtd)

Any help is much appreciated.

Regards,
Harish
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users