machyve / xhyve

xhyve, a lightweight OS X virtualization solution
Other
6.44k stars 354 forks source link

Creating a Windows VM fails with "pci slot 5:0: unknown device e1000" #177

Open pcgeek86 opened 4 years ago

pcgeek86 commented 4 years ago

Scenario

I'm trying to follow the directions to create an xhyve VM running Windows 10. I've gone through the preparation steps, but when I run the build script, I get an error about the e1000 device being unknown.

Error Message

pci slot 5:0: unknown device "e1000"

My Xhyve Folder

~/xhyve> ls -lGa
total 51887528
drwxr-xr-x   6 trevor  staff          192 Sep 23 13:33 .
drwxr-xr-x+ 60 trevor  staff         1920 Sep 23 13:29 ..
-rwxr-xr-x   1 trevor  staff      2097152 Sep 23 12:53 BHYVE_UEFI.fd
-rwx------   1 trevor  staff   5075539968 Dec 23  2018 Win10_1809Oct_English_x64.iso
-rw-------   1 trevor  staff  21474836480 Sep 23 13:32 Windows.dmg
-rwxr-xr-x   1 trevor  staff          377 Sep 23 13:50 build.sh

build.sh

#!/bin/sh

BOOTVOLUME="Win10_1809Oct_English_x64.iso"
IMG="Windows.dmg"
FIRMWARE="BHYVE_UEFI.fd"

PATH="build/Release:build:$PATH"

xhyve \
    -w \
    -m 4G \
    -c 2 \
    -s 0:0,hostbridge \
    -s 3,ahci-cd,$BOOTVOLUME \
    -s 4,ahci-hd,$IMG \
    -s 5,e1000 \
    -s 29,fbuf,tcp=127.0.0.1:29000,w=1024,h=768,wait \
    -s 31,lpc -l com1,stdio \
    -l bootrom,$FIRMWARE

Xhyve Version

~/xhyve> xhyve -v
xhyve: 0.2.0

xhyve is a port of FreeBSD's bhyve hypervisor to OS X that
works entirely in userspace and has no other dependencies.

Homepage: https://github.com/mist64/xhyve
License: BSD

MacOS Version

~/xhyve> uname -mprsv
Darwin 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64 i386
mike-pt commented 4 years ago

+1

mike-pt commented 4 years ago

removing that leads to pci slot 29:0: unknown device "fbuf" :(

2b commented 4 years ago

xhyve -v xhyve: 0.2.0

You are using latest stable version, it doesn't support neither e1000 device emulation, nor framebuffer. Thats why README.MD advices to use brew install --HEAD xhyve for installation:

The --HEAD in the brew command ensures that you always get the latest changes, even if the homebrew database is not yet updated.

Try to unlink stable version of xhyve and install it from current branch:

$ brew unlink xhyve
$ brew install --HEAD xhyve
$ sudo sh build.sh

You need to run your build script from a privileged user to be able to create a vmnet interface, because macos limits access to the networking API for unsigned builds.

mike-pt commented 4 years ago

I used --HEAD but forgot to unlink the previous install, thanks