Re: [libvirt] [PATCHv6 5/6] bhyve: Add console support for grub-bhyve bootloader
Conrad Meyer wrote: 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. I'm still feeling doubtful about this part. I see the impact of this change in the following way. * Users, who wish to use console with grub-bhyve: - They still cannot use 'virsh console' for that and need to use 'cu' or something like that - They need to update to a specific grub-bhyve version (currently unreleased). The information about required version is not very easy to find, so the chance is high that most users will miss it * Users, who doesn't need to use console with grub-bhyve: - They will still need to update to the specific grub-bhyve version, otherwise a domain with bhyve-grub bootloader will fail with not very obvious from user's POV error because of the unknown argument to grub-bhyve If we leave the thing as is, e.g. only have bootloader support, then we will have: * Users, who with to use console with grub-bhyve: - Have to construct bootloader_args manually to add the --cons-dev argument - Like in a case with an explicit support, cannot use 'virsh console' for the bootloader step - Obviously, need to update grub-bhyve * users, who doesn't need to use console with grub-bhyve - Nothing changes for them, they can use an older grub-bhyve without issues Roman Bogorodskiy -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv6 5/6] bhyve: Add console support for grub-bhyve bootloader
On Thu, Oct 30, 2014 at 2:29 AM, Roman Bogorodskiy bogorods...@gmail.com wrote: Conrad Meyer wrote: 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. I'm still feeling doubtful about this part. I see the impact of this change in the following way. * Users, who wish to use console with grub-bhyve: - They still cannot use 'virsh console' for that and need to use 'cu' or something like that - They need to update to a specific grub-bhyve version (currently unreleased). The information about required version is not very easy to find, so the chance is high that most users will miss it * Users, who doesn't need to use console with grub-bhyve: - They will still need to update to the specific grub-bhyve version, otherwise a domain with bhyve-grub bootloader will fail with not very obvious from user's POV error because of the unknown argument to grub-bhyve If we leave the thing as is, e.g. only have bootloader support, then we will have: * Users, who with to use console with grub-bhyve: - Have to construct bootloader_args manually to add the --cons-dev argument - Like in a case with an explicit support, cannot use 'virsh console' for the bootloader step - Obviously, need to update grub-bhyve * users, who doesn't need to use console with grub-bhyve - Nothing changes for them, they can use an older grub-bhyve without issues Roman Bogorodskiy Hi, I will improve patch 5 to at least do detection and resubmit 5-6. In the mean time, patches 1-4 do not depend on 5-6 and can stand on their own. I believe critiques brought up in earlier reviews have been addressed. Thanks, Conrad -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCHv6 5/6] bhyve: Add console support for grub-bhyve bootloader
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@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list