search for: xmldesc

Displaying 20 results from an estimated 43 matches for "xmldesc".

2012 May 08
2
creation of storage volume fails
hi, i am getting this error below when i try to create a storage volume: ? ? libvirt.virStoragePool.CreateXML(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.storagePoolLookupByNam...
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?virConnect.defineXML and pass that onto virDomain.create. however, since the domain was created sometime in the past, i am not sure on how...
2015 Dec 02
1
create a directory storage pool in a random location
Hi all, I am trying to figure out if you can store the definition of a directory storage pool in a custom location. This is how I create the storage pool: xmlDesc = """ <pool type='dir'> <name>guest_images_storage_pool</name> <uuid>8c79f996-cb2a-d24d-9822-ac7547ab2d01</uuid> <capacity unit='bytes'>4306780815</capacity> <allocation unit='bytes'>237457858</allocation&...
2016 Jan 07
3
Unable to retrieve Guest IP Addresses via libvirt API
...amp;ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE, NULL); ifaces_count = F_virDomainInterfaceAddresses(domain, &ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT, NULL); I'm not able to get a ifaces_count different from -1 Additionnaly : - IP Addresses are not present within the xmldesc of this Guest.(not sure that they should appear there) I'm running libvirt-1.2.17-13.el7.x86_64 Did I misunderstood something ? As ovirt manager shows the address correctly , it should be possible to get it via libvirt ... Thanks for help. J.P. Ribeauville P: +33.(0).1.47.17.20.49 . Put...
2012 Jan 10
1
Looking for feedback
...on II from a backup of XML descriptions. That's not quite an automated/fluent process, and the idea of doubling hypervisors into a HA cluster just for that matter is clearly overkill to me. Are you, by chance, aware of an OpenSource libvirt-based solution that is able to keep track of each VM xmldesc, starting lost guests as transient domains on another hypervisor upon failure of the original hypervisor ?
2016 Jan 29
2
generate interface MAC addresses in a particular order
Hi all, I am using libvirt to manage VM on my system; after creating a VM (default no NICs are present in the configuration) you can add any number of interfaces to it (as long as they exist on the host). To do that, I edit the configuration xlm: vmXml = self.domain.XMLDesc() root = ET.fromstring(vmXml) devices = root.find('./devices') intf = ET.SubElement(devices,'interface') intf.set('type', 'bridge') src = ET.SubElement(intf,'source') src.set('bridge', bIntf) mo...
2018 Mar 20
2
About libvirt domain snapshot problem(for single disk snapshot)
...n> <disks> <disk name='vda' snapshot='external'> </disk> </disks> </domainsnapshot> """ flags = 0 flags |= libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY flags |= libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE ret = dom.snapshotCreateXML(xmlDesc=xml, flags=flags) ``` ``` result [root@10k03 ~]# ls -lh /opt/Images/*sysdisk_by_xml -rw-------. 1 qemu qemu 194K 3月 20 23:52 /opt/Images/00d76a58-9637-4402-9739-21afd1246e06.sysdisk_by_xml -rw-------. 1 qemu qemu 1.2M 3月 21 00:03 /opt/Images/8d582c1c-355a-4297-9434-2f2f562c77df.sysdisk_by_xml ``...
2015 Dec 11
2
libvirt domain configuration xml
I am trying to change a domain configuration from a python script. More specific, I want to edit the VNC settings. You can't do this using the libvirt API so you have to edit the domain configuration: Fo exmple, to disable VNC for a domain 'test1': vmXml = vm.XMLDesc(0) root = ET.fromstring(vmXml) devices = root.find('./devices') graphics = devices.find('graphics') devices.remove(graphics) xml = ET.tostring(root) with open('path_to/test1.xml', 'w') as f: f.write(xml) not the problem is with the test1.xml. Even though the domain...
2015 Dec 17
2
migrate a guest from VMware to KVM
...the "no boot disk found" message when starting the vm. When importing the VM through the libvirtAPI, I use the same xml description virsh outputs (dumpxml) after initially doing the import. xml - the description I got using virsh xmldump <domain name> xmlDesx = xml conn.defineXML(xmlDesc) One other important aspect is I am using a directory storage pool to store all my volumes (.img files). When I use virsh to import the vm, the storage pool recognizes the new volume (the .img file I converted from the .vmdk file). But when I use the libvirtAPI, it does not. So my guess is that b...
2011 Aug 30
0
conflict disk error
...get_disk d = cli.disk_prompt(None, kwargs) File "/usr/lib/python2.4/site-packages/virtinst/cli.py", line 277, in disk_prompt if dev.is_conflict_disk(conn) is True: File "/usr/lib/python2.4/site-packages/virtinst/VirtualDisk.py", line 890, in is_conflict_disk xml = vm.XMLDesc(0) File "/usr/lib64/python2.4/site-packages/libvirt.py", line 247, in XMLDesc if ret is None: raise libvirtError ('virDomainGetXMLDesc() failed', dom=self) libvirtError: Unknown failure -- command used: virt-install --nographics --paravirt --name dora --ram 2048 --file /dor...
2014 Mar 26
1
Recreating nwfilter rules without a restart
Let's say I have some iptables rules defined to restrict guest traffic. If I restart the hosts firewall 'service iptables restart', all the guest-specific rules get blown away. Is there a way to reapply all the guest firewall rules, without restarting each individual guest? It looks like if I edit a nwfilter with `virsh nwfilter-edit` it goes and reapplies the rules to all the
2014 Jul 29
1
Running domain-update memory not working
...524288L, 524288L, 1, 20400000000L] >>> vm.setMemoryFlags(509952,1) # Live memory 0 >>> vm.info() [1, 524288L, 524288L, 1, 21430000000L] >>> vm.setMemoryFlags(509952,0) --- ## current memory 0 >>> vm.info() [1, 524288L, 524288L, 1, 21430000000L] >>> vm.XMLDesc() Not updating .. but api call not throwing any error.. What is the correct procedure for updating
2010 Mar 22
0
need help on working with libvirt+virtualbox
...the xml (i have working vdi file which is created using GUI and has ubuntu installed , i just want to start that using another machine ) as soon as i try following code i am getting segfault , i am suspecting some problem with xml input import libvirt conn=libvirt.open('vbox:///session') xmldesc = <above string> dom=conn.createLinux(xmldesc,0) Segmentation fault in my home directory/Machines xml file is created <?xml version="1.0"?> <VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.9-linux"> <Machine uuid=&quo...
2016 Feb 01
1
Re: generate interface MAC addresses in a particular order
...o manage VM on my system; after creating a VM > (default > > no NICs are present in the configuration) you can add any number of > > interfaces to it (as long as they exist on the host). > > To do that, I edit the configuration xlm: > > > > vmXml = self.domain.XMLDesc() > > root = ET.fromstring(vmXml) > > devices = root.find('./devices') > > > > intf = ET.SubElement(devices,'interface') > > intf.set('type', 'bridge') > > src = ET.SubElement(intf,'sourc...
2015 Dec 01
1
Why does libvirt insert USB controller automagically?
...hon snippet to show that behavior: import libvirt conn = libvirt.open('qemu:///system') xml_list = open('/tmp/vm.xml', "r").readlines() in_xml = ''.join(xml_list) <-- This XML string does not have a USB or a memballoon dom = conn.defineXML(in_xml) out_xml = dom.XMLDesc() <-- But this XML string does! print out_xml The file /tmp/vm.xml does not have a memballoon or a USB device. Neither, of course, does in_xml string. But out_xml has: <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus=...
2016 Jan 08
2
Re: operation forbidden Read Only Access
...amp;ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE, NULL); ifaces_count = F_virDomainInterfaceAddresses(domain, &ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT, NULL); I'm not able to get a ifaces_count different from -1 Additionnaly : - IP Addresses are not present within the xmldesc of this Guest.(not sure that they should appear there) I'm running libvirt-1.2.17-13.el7.x86_64 Did I misunderstood something ? As ovirt manager shows the address correctly , it should be possible to get it via libvirt ... Thanks for help. J.P. Ribeauville P: +33.(0).1.47.17.20.49 . Put...
2009 Sep 01
15
install sxce as paravirtual guest
I have tried to define a domain or using virt-install both failed. Could some one give me the correct command to do this? I used: virt-install --nographics --paravirt --os-type=solaris --os-variant=opensolaris --ram 1024 --name cam-host --disk path=/dev/dsk/c0t600A0B800049E902000008EB4A9CE744d0p0,driver=phy -l /export/media_images/sol-nv-b121-x86-dvd.iso thx, florian
2017 Apr 20
2
Re: libvirtd segfault when using oVirt 4.1 with graphic console - CentOS7.3
hello, I attached core dump - not sure if it was what you have asked for I am rather just admin not developer :) Regards, Rafal Wojciechowski W dniu 20.04.2017 o 16:44, Pavel Hrdina pisze: > On Thu, Apr 20, 2017 at 07:36:42AM +0200, Rafał Wojciechowski wrote: >> hello, >> >> I am getting such error: >> libvirtd[27218]: segfault at 0 ip 00007f4940725721 sp
2015 Dec 01
0
Re: Why does libvirt insert USB controller automagically?
...> > conn = libvirt.open('qemu:///system') > > xml_list = open('/tmp/vm.xml', "r").readlines() > > in_xml = ''.join(xml_list) ?*This XML string does not have a USB or a memballoon* > > dom = conn.defineXML(in_xml) > > out_xml = dom.XMLDesc() ?*But this XML string does!* > > print out_xml > > > > The file /tmp/vm.xml does not have a memballoon or a USB device. Neither, of > course, does in_xml string. But out_xml has: > > <controller type='usb' index='0'> > > <...
2015 Dec 11
0
Re: libvirt domain configuration xml
...> specific, I want to edit the VNC settings. You can't do this using the > libvirt API so you have to edit the domain configuration: Umm, the libvirt API _is_ how you edit the domain configuration. > > Fo exmple, to disable VNC for a domain 'test1': > > vmXml = vm.XMLDesc(0) > root = ET.fromstring(vmXml) > devices = root.find('./devices') > graphics = devices.find('graphics') > devices.remove(graphics) > xml = ET.tostring(root) > with open('path_to/test1.xml', 'w') as f: > f.write(xml) Writing to path_to/test1.xm...