Hardcode PCI device number

Discussions related to using VirtualBox on Linux hosts.
Post Reply
duffsterlp
Posts: 3
Joined: 8. Nov 2016, 01:37

Hardcode PCI device number

Post by duffsterlp »

I'm working with a CentOS virtual machine that has consistent network naming. I would like that network name to actually be consistent within VirtualBox. I was wondering if there was a way to hardcode the PCI device ID that is seen by the guest such that I can assume a particular interface name within the guest. On my virtual machine, for example, I see that it maps to PCI device 3. However, is that guaranteed? Does VirtualBox let the user configure which device number is used or is that all internal to VirtualBox?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Hardcode PCI device number

Post by socratis »

I really don't understand why/how the "PCI device number" is tied to the "network name" of a computer. Can you please explain that?

I haven't seen anything that you can force a specific PCI enumeration, but I may have missed something.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
duffsterlp
Posts: 3
Joined: 8. Nov 2016, 01:37

Re: Hardcode PCI device number

Post by duffsterlp »

I don't mean that the PCI device number maps to a *hostname*. I mean that the PCI device number maps to an *ethernet interface name*.

From:
https://access.redhat.com/documentation ... aming.html
"Scheme 3: Names incorporating physical location of the connector of the hardware (example: enp2s0), are applied if applicable, else falling directly back to scheme 5 in all other cases."

For example, I'm able to modify the interface name for a CentOS VM in VMware ESXi by modifying the PCI device number that is mapped to the virtual network interface within the virtual machine's VMX configuration file. I'm looking for equivalent functionality in VirtualBox.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Hardcode PCI device number

Post by socratis »

No clue whatsoever. I'm more of a plug and play guy... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Hardcode PCI device number

Post by socratis »

Great, thanks for reporting back and actually including the link to the discussion.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply