[libvirt] [PATCH go-xml] Add support for host paravirt bootloader, used by Xen and bhyve.

Brandon Bergren posted 1 patch 6 years, 5 months ago
Failed in applying to current master (apply log)
domain.go      |  2 ++
domain_test.go | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
[libvirt] [PATCH go-xml] Add support for host paravirt bootloader, used by Xen and bhyve.
Posted by Brandon Bergren 6 years, 5 months ago
---
 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
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH go-xml] Add support for host paravirt bootloader, used by Xen and bhyve.
Posted by Daniel P. Berrange 6 years, 5 months ago
On Tue, Nov 07, 2017 at 02:17:41PM -0600, Brandon Bergren wrote:
> ---
>  domain.go      |  2 ++
>  domain_test.go | 16 ++++++++++++++++
>  2 files changed, 18 insertions(+)

THanks, pushed to git master


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list