AshleyYakeley / NixVirt

LibVirt domain management for Nix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request "change domain type"

Svenum opened this issue · comments

I would define my own "template" and therefor I need the option to change the domain type from:

<domain type="kvm"> to <domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">

And then I need the option to add qemu commands at the bottom:

...
  <qemu:commandline>
    <qemu:arg value="-cpu"/>
    <qemu:arg value="host,kvm=off,hv_vendor_id=null"/>
    <qemu:arg value="-machine"/>
    <qemu:arg value="q35"/>
  </qemu:commandline>
</domain>

Would it work to do the namespace this way?

...
  <qemu:commandline xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">
    <qemu:arg value="-cpu"/>
    <qemu:arg value="host,kvm=off,hv_vendor_id=null"/>
    <qemu:arg value="-machine"/>
    <qemu:arg value="q35"/>
  </qemu:commandline>
</domain>

It seems , that this would work.

Done. See this file for an example.

Reopen if this doesn't work.

Ok, I will try tomorrow. One Question left. Is there any tool or so to convert an existing XML to Nix? I know I could just use the XML but I think its easyer to debug nix then the xml file. :)

Sorry, XML to Nix you will have to do yourself...

Ok, but thanks

@AshleyYakeley I got the following error:
NixVirt: libvirt error: internal error: missing domain type attribute

I have no right to reopen it

I'm just incompetent and forgot type="kvm" XD
Sorry for the trouble. 😂