On a Sunday in 2021, Roman Bogorodskiy wrote:
Currently, nmdm console device requires user to specify master and
slave
path attributes (such as /dev/nmdm0A and /dev/nmdm0B respectively).
However, making user find a non-occupied device name might be not
convenient, especially for the remote connections.
Update the logic to make these attributes optional. In case if not
specified, use /dev/nmdm$UUID[AB], where $UUID is a domain's UUID.
With this schema it's unlikely nmdm device will clash with other domains
or even other non-bhyve nmdm devices.
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
src/bhyve/bhyve_domain.c | 14 ++++++
src/conf/domain_validate.c | 15 +++----
...gv-console-master-slave-not-specified.args | 11 +++++
...-console-master-slave-not-specified.ldargs | 3 ++
...rgv-console-master-slave-not-specified.xml | 24 ++++++++++
tests/bhyvexml2argvtest.c | 1 +
...out-console-master-slave-not-specified.xml | 44 +++++++++++++++++++
tests/bhyvexml2xmltest.c | 1 +
8 files changed, 104 insertions(+), 9 deletions(-)
create mode 100644
tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args
create mode 100644
tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs
create mode 100644
tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.xml
create mode 100644
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console-master-slave-not-specified.xml
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano