No domain XML passed as stdin for bhyve hooks
Software environment
- Operating system: FreeBSD
- Architecture: amd64
- kernel version: FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC
- libvirt version: v9.1.0
- Hypervisor and version: bhyve
Description of problem
I'm trying to set up a socat
proxy to redirect the serial console of the domain to be accessed by nova-serialproxy
. This could be done by writing a hook script for the bhyve driver. But it seems libvirtd does not pass the domain XML as stdin to the hook script according to the following call:
https://gitlab.com/libvirt/libvirt/-/blob/master/src/bhyve/bhyve_process.c?ref_type=heads#L102-103
bhyveProcessStartHook(virDomainObj *vm, virHookBhyveOpType op)
{
if (!virHookPresent(VIR_HOOK_DRIVER_BHYVE))
return 0;
return virHookCall(VIR_HOOK_DRIVER_BHYVE, vm->def->name, op,
VIR_HOOK_SUBOP_BEGIN, NULL, NULL, NULL);
}
I really need the domain XML to extract the allocated serial port number in order to set up the socat
proxy, right now the stdin is empty. Is there any concern that we don't pass the XML here? Thanks!