Solved question about vm-bhyve clone in freebsd14.2 ?

dear all:
i have a machine with freebsd14.2 and vm-bhyve tools. now when i use command "vm clone vm1 vm_backup", now vm1 and vm_backup was same vm, question was the vm1 and vm_backup have same MAC address, how to renew a MAC for vm_backup ? thanks.
 
The config for each VM is inside its directory (called vmname.conf). Open that and you can see/change the MAC.
dear victort :
thanks for your help . but i don't know what rule we need fellow it about modify this MAC in this file . if i modify it. the mac conflict with other one , do we have some tools to renew it fellow some MAC standard ?thanks.
 
yes, it's same. so i can't boot them at same time. the IP will make conflict.
The duplicate MAC address will cause a conflict, there is no IP address involved yet.

You can check out the Wikipedia page on MAC addresses. It shows the format off the address and in particular, it shows that in the left-most octet, the second bit from the right indicates whether the MAC address is globally unique or has been created locally. Of course the address still needs to be unique within your local network, but you can thus simply assign MAC addresses yourself in the format: 2x:xx:xx:xx:xx:xx. If the address starts with a two, the important bit has been set to '1' meaning it is locally administered.

If you need a new MAC address for a VM, just pick any random address (or not so random), just make sure you keep track of the MAC addresses you assign in each VLAN.
 
The duplicate MAC address will cause a conflict, there is no IP address involved yet.

You can check out the Wikipedia page on MAC addresses. It shows the format off the address and in particular, it shows that in the left-most octet, the second bit from the right indicates whether the MAC address is globally unique or has been created locally. Of course the address still needs to be unique within your local network, but you can thus simply assign MAC addresses yourself in the format: 2x:xx:xx:xx:xx:xx. If the address starts with a two, the important bit has been set to '1' meaning it is locally administered.

If you need a new MAC address for a VM, just pick any random address (or not so random), just make sure you keep track of the MAC addresses you assign in each VLAN.
dear th0mas:
thanks. it's good solution. thanks.
 
Back
Top