---
 domain.go      |  2 ++
 domain_test.go | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/domain.go b/domain.go
index aea54a5..debc5b2 100644
--- a/domain.go
+++ b/domain.go
@@ -797,6 +797,8 @@ type Domain struct {
        VCPU            *DomainVCPU          `xml:"vcpu"`
        VCPUs           *DomainVCPUs         `xml:"vcpus"`
        CPUTune         *DomainCPUTune       `xml:"cputune"`
+       Bootloader      string               `xml:"bootloader,omitempty"`
+       BootloaderArgs  string               `xml:"bootloader_args,omitempty"`
        Resource        *DomainResource      `xml:"resource"`
        SysInfo         *DomainSysInfo       `xml:"sysinfo"`
        OS              *DomainOS            `xml:"os"`
diff --git a/domain_test.go b/domain_test.go
index a7f629e..1ad5125 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -1722,6 +1722,22 @@ var domainTestData = []struct {
                        `</memory>`,
                },
        },
+       /* Host Bootloader -- bhyve, Xen */
+       {
+               Object: &Domain{
+                       Type: "bhyve",
+                       Name: "test",
+                       Bootloader: "/usr/local/sbin/grub-bhyve",
+                       BootloaderArgs: "-r cd0 -m /tmp/test-device.map -M 
1024M linuxguest",
+               },
+               Expected: []string{
+                       `<domain type="bhyve">`,
+                       `  <name>test</name>`,
+                       `  <bootloader>/usr/local/sbin/grub-bhyve</bootloader>`,
+                       `  <bootloader_args>-r cd0 -m /tmp/test-device.map -M 
1024M linuxguest</bootloader_args>`,
+                       `</domain>`,
+               },
+       },
 }
 
 func TestDomain(t *testing.T) {
-- 
2.14.1

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to