Giter Club home page Giter Club logo

libvirt-go-xml's Introduction

GitLab CI Build Status CII Best Practices Translation status

Libvirt API for virtualization

Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.

For some of these hypervisors, it provides a stateful management daemon which runs on the virtualization host allowing access to the API both by non-privileged local users and remote users.

Layered packages provide bindings of the libvirt C API into other languages including Python, Perl, PHP, Go, Java, OCaml, as well as mappings into object systems such as GObject, CIM and SNMP.

Further information about the libvirt project can be found on the website:

https://libvirt.org

License

The libvirt C API is distributed under the terms of GNU Lesser General Public License, version 2.1 (or later). Some parts of the code that are not part of the C library may have the more restrictive GNU General Public License, version 2.0 (or later). See the files COPYING.LESSER and COPYING for full license terms & conditions.

Installation

Instructions on building and installing libvirt can be found on the website:

https://libvirt.org/compiling.html

Contributing

The libvirt project welcomes contributions in many ways. For most components the best way to contribute is to send patches to the primary development mailing list. Further guidance on this can be found on the website:

https://libvirt.org/contribute.html

Contact

The libvirt project has two primary mailing lists:

Further details on contacting the project are available on the website:

https://libvirt.org/contact.html

libvirt-go-xml's People

Contributors

andreabolognani avatar bdragon28 avatar berrange avatar chemhack avatar crazykev avatar crobinso avatar deasmi avatar eskultety avatar evilr00t avatar jsimonetti avatar nhlfr avatar pmhahn avatar purpleidea avatar shashwatsh avatar vincentbernat avatar vladikr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libvirt-go-xml's Issues

(Un)marshal <hookData> ?

Add support for hookData defined for network hook wiki

<hookData> <network> <name>$network_name</name> <uuid>afca425a-2c3a-420c-b2fb-dd7b4950d722</uuid> ... </network> <domain type='$domain_type' id='$domain_id'> <name>$domain_name</name> <uuid>afca425a-2c3a-420c-b2fb-dd7b4950d722</uuid> ... </domain> </hookData>

qemu udp networking support

To support Qemu UDP unicast tunneling the interface definition should like like:

<devices>
  <interface type='udp'>
    <mac address='52:54:00:22:c9:42'/>
    <source address='127.0.0.1' port='11115'>
      <local address='127.0.0.1' port='11116'/>
    </source>
  </interface>
</devices>

Currently the DomainInterfaceSource struct is missing the local entry.

No vlan tag and source pci in interface hostdev mode

Example xml below:

    <interface type='hostdev' managed='yes'>
      <mac address='52:54:01:9a:a9:17'/>
      <driver name='vfio'/>
      <source>
        <address type='pci' domain='0x0000' bus='0x06' slot='0x10' function='0x0'/>
      </source>
      <vlan>
        <tag id='101'/>
      </vlan>
      <model type='rtl8139'/>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>

Not possible set type for domain interface

Hi, I need following configuration for domain interface:

    <interface type="ethernet">
      <target dev="eth1"></target>
      <model type="virtio"></model>
    </interface>

But there is no type field in libvirtGoXML.DomainInterface struct, and when I'm trying to validate domain with interface without type validation fails:

vagrant@node1:/vagrant/tests/go/e2e/hypervisor$ cat domain.xml
<domain type="kvm">
  <name>f45ca900-3415-45b1-8cfc-d81651fc7e9a</name>
  <memory unit="b">2000</memory>
  <currentMemory unit="b">2000</currentMemory>
  <vcpu>4</vcpu>
  <cputune>
    <shares>2</shares>
  </cputune>
  <os>
    <type arch="x86_64">hvm</type>
    <boot dev="hd"></boot>
  </os>
  <features>
    <acpi></acpi>
  </features>
  <clock offset="utc"></clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type="block" device="disk">
      <driver name="qemu" type="raw" cache="none"></driver>
      <source dev="/dev/vg1/aad102ed-fc2d-4459-bad4-4e414f88b629"></source>
      <target dev="vda" bus="virtio"></target>
    </disk>
    <interface>
      <target dev="6201d5ad4153466"></target>
      <model type="virtio"></model>
    </interface>
    <serial type="pty">
      <target port="0"></target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"></target>
    </console>
    <channel type="unix">
      <target type="virtio" name="org.qemu.guest_agent.0"></target>
      <address type="virtio-serial" controller="0" bus="0" port="1"></address>
    </channel>
    <graphics type="vnc"></graphics>
  </devices>
</domain>

vagrant@node1:/vagrant/tests/go/e2e/hypervisor$ virt-xml-validate domain.xml
Relax-NG validity error : Extra element devices in interleave
domain.xml:20: element devices: Relax-NG validity error : Element domain failed to validate content
domain.xml fails to validate
vagrant@node1:/vagrant/tests/go/e2e/hypervisor$ 


Random number generator device

It looks like there's no way to specify tpm or rng device. Without /dev/urandom linux would struggle to boot.

Something like this:

      Rngs:
       Model: virtio
       Backend:
          Model: random
          Value: /dev/urandom

should be transformed into this:

    <rng model='virtio'>
      <backend model='random'>/dev/urandom</backend>
    </rng>

Multiple Interface Source Attributes

The xml unmarshaling of the DomainInterface currently ignores attributes, e.g. when the interface type is "network" but still a bridge is provided as source, like in the following snippet:

<interface type='network'>
    <source network='default' bridge='virbr0'/>
    ...
</interface>

In https://github.com/libvirt/libvirt-go-xml/blob/master/domain.go#L3231-L3234 the bridge attribute is ignored for the above case, since the type is "network", although it is specified.

Is this on purpose? If not, I would be happy to contribute to a fix.

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.