Will the MAC address of VirtualBox Host-Only Ethernet Adapter will ever change?

Discussions about using Windows guests in VirtualBox.
Post Reply
ggirf14
Posts: 16
Joined: 30. Dec 2023, 09:22

Will the MAC address of VirtualBox Host-Only Ethernet Adapter will ever change?

Post by ggirf14 »

The short question is the subject , the long text below is basically explaining why I'm asking.

My goal is to have a solid VM solution to replace an aging computer. There is an essential software made for Windows 7 on the VM with only 2 licence left available (trial an error is not an option).

Guest OS is Win7 Ultimate (no longer supported) that I use with no network connection.
Virtualbox 7.0
Host: Win11 home 23H2

The mac address of the "VirtualBox Host-Only Ethernet Adapter" is being used by the software to validate the licence.
There is no way to change the mac address that I'm aware of this Ethernet Adapter.
I would need to know what are the risk of this mac address changed on the long run?
If in a few year I need to replace my host machine reinstall Virtualbox is there a risk that this mac address will change?

I see how to change the mac of the other Ethernet Adapter but it needs to stay disabled to prevent from exposing to any network.


Thanks for your time.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Will the MAC address of VirtualBox Host-Only Ethernet Adapter will ever change?

Post by scottgus1 »

Host-Only consists of two parts: the virtual adapter added to the host, and the adapter in the VM.

The adapter added to the host does not appear to have any way using Virtualbox commands to control its MAC address. It is apparently set by the host OS. I see no vboxmanage commands to set its MAC address or any place in the Virtualbox.xml main configuration file where the MAC address is set.

The adapter added to the VM does have a place to set the MAC address, and the MAC address it has now is set in the VM's .vbox configuration file. The VM's adapter's MAC address will not change once set, and it can be set back to the correct MAC address if something strange ever happens. When you move the VM to a new host, the present MAC address will go with it. FWIW the MAC address will remain the same if you switch the network from Host-Only to any of the other Virtualbox network settings.

It is extremely likely that the software will use the MAC address of the VM's adapter to do the licensing. No software that I have ever heard of would do something so insane as to insist that not only the computer but also the whole LAN has to stay the same.

You can check which MAC address is being licensed, if the software lets you know what MAC address it sees. Both the VM's MAC address and the Host's Host-Only Adapter MAC address can be seen in an "ipconfig /all" run on a command prompt in each OS.
ggirf14
Posts: 16
Joined: 30. Dec 2023, 09:22

Re: Will the MAC address of VirtualBox Host-Only Ethernet Adapter will ever change?

Post by ggirf14 »

So if I understand correctly there is:
- Two Host-Only created; one the the host the other one on the guest.
- One more local adapter on the guest than can be disabled with virtualbox manager. I do not want this adapter unabled as it provides internet connection the I cannot afford with Win7.

When the network adapter is disabled from virtualbox manager. The guest now only have one adapter called Host-Only. It is this adapter that I need to control the MAC address as my software pick the mac address of this adapter when the other one is disabled in virtualbox manager.

I tried to edit MAC address of the Host-Only in vbox file when the VM is off. Once the VM is running the MAC address returns back to it's original value.

Is there a way to edit the MAC address of the Host-Only adapter of the VM?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Will the MAC address of VirtualBox Host-Only Ethernet Adapter will ever change?

Post by scottgus1 »

Changing the .vbox file contents can be tricky: such manual changes won't stick if the VboxSVC service is still running. This service remains running while any Virtualbox windows and VMs are open, and for several seconds after all Virtualbox windows and VMs are closed.

In the VM's network adapter settings, under the Advanced dropdown, there is a text box to edit the MAC address.

I was able to change the MAC address on a Windows 7 VM's Host-Only adapter using this text box to edit the adapter's MAC address to a different random MAC address and to match the host's ethernet card MAC address. In all cases the edited MAC address stuck and was seen inside the VM in an "ipconfig /all" command.
ggirf14
Posts: 16
Joined: 30. Dec 2023, 09:22

Re: Will the MAC address of VirtualBox Host-Only Ethernet Adapter will ever change?

Post by ggirf14 »

The Host only adapter does not have an advance tab as per file attached.
I was able to edit the .vbox file after I closed the vm and virtualbox manager (less than 10 seconds for all vbox process to close including VboxSVC. After restarting the guest vm IPconfig /all gave me the original mac not the one I added to the vbox file.
The path to the vbox file is:
C:\Users\%My_User_Name%\VirtualBox VMs\R830 Feb 8 2024\R830 Feb 8 2024.vbox
Nic cards.jpg
Nic cards.jpg (65.37 KiB) Viewed 2889 times
I'm I editing the wrong file?

Thanks for your time.
Attachments
R830 Feb 8 2024-2024-02-11-20-25-10.log
(97.5 KiB) Downloaded 57 times
ggirf14
Posts: 16
Joined: 30. Dec 2023, 09:22

Re: Will the MAC address of VirtualBox Host-Only Ethernet Adapter will ever change?

Post by ggirf14 »

I found a work around that will secure my license purpose:
Keep the nic active in virtualbox manager to get the Intel(R) PRO/1000 MT Desktop Adapter #2 in the running VM.
From the VM OS set this nic IP address to a different private network than my real local network. Since 192.168 are not routable I just block the access to this nic. No problem to change the mac address, reboot and the setting are the new manual entry from previous boot.Tested a totally different one with same good results.

It's not the plan I had in mind but I get everything I needed
1- block access to the internet
2- Keep full control of the MAC address.

If someone see value to keep exploring why the Host-Only Ethernet Adapter mac address setting is elusive I can reply to questions to help but for my own need the work around is fine.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Will the MAC address of VirtualBox Host-Only Ethernet Adapter will ever change?

Post by scottgus1 »

ggirf14 wrote: 12. Feb 2024, 06:08 The Host only adapter does not have an advance tab as per file attached.
scottgus1 wrote: 11. Feb 2024, 15:17 In the VM's network adapter settings, under the Advanced dropdown, there is a text box to edit the MAC address.
I guess the highlighted part can be read two ways. Here's what I was talking about:
 
host only adapter MAC address.png
host only adapter MAC address.png (59 KiB) Viewed 2849 times
 
************************
ggirf14 wrote: 12. Feb 2024, 06:08 The path to the vbox file is:
C:\Users\%My_User_Name%\VirtualBox VMs\R830 Feb 8 2024\R830 Feb 8 2024.vbox
R830 Feb 8 2024-2024-02-11-20-25-10.log

I'm I editing the wrong file?
If the Windows 7 VM is named "R830 Feb 8 2024" then the "R830 Feb 8 2024.vbox" file would be the file to edit, provided the VboxSVC was really fully shut down, and the VM has no snapshots. FWIW the file you posted is the vbox.log, not the .vbox file, so no diagnosis of the failure to manually edit the .vbox file and have the edit stick is yet possible. The vbox.log file would not be the file to edit.

***************************
ggirf14 wrote: 12. Feb 2024, 06:54 Keep the nic active in virtualbox manager to get the Intel(R) PRO/1000 MT Desktop Adapter #2 in the running VM.
From the VM OS set this nic IP address to a different private network than my real local network. Since 192.168 are not routable I just block the access to this nic. No problem to change the mac address, reboot and the setting are the new manual entry from previous boot.Tested a totally different one with same good results.
I'm not exactly certain of what you're doing here, but if you have something that works, then that's all that's needed. Be sure the VM can transfer to a different host and remain usable and licensed with your scheme, and you're good to go. Glad you're up and running.
Post Reply