From 23ae32e09feda8a714811083f62910154981b870 Mon Sep 17 00:00:00 2001 From: Thomas Hipp Date: Tue, 8 Aug 2017 16:55:29 +0200 Subject: fix XML name of DHCP host element Use `` instead of `` as libvirt complains about the latter. Signed-off-by: Thomas Hipp --- libvirt/utils_libvirt.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libvirt/utils_libvirt.go b/libvirt/utils_libvirt.go index 7918aac6..cc86b1ec 100644 --- a/libvirt/utils_libvirt.go +++ b/libvirt/utils_libvirt.go @@ -14,7 +14,11 @@ func getHostXMLDesc(ip, mac, name string) string { MAC: mac, Name: name, } - xml, err := xmlMarshallIndented(dd) + tmp := struct { + XMLName xml.Name `xml:"host"` + libvirtxml.NetworkDHCPHost + }{xml.Name{}, dd} + xml, err := xmlMarshallIndented(tmp) if err != nil { panic("could not marshall host") } -- cgit v1.2.3