Bug 1028336 - No "Mac address collision" error shows when guests with the same MAC address booted
Summary: No "Mac address collision" error shows when guests with the same MAC address ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-08 09:00 UTC by tingting zheng
Modified: 2013-11-11 15:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-11 15:22:21 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description tingting zheng 2013-11-08 09:00:20 UTC
Description
No "Mac address collision" error shows when guests with the same MAC address booted.
When create a new guest from virt-manager,set the fixed MAC address as one which has been used by other guests,error will pop out:
"Mac address collision":"The MAC address '*******' is in use by another virtual machine."

Version:
virt-manager-0.10.0-5.el7.noarch
libvirt-1.1.1-11.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare 2 guest xml files,set the same mac address for interface part.
2.use # virsh define guest.xml to create 2 guests.
3.use # virsh start guest to boot 2 guests.
4.The issue also occurs to virtual networks,virtual networks with the same MAC address can be started without error.
# virsh net-list --all
Name                 State      Autostart     Persistent
--------------------------------------------------
bridge-test          active     no            yes
default              active     yes           yes

# virsh net-dumpxml bridge-test
<network>
  <name>bridge-test</name>
  <uuid>2387ed67-23a4-47d4-8227-fa6b0f861760</uuid>
  <forward mode='bridge'/>
  <bridge name='br0' />
  <mac address='52:54:00:3B:78:35'/>
</network>

# virsh net-dumpxml default
<network connections='3'>
  <name>default</name>
  <uuid>196809bf-6249-4800-8152-f9621265378c</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:3B:78:35'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
</network>


Actual results:
Both of the guests can be booted successfully without "Mac address collision" error.

Expected results:
Only 1 guest can be booted,when trying to boot the other guest with the same MAC address,"Mac address collision" error shows.

Additional info:
1.When create a new guest from virt-manager,set the fixed MAC address as one which has been used by other guests,error will pop out:
"Mac address collision":"The MAC address '*******' is in use by another virtual machine."

Comment 1 Dave Allan 2013-11-11 15:22:21 UTC
It's unusual, but valid to assign multiple VMs with the same MAC.  This behavior is not a bug.

Comment 2 Dave Allan 2013-11-11 15:41:16 UTC
I should also add that the string "Mac address collision", afaik, does not appear in the libvirt code, so it's a reasonable question why virt-manager is prohibiting this use case.


Note You need to log in before you can comment on or make changes to this bug.