# Bhyve newbie: "vm_create: Device not configured"



## astounding (Aug 4, 2020)

I figured I'd mess around with bhyve a bit on on e of my FreeBSD systems.  Unfortunately it isn't cooperating, and bhyve is not being helpful by pointing out where my basic config. is going wrong.

Some background:


```
# uname -av
FreeBSD vin.tambler.com 12.1-RELEASE-p7 FreeBSD 12.1-RELEASE-p7 GENERIC  amd64
```

From /var/run/dmesg.boot:

```
CPU: AMD Ryzen 7 2700X Eight-Core Processor          (3700.08-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x800f82  Family=0x17  Model=0x8  Stepping=2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
  Structured Extended Features=0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  AMD Extended Feature Extensions ID EBX=0x1007<CLZERO,IRPerf,XSaveErPtr>
  SVM: (disabled in BIOS) NP,NRIP,VClean,AFlush,DAssist,NAsids=32768
  TSC: P-state invariant, performance statistics
```


```
# kldstat | grep vmm
10    1 0xffffffff82c50000   537420 vmm.ko
```


```
# ifconfig tap0
tap0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=80000<LINKSTATE>
    ether ea:7d:ea:db:ee:f2
    groups: tap
    media: Ethernet autoselect
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```


```
# sysctl net.link.tap.up_on_open
net.link.tap.up_on_open: 1
```


```
# pkg info | grep uefi
uefi-edk2-bhyve-0.2_1,1        UEFI-EDK2 firmware for bhyve
uefi-edk2-bhyve-csm-0.2_1,1    UEFI-EDK2 firmware for bhyve with CSM
```

So I think I've got everything ready, a bootable DVD image ready, a drive image file created and partitioned...  So here I go...


```
bhyve -c 1 -m 2G -AHP \
  -s 0,hostbridge \
  -s 2,virtio-net,tap0       \
  -s 3,virtio-blk,/home/user/vm/driveimage.img \
  -s 4,ahci-cd,/home/user/vm/instaldvd.iso \ 
  -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \
  -s 30,xhci,tablet \
  -s 31,lpc -l com1,stdio \
  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
  uefi_vm_test
vm_create: Device not configured
```

Okay, WHAT device, bhyve?  So I start removing config. lines removing devices.  No go.  No matter what I try.  And from the bhyve man page, it doesn't look like there's a VERBOSE mode.  No logs in syslog.  Nothing useful to tell me where I'm going wrong.

And searches on the web just turn up results of folks with problems not quite like my own, mostly FreeNAS users.  This is most definitely NOT a FreeNAS box, just a vanilla FreeBSD box running on an 8-core AMD Ryzen CPU with 64 GB RAM.

And if you feel inclined to inquire, "What guest OS are you installing?"--it doesn't really matter, Linux, another *BSD, or anything else, because the VM start-up isn't getting even to the UEFI boot portion, let alone able to mount the install ISO or access the drive image file. 

Puzzled,
Aaron out.


----------



## suntzu00 (Aug 4, 2020)

can you enable SVM in BIOS?


----------



## Phishfry (Aug 4, 2020)

Do you have the virtio-blk driver loaded?
/boot/loader.conf
virtio_blk_load="YES"






						virtio_blk(4)
					






					www.freebsd.org


----------



## astounding (Aug 4, 2020)

suntzu00 said:


> can you enable SVM in BIOS?



Haha, I went exploring my BIOS to look for a VM setting for the CPU before posting my woes above, but couldn't find it anywhere. But with giving me "SVM" as a search term, I was able to discover it was hiding in the OVERCLOCKING section of my BIOS--not in the ADVANCED section.

Thank you!


----------



## suntzu00 (Aug 4, 2020)

no worries, bud! nowadays we have to choose the motherboards based on how friendly the BIOS is


----------

