[PATCHv6 5/6] bhyve: Add console support for grub-bhyve bootloader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This enables booting interactive GRUB menus (e.g. install CDs) with
libvirt-bhyve.

Caveat: A terminal other than the '--console' option to 'virsh start'
(e.g. 'cu -l /dev/nmdm0B -s 115200') must be used to connect to
grub-bhyve because the bhyve loader path is synchronous and must occur
before the VM actually starts.

Changing the bhyveProcessStart logic around to accommodate '--console'
for interactive loader use seems like a significant project and probably
not worth it, if UEFI/BIOS support for bhyve is "coming soon."
---
 src/bhyve/bhyve_command.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index 203495c..12eaf71 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -447,6 +447,21 @@ virBhyveProcessBuildGrubbhyveCmd(virDomainDefPtr def,
     virCommandAddArgFormat(cmd, "%llu",
                            VIR_DIV_UP(def->mem.max_balloon, 1024));
 
+    if (def->nserials > 0) {
+        virDomainChrDefPtr chr;
+
+        chr = def->serials[0];
+
+        if (chr->source.type != VIR_DOMAIN_CHR_TYPE_NMDM) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("only nmdm console types are supported"));
+            return NULL;
+        }
+
+        virCommandAddArg(cmd, "--cons-dev");
+        virCommandAddArg(cmd, chr->source.data.file.path);
+    }
+
     /* VM name */
     virCommandAddArg(cmd, def->name);
 
-- 
1.9.3

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]