Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Not possible set type for domain interface #27

@arykalin

Description

@arykalin

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$ 


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions