# Bhyve guest on nested GPT won't boot



## aragats (Apr 19, 2020)

What's wrong with such configuration? A bhyve() guest (MS Windows 10) is installed on /dev/nvd1p4 (GPT disk). It won't boot with UEFI error "Boot failed. EFI Hard Drive".
I created a partition which is in its turn partitioned with GPT scheme. The partition type shouldn't matter, right? So, "mbr" sounds kind of reasonable (there is no "gpt" type):
	
	



```
% gpart show nvd1
=>        40  1953525088  nvd1  GPT  (932G)
          40      409600     1  efi  (200M)
      409640   935329792     2  freebsd-ufs  (446G)
   935739432     8921088     3  freebsd-swap  (4.3G)
   944660520   268435456     4  mbr  (128G)
  1213095976   740429152        - free -  (353G)

% gpart show nvd1p4
=>       40  268435376  nvd1p4  GPT  (128G)
         40       2008          - free -  (1.0M)
       2048    1083392       1  ms-recovery  (529M)
    1085440     204800       2  efi  (100M)
    1290240      32768       3  ms-reserved  (16M)
    1323008  267112408       4  ms-basic-data  (127G)
```
The nesting is enabled:
	
	



```
% sysctl kern.geom.part
kern.geom.part.mbr.enforce_chs: 0
kern.geom.part.gpt.allow_nesting: 1
kern.geom.part.separator: 
kern.geom.part.allow_nesting: 1
kern.geom.part.auto_resize: 1
kern.geom.part.check_integrity: 1
```
I tried different emulation type for the disk: "ahci", "virtio-blk", "nvme" with no luck.
The exactly same guest from a regular image file works just fine.

Thanks for ideas!


----------

