Bug 1164123

Summary: virt-manager install a new guest cannot customize if uncheck "Set a fixed mac address"
Product: Red Hat Enterprise Linux 7 Reporter: Ye Lingfei <liye>
Component: virt-managerAssignee: Giuseppe Scrivano <gscrivan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: codong, gscrivan, juzhou, liye, mzhan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-1.1.0-7.el7 Doc Type: Bug Fix
Doc Text:
Cause: MAC address not generated when it was not already specified by the user Consequence: It was possible only to specify a value, not let virt-manager generate it Fix: Properly generate a random MAC address Result: It is possible to use a random address
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:07:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ye Lingfei 2014-11-14 07:20:00 UTC
Description of problem:
virt-manager cannot process installing a new guest from HTTP or iso, if uncheck "Set a fixed mac address" under "Advanced options" and click "Customize configuration before install" as well

Version-Release number of selected component (if applicable):
virt-manager-1.1.0-6.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Open virt-manager and try to install a new guest
 # virt-manager
 - Rightclick the connection and click "NEW"
 - Choose installation method with http or iso
 - Following steps with default option and click "Foward" button
2. On Step 5 of the installation, check on option "Customize configuration before install",
   and uncheck "Set a fixed mac address" under "Advanced options"
3. Click "Finish" button

Actual results:
Step 11,
Error starting installation: 'NoneType' object has no attribute '__getitem__'
Details:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1781, in finish
    self.customize(guest)
  File "/usr/share/virt-manager/virtManager/create.py", line 1813, in customize
    self.config_window = vmmDetails(virtinst_guest, self.topwin)
  File "/usr/share/virt-manager/virtManager/details.py", line 705, in __init__
    self.populate_hw_list()
  File "/usr/share/virt-manager/virtManager/details.py", line 3285, in populate_hw_list
    self.repopulate_hw_list()
  File "/usr/share/virt-manager/virtManager/details.py", line 3340, in repopulate_hw_list
    update_hwlist(HW_LIST_TYPE_NIC, dev)
  File "/usr/share/virt-manager/virtManager/details.py", line 3315, in update_hwlist
    label = _label_for_device(dev)
  File "/usr/share/virt-manager/virtManager/details.py", line 345, in _label_for_device
    print  dev.macaddr[-9:]
TypeError: 'NoneType' object has no attribute '__getitem__'

Expected results:
Divert to guest virtual details page

Additional info:

Comment 2 Giuseppe Scrivano 2014-11-14 08:53:18 UTC
patch sent upstream:

https://www.redhat.com/archives/virt-tools-list/2014-November/msg00053.html

Comment 5 Ye Lingfei 2014-11-19 08:25:15 UTC
I can reproduce with:
virt-manager-1.1.0-6.el7.noarch

VERIFY with:
virt-manager-1.1.0-7.el7.noarch

Steps:
1. Open virt-manager and try to install a new guest # virt-manager
- Rightclick the connection and click "NEW"
- Choose installation method with http or iso
- Following steps with default option and click "Foward" button
2. On Step 5 of the installation, check on option "Customize configuration before install", and uncheck "Set a fixed mac address" under "Advanced options".
3. Click "Finish" button.

Result:
Divert to guest virtual details page successfully. 
Then add some devices in the following page, and begin installation.
The guests can be installed successfully and function well.  


As the result, set VERIFIED.

Comment 7 errata-xmlrpc 2015-03-05 10:07:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0427.html