Revision 6f1e1921 lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
139 | 139 |
|
140 | 140 |
try: |
141 | 141 |
res = fcntl.ioctl(tapfd, TUNSETIFF, ifr) |
142 |
except EnvironmentError: |
|
143 |
raise errors.HypervisorError("Failed to allocate a new TAP device") |
|
142 |
except EnvironmentError, err: |
|
143 |
raise errors.HypervisorError("Failed to allocate a new TAP device: %s" % |
|
144 |
err) |
|
144 | 145 |
|
145 | 146 |
# Get the interface name from the ioctl |
146 | 147 |
ifname = struct.unpack("16sh", res)[0].strip("\x00") |
... | ... | |
1531 | 1532 |
kvm_supports_netdev = self._NETDEV_RE.search(kvmhelp) |
1532 | 1533 |
|
1533 | 1534 |
for nic_seq, nic in enumerate(kvm_nics): |
1534 |
tapname, tapfd = _OpenTap(vnet_hdr) |
|
1535 |
tapname, tapfd = _OpenTap(vnet_hdr=vnet_hdr)
|
|
1535 | 1536 |
tapfds.append(tapfd) |
1536 | 1537 |
taps.append(tapname) |
1537 | 1538 |
if kvm_supports_netdev: |
Also available in: Unified diff