search for: virconnect

Displaying 20 results from an estimated 28 matches for "virconnect".

2012 May 09
3
creating a domain
hi, i am a bit confused on how to start an inactive domain using the python bindings, any help would be appreciated. (inactive as in the domain was created with?virConnect.defineXML sometime in the past) looks like i have to use virDomain.create, however virDomain.create needs a defined domain xmldesc as a parameter and i am not sure on how to get that i guess if?virConnect.create was happening right after?virConnect.defineXML i could get the return value of?virCo...
2012 May 05
1
listing active and defined vs inactive and defined domains
i am trying to list active + defined and inactive + defined domains using libvirt 0.9.4 i can get active domains using: def s_activedomains(conn): #get active domain ids numofdomains=libvirt.virConnect.numOfDomains(conn) activedomains=libvirt.virConnect.listDomainsID(conn) return activedomains i am stuck on how to get inactive domains the example listed here?http://libvirt.org/guide/html/Application_Development_Guide-Guest_Domains-Listing.html under example 4.4 and example 4.5 seems to be outda...
2012 May 04
1
free memory on hypervisor
...ng to get the free memory on a hypervisor using libvert, with the python api bindings as per?http://libvirt.org/python.html, it should be pretty easy, however the below is failing: #conn is a connection object freemem=libvirt.virNode.getFreeMemory(conn) although this works fine: software=libvirt.virConnect.getType(conn) if software == ?'QEMU': logging.debug('hypervisor is type QEMU')
2015 Mar 20
1
Re: libvirt-python Segfaults
Hi Harish, I believe the proper establishment of a connection should be done by libvirt.open() or libvirt.openAuth() or libvirt.openReadOnly(). All of them will return a functional virConnect instance. I'm not sure this segfault is worth to fix since instantiate a virConnect directly is not an expected usage. Hope this information will help you. Best Regards, Hao Liu +86-010-62608262 ----- Original Message ----- > From: "Harish Vishwanath" <harish.shastry@gmail...
2015 Mar 19
2
libvirt-python Segfaults
...ault, 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...
2012 May 07
1
libvirt python api for storage-volumes and storage-pools
hi, how do i list storage pools and volumes using the python bindings? basically the python api calls for?virsh pool-list and virsh vol-list thanks
2013 Apr 25
2
How to tell if a hypervisor connection has died?
Hi, What's the best way to tell if a virConnect object is not good to use anymore? (For example because the libvirtd on the other side crashed/has been stopped or because of some network failure) When I try this, the first API call I do on a broken connection yields an error with error number 38 (VIR_ERR_SYSTEM_ERROR) and all subsequent call...
2012 May 08
2
creation of storage volume fails
...eateXML(storagepoolobject,xmldesc,0) AttributeError: class virStoragePool has no attribute 'CreateXML' my code is: xmldesc="xml description of storage volume which i got from sudo virsh vol-dumpxml" #get a storage pool object to use in creating a volume storagepoolobject=libvirt.virConnect.storagePoolLookupByName(conn,'poolname') #now try to create the volume using the above storage pool object libvirt.virStoragePool.CreateXML(storagepoolobject,xmldesc,0) from python: -bash-4.1$ python >>> import libvirt >>> dir(libvirt.virStoragePool) ['UUID',...
2012 May 04
1
maxvcpu
hi, i am trying to find out the max vcpus supported for any domain by my hypervisor, however i am having some trouble with the below: vcpu=5 maxvcpus=libvirt.virConnect.getMaxVcpus(conn,'kqemu') if maxvcpus <= vcpu: logging.debug('checkmaxvcpus: max vcpus on hypervisor %i is less than requested vcpu of %i' % (maxvcpus, vcpu)) return 0 else: return 1 http://libvirt.org/html/libvirt-libvirt.html#virConnectGetMaxVcpus says that i need: conn:point...
2012 May 05
1
printing domain information
how do i print the features of a domain from functions that return a domain object? for instance mydomain =?virdomain=libvirt.virConnect.lookupByID(conn,domainid) so mydomain is?virDomainPtr, which is?typedef virDomain * virDomainPtr i am not sure on how to print the domain object features in python, such as name, disk size, etc
2012 May 09
2
serial console
hi, when creating a domain using libvirt python api, how would i tell libvirt to use a unique serial port number for domains? in the?libvirt.virConnect.defineXML(conn,domainxml) call when i create the domainxml object, i need to ensure that the part below has a unique # for target port <serial type='pty'> ? <target port='0'/> </serial> <console type='pty'> ? <target type='serial' port=...
2019 Jan 22
0
Re: libvirt 5.0.0 - LXC container still in "virsh list" output after shutdown
...tainer we get error on call domain.info(): (Pdb) self.state_id, self.maxmem, self.mem, self.cpus, self.cput = self.domain.info() *** libvirtError: operation failed: Cannot read cputime for domain where self.domain is correct domain pointer: (Pdb) self.domain.__dict__ {'_conn': <libvirt.virConnect object at 0x7ff95f881550>, '_o': <capsule object "virDomainPtr" at 0x7ff95f8cca80>} Compare with case just after libvirtd restart and domain stopped: (Pdb) self.domain.info() [5, 2097152L, 2097152L, 2, 0L] Problem reproduced on 2 nodes for lxc. Qemu container on same no...
2012 Jul 06
0
CPU usage by libvirtd
...ound that the libvirtd may cost 30% or above cpu time. Is it normal in my case? I tried to reduce this cpu consumption and found some variable in libvirtd.conf and got a little confused by variables like max_clients, max_workers, max_requests. In my opinion, max_clients limits the number of virConnect created by app. max_workers limits the number of thread to handle requests from clients. Does that mean requests from one client may be handled in multi-thread way if max_workers is greater than max_workers? max_request limits the concurrent RPC calls according the comments in libvirtd.conf...
2015 Mar 20
0
Re: libvirt-python Segfaults
...gt; [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 enabl...
2018 Feb 27
1
Reply: Fail in virDomainUpdateDeviceFlags (libvirt-4.0.0 + Qemu-kvm 2.9.0 + Ceph 10.2.10)
...t;/auth><target bus="ide " dev="hdc" /><readonly /></disk>, flags=0x1 ... 2018-02-27 09:27:43.788+0000: 16656: info : virObjectNew:254 : OBJECT_NEW: obj=0x7f2084003cc0 classname=qemuDomainStorageSourcePrivate 2018-02-27 09:27:43.788+0000: 16656: debug : virConnectOpen:1169 : name=secret:///system 2018-02-27 09:27:43.788+0000: 16656: info : virObjectNew:254 : OBJECT_NEW: obj=0x7f20840008c0 classname=virConnect 2018-02-27 09:27:43.788+0000: 16656: debug : virConfLoadConfig:1576 : Loading config file '/etc/libvirt/libvirt.conf' 2018-02-27 09:27:43.788+0...
2019 Jan 21
2
libvirt 5.0.0 - LXC container still in "virsh list" output after shutdown
Hello. Centos 7.6 with libvirt build from base "virt" repository: libvirt-daemon-driver-lxc-5.0.0-1.el7.x86_64 libvirt-client-5.0.0-1.el7.x86_64 libvirt-daemon-5.0.0-1.el7.x86_64 libvirt-daemon-driver-network-5.0.0-1.el7.x86_64 libvirt-libs-5.0.0-1.el7.x86_64 + systemd-219-62.el7_6.2.x86_64 Now lxc containers with type='direct' can be started, but can't be stopped :)
2018 Oct 02
1
Libvirt 4.2.0 hang on destination on live migration cancel
...05:14:05.054+0000: 16207: debug : virEventPollInterruptLocked:722 : Skip interrupt, 0 0 2018-10-02 05:14:05.054+0000: 16207: info : virEventPollAddTimeout:253 : EVENT_POLL_ADD_TIMEOUT: timer=1 frequency=-1 cb=0x5559f8dba380 opaque=0x7ffe5b15e700 ff=(nil) 2018-10-02 05:14:05.054+0000: 16207: debug : virConnectOpenAuth:1218 : name=<null>, auth=0x7f70c1ddea00, flags=0x0 2018-10-02 05:14:05.054+0000: 16207: info : virObjectNew:254 : OBJECT_NEW: obj=0x5559fa83a3f0 classname=virConnect 2018-10-02 05:14:05.054+0000: 16208: debug : virThreadJobSet:99 : Thread 16208 is now running...
2017 Feb 17
2
"virsh list" hangs
...58:36.127+0000: 18505: debug : virEventPollInterruptLocked:722 : Skip interrupt, 0 0 2017-02-17 15:58:36.127+0000: 18505: info : virEventPollAddTimeout:253 : EVENT_POLL_ADD_TIMEOUT: timer=1 frequency=-1 cb=0x563a29758360 opaque=0x7fff70941380 ff=(nil) 2017-02-17 15:58:36.127+0000: 18505: debug : virConnectOpenAuth:1245 : name=<null>, auth=0x7f1e5aca2a00, flags=0 2017-02-17 15:58:36.127+0000: 18505: info : virObjectNew:202 : OBJECT_NEW: obj=0x563a2a7f5f50 classname=virConnect 2017-02-17 15:58:36.127+0000: 18505: debug : virConfLoadConfig:1604 : Loading config file '/etc/libvirt/libvirt.co...
2013 Sep 18
0
libvirt report error "error: End of file while reading data: Input/output error" when start domain
...1 debug : virEventPollMakePollFDs:391 : Prepare n=0 w=1, f=5 e=1 d=0 debug : virEventPollCalculateTimeout:332 : Calculate expiry of 0 timers debug : virEventPollCalculateTimeout:361 : Timeout at 0 due in -1 ms debug : virEventPollRunOnce:627 : EVENT_POLL_RUN: nhandles=1 timeout=-1 debug : virConnectOpenAuth:1457 : name=(null), auth=0x3fffd164728, flags=0 debug : virObjectNew:199 : OBJECT_NEW: obj=0x2aad62a1e10 classname=virConnect debug : virObjectNew:199 : OBJECT_NEW: obj=0x2aad62a1f40 classname=virConnectCloseCallbackData debug : virConnectGetConfigFile:998 : Loading config file ...
2013 Jul 14
0
OSX: trying to use libvirt 1.1.0 with VirtualBox 4.2
...1b2385 2013-07-14 20:18:52.005+0000: 18446744073709551615: debug : virEventRunDefaultImpl:270 : running default event implementation 2013-07-14 20:18:52.005+0000: 18446744073709551615: debug : virEventPollCleanupTimeouts:516 : Cleanup 0 2013-07-14 20:18:52.005+0000: 18446744073709551615: debug : virConnectOpenAuth:1446 : name=vbox:///session, auth=0x10e39f940, flags=0 2013-07-14 20:18:52.005+0000: 18446744073709551615: debug : virEventPollCleanupTimeouts:552 : Found 0 out of 0 timeout slots used, releasing 0 2013-07-14 20:18:52.005+0000: 18446744073709551615: debug : virObjectNew:203 : OBJECT_NEW:...