Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding second hdd cause LAN adapter configure change in guest OS #171

Closed
WanpengQian opened this issue Jun 8, 2017 · 4 comments
Closed

Comments

@WanpengQian
Copy link
Contributor

WanpengQian commented Jun 8, 2017

When adding second HDD to vm, the slot number of LAN adapter will change because LAN adapter slot number is populated after HDD.
Recent FreeBSD version can add multi HDD to single AHCI HDD slot.
But if we adding second AHCI slot, also cause this problem.
guest OS will recognize as new LAN adapter. and have to configure IP in Windows GUI after that.

If we can force slot number in config file, that will solve this problem.

@WanpengQian WanpengQian changed the title adding second hdd adding second hdd cause LAN adapter configure change in guest OS Jun 8, 2017
@WanpengQian
Copy link
Contributor Author

Today I read the man 8 bhyve again, there is a config example below

          bhyve -c 4 \
             -s 0,amd_hostbridge -s 1,lpc \
             -s 1:0,ahci,hd:/images/disk.1,hd:/images/disk.2,\
           hd:/images/disk.3,hd:/images/disk.4,\
           hd:/images/disk.5,hd:/images/disk.6,\
           hd:/images/disk.7,hd:/images/disk.8,\
           cd:/images/install.iso \
             -s 3,virtio-net,tap0 \
             -l com1,/dev/nmdm0A \
             -A -H -P -m 8G

I have an idea of dirty workaround here.
Instead of adding second hdd, I modify the first hdd setting like below:

disk0_type="ahci-hd"
disk0_name="disk0.img,hd:/dev/ada2"

And it works.

@churchers
Copy link
Owner

In 1.2 you should be able to use the ahci_device_limit="8" option to configure vm-bhyve to put up to 32 disks on a single controller.

@WanpengQian
Copy link
Contributor Author

can we set ahci_device_limit=8 as default value?

@churchers
Copy link
Owner

In the future I may look at using 8 unless the user overrides it. For now I have updated the Windows template so anyone using that for guests (as far as I'm aware only Windows ties the interface config to the slot) will get up to 8 disks before moving to the next slot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants