diff --git a/src/brand/bhyve/boot.py b/src/brand/bhyve/boot.py index 421f470de..3cea34f61 100755 --- a/src/brand/bhyve/boot.py +++ b/src/brand/bhyve/boot.py @@ -466,8 +466,17 @@ def apply_bootnext(v): try: bootdisk = z.findattr('bootdisk') + if (bootdiskif := z.findattr('bootdiskif')) is not None: + bootdiskif = bootdiskif.get('value').strip() + try: + bootdiskif = aliases['diskif'][bootdiskif] + except KeyError: + pass + else: + bootdiskif = opts['diskif'] + args.extend([ - '-s', '{0}:0,{1},{2}'.format(BOOTDISK_SLOT, opts['diskif'], + '-s', '{0}:0,{1},{2}'.format(BOOTDISK_SLOT, bootdiskif, diskpath(bootdisk.get('value').strip())) ]) add_bootoption('bootdisk', None, ('pci', f'{BOOTDISK_SLOT}.0')) diff --git a/src/man/bhyve.7 b/src/man/bhyve.7 index 27c73b1ab..c732f89e1 100644 --- a/src/man/bhyve.7 +++ b/src/man/bhyve.7 @@ -60,6 +60,17 @@ A suitable ZFS volume can be created using the command, for example: .Pp .Dl zfs create -V 30G rpool/bootdisk2 +.\" bootdiskif +.It Ic bootdiskif Ar type +.Pp +Specifies the type of interface to which the boot disk will be attached. +See the description of the +.Ic diskif +attribute for a list of available interface types. +.Pp +If unset, the value of the +.Ic diskif +attribute will be used. .\" bootorder .It Ic bootorder Ar option Ns Oo \&, Ns Ar option Ns \&... Oc .Pp