]> git.ipfire.org Git - thirdparty/libvirt.git/commit
bhyve: auto allocate nmdm console paths
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sun, 7 Feb 2021 03:57:07 +0000 (07:57 +0400)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 8 Feb 2021 14:50:47 +0000 (18:50 +0400)
commitb1e6324ca272acd69573571fcb5184b1ac417d1d
tree5edf9018d083848ac06131440ae32b2f901d6095
parent1fc23c885eec8735b85417d4d824668441139400
bhyve: auto allocate nmdm console paths

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@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/bhyve/bhyve_domain.c
src/conf/domain_validate.c
tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.xml [new file with mode: 0644]
tests/bhyvexml2argvtest.c
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console-master-slave-not-specified.xml [new file with mode: 0644]
tests/bhyvexml2xmltest.c