Project

General

Profile

Bug #24222

Add NIC default to new VM

Added by Damjan Perenic over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Important
Assignee:
Marcelo Araujo
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

FreeNAS Mini XL

ChangeLog Required:
No

Description

I created VM via FreeNAS traditional GUI and I cannot get it to boot, unless I remove the NIC.

I tried VirtIO NIC and Intel NIC, but in both cases it fails to boot.

The only log record I find is in dmesg when it creates a new tap inteface (0,1,2,...) on every "Start" click:

tap0: Ethernet address: 00:bd:ca:14:0e:00
tap0: promiscuous mode enabled

root@mlincek:/var/log # ifconfig tap0
tap0: flags=8903<UP,BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=80000<LINKSTATE>
    ether 00:bd:b8:ed:14:00
    nd6 options=1<PERFORMNUD>
    media: Ethernet autoselect
    status: no carrier
    groups: tap

I don't find any other log. Log records pop-up in middlewared.log only if I remove the NIC from VM configuration and boot is successful.

But with NIC configured there is nothing in middlewared.log.

Associated revisions

Revision 137bd802 (diff)
Added by Marcelo Araujo over 1 year ago

fix(vm): By default we add one NIC and the MAC address is an empty string, so we set it to None.

Ticket: #24222

Revision d1f84fed (diff)
Added by Marcelo Araujo over 1 year ago

feat(vm): Add the capability for guests to choose which nic it will be attached to. We create dynamically a bridge(4) with the chosen NIC and attach the guest's tap(4) interface to it.

Ticket: #23927
Ticket: #24222
Ticket: #24571
Ticket: #24753

commit 97736d23a83644b25586af921f43b3d6230bb957
Author: Marcelo Araujo <>
Date: Fri Jun 23 09:57:11 2017 +0800

fix(vm/middlewared): I'm keeping backward compatibility prior the option to choose attached nic, in this case the if_attached can be None and I need to handle this case.
Spotted by: william-gr

commit 49481a9abf43d56378caa67491084e93344022c7
Author: Marcelo Araujo <>
Date: Fri Jun 23 09:40:35 2017 +0800

fix(vm/middleared): Fix double identation.
Spotted by: william-gr

commit da31e3de0021efa11e6b3dd67e67842392fdb3e7
Merge: f6ab6bd84 e1c2de77a
Author: Marcelo Araujo <>
Date: Fri Jun 23 09:23:48 2017 +0800

Merge branch 'master' into wip_vmiface

commit f6ab6bd8499539d5a6baf3a56795c01698a5dc3d
Author: Marcelo Araujo <>
Date: Thu Jun 22 17:59:03 2017 +0800

feat(vm/middlewared): Add try/except guards in case there is no default gateway.

commit efb1f6137749e83098cf6ad925d4aae7a58d509b
Author: Marcelo Araujo <>
Date: Thu Jun 22 15:48:08 2017 +0800

feat(vm/middlwared): Add get_attached_iface method that will return all attached physical interfaces from a given guest.

commit 2bb59b82057a14e7dc36f857c218a62c2360f133
Author: Marcelo Araujo <>
Date: Thu Jun 22 15:33:31 2017 +0800

feat(vm/middlwared): Use netif module instead of make a syscall to find out the default gateway interface.

commit 6fefec6870c683f02be87037ecfe91862d8ee352
Author: Marcelo Araujo <>
Date: Thu Jun 22 15:08:27 2017 +0800

feat(vm/middlewared): backward compatibility for guests that are already installed and didn't had the iface attached option.

commit 15617d0d2f7f79c55e6996c9e759b6c488bf224a
Author: Marcelo Araujo <>
Date: Thu Jun 22 11:44:34 2017 +0800

feat(vm/middlewared): asyncio method bridge_setup.

commit 5f9f35b3f45b76f6c57c4b3bf929301486b78a41
Author: Marcelo Araujo <>
Date: Thu Jun 22 10:59:22 2017 +0800

feat(vm/middleared): Attach the selected NIC into the bridge.

commit 4c8a61adf6e4de8ea9786f5f3559ac7e8d16238c
Merge: d66be7aea 876bb1348
Author: Marcelo Araujo <>
Date: Thu Jun 22 10:36:12 2017 +0800

Merge branch 'master' into wip_vmiface

commit d66be7aeae8139bb9abfbdc8532e56f67f109ad0
Author: Marcelo Araujo <>
Date: Thu Jun 22 10:31:07 2017 +0800

feat(vm/middlewared): Setup the bridge with the prefered nic attached chosen by the user.

commit 76fd3fe4091beafa1169d261e2c91c650f24e10c
Author: Marcelo Araujo <>
Date: Wed Jun 21 17:12:48 2017 +0800

feat(vm): First wave of changes to allow users to choose what interface the guest vm will be attached.

Revision 49e1eb8e (diff)
Added by Marcelo Araujo over 1 year ago

feat(vm): Add the capability for guests to choose which nic it will be attached to. We create dynamically a bridge(4) with the chosen NIC and attach the guest's tap(4) interface to it.

Ticket: #23927
Ticket: #24222
Ticket: #24571
Ticket: #24753

commit 97736d23a83644b25586af921f43b3d6230bb957
Author: Marcelo Araujo <>
Date: Fri Jun 23 09:57:11 2017 +0800

fix(vm/middlewared): I'm keeping backward compatibility prior the option to choose attached nic, in this case the if_attached can be None and I need to handle this case.
Spotted by: william-gr

commit 49481a9abf43d56378caa67491084e93344022c7
Author: Marcelo Araujo <>
Date: Fri Jun 23 09:40:35 2017 +0800

fix(vm/middleared): Fix double identation.
Spotted by: william-gr

commit da31e3de0021efa11e6b3dd67e67842392fdb3e7
Merge: f6ab6bd84 e1c2de77a
Author: Marcelo Araujo <>
Date: Fri Jun 23 09:23:48 2017 +0800

Merge branch 'master' into wip_vmiface

commit f6ab6bd8499539d5a6baf3a56795c01698a5dc3d
Author: Marcelo Araujo <>
Date: Thu Jun 22 17:59:03 2017 +0800

feat(vm/middlewared): Add try/except guards in case there is no default gateway.

commit efb1f6137749e83098cf6ad925d4aae7a58d509b
Author: Marcelo Araujo <>
Date: Thu Jun 22 15:48:08 2017 +0800

feat(vm/middlwared): Add get_attached_iface method that will return all attached physical interfaces from a given guest.

commit 2bb59b82057a14e7dc36f857c218a62c2360f133
Author: Marcelo Araujo <>
Date: Thu Jun 22 15:33:31 2017 +0800

feat(vm/middlwared): Use netif module instead of make a syscall to find out the default gateway interface.

commit 6fefec6870c683f02be87037ecfe91862d8ee352
Author: Marcelo Araujo <>
Date: Thu Jun 22 15:08:27 2017 +0800

feat(vm/middlewared): backward compatibility for guests that are already installed and didn't had the iface attached option.

commit 15617d0d2f7f79c55e6996c9e759b6c488bf224a
Author: Marcelo Araujo <>
Date: Thu Jun 22 11:44:34 2017 +0800

feat(vm/middlewared): asyncio method bridge_setup.

commit 5f9f35b3f45b76f6c57c4b3bf929301486b78a41
Author: Marcelo Araujo <>
Date: Thu Jun 22 10:59:22 2017 +0800

feat(vm/middleared): Attach the selected NIC into the bridge.

commit 4c8a61adf6e4de8ea9786f5f3559ac7e8d16238c
Merge: d66be7aea 876bb1348
Author: Marcelo Araujo <>
Date: Thu Jun 22 10:36:12 2017 +0800

Merge branch 'master' into wip_vmiface

commit d66be7aeae8139bb9abfbdc8532e56f67f109ad0
Author: Marcelo Araujo <>
Date: Thu Jun 22 10:31:07 2017 +0800

feat(vm/middlewared): Setup the bridge with the prefered nic attached chosen by the user.

commit 76fd3fe4091beafa1169d261e2c91c650f24e10c
Author: Marcelo Araujo <>
Date: Wed Jun 21 17:12:48 2017 +0800

feat(vm): First wave of changes to allow users to choose what interface the guest vm will be attached.

History

#1 Updated by Marcelo Araujo over 1 year ago

  • Status changed from Unscreened to 15
  • Priority changed from No priority to Important

Hi,

Could you please tell me what OS guest are you trying to run?
Also please send me your debug files, go to: System->Advanced->Save Debug.

Best,

#2 Updated by Damjan Perenic over 1 year ago

  • File debug-mlincek-20170531121548.tgz added

If NIC is enabled, it does not come to a bootstrap stage. It would be ubuntu otherwise. Attached are debug files and I also recorded short video that to describe the problem clearer.

https://www.screencast.com/t/B8ENTojxB

#3 Updated by Marcelo Araujo over 1 year ago

  • Status changed from 15 to Investigation

Thanks for all info! I'm checking it.

#4 Updated by Marcelo Araujo over 1 year ago

  • Status changed from Investigation to Resolved

First of all, thanks for the report, it was a bug.
I have fixed it already, probably in the next Nightlies it will be available.

For now what you can do is, edit that NIC and past this address: 00:a0:98:FF:FF:FF it will create a random MAC ADDRESS for your interface.

Let me know if it works for you.

Best,

#5 Updated by Damjan Perenic over 1 year ago

It does not work. This is the default MAC address when you create interface and I started with that. I only deleted it when it did not work. But that did not help either.

#6 Updated by Marcelo Araujo over 1 year ago

  • Status changed from Resolved to Investigation

Damjan Perenic wrote:

It does not work. This is the default MAC address when you create interface and I started with that. I only deleted it when it did not work. But that did not help either.

OK, I'm gonna double check it again with the next Nightlies update.

#7 Updated by Damjan Perenic over 1 year ago

I updated to nighty 20170601, but it still does not work.

#8 Updated by Marcelo Araujo over 1 year ago

Damjan Perenic wrote:

I updated to nighty 20170601, but it still does not work.

I made another tests installing CentOS 7 and I can't reproduce the problem anymore.
I'm using: FreeNAS-11-MASTER-201706040409 (9407688)

Have you tried to create a new VM and install CentOS again?

#9 Updated by Marcelo Araujo over 1 year ago

  • Status changed from Investigation to 15

#10 Updated by Damjan Perenic over 1 year ago

I deleted VM and created it again. NIC is again a problem. Maybe because I have two networks?

#11 Updated by Damjan Perenic over 1 year ago

I tested it again with FreeNAS-11-MASTER-201706110501 (1bb86ad), but it still does not work.

#12 Updated by Marcelo Araujo over 1 year ago

  • Status changed from 15 to Screened

Damjan Perenic wrote:

I deleted VM and created it again. NIC is again a problem. Maybe because I have two networks?

It can be a network problem. The bridge interface in your setup used for the VM's is connected with igb0. Your default gateway is set over igb1 with JUMBO FRAME. By default the tap interfaces will be attached to bridge0 because we right now don't have an option in our GUI where you can specify which bridge the VM should be attached.

So, we do have a limitation in our GUI where now you can't choose which interface your bridge will use.

Best,

#13 Updated by Marcelo Araujo over 1 year ago

  • Status changed from Screened to Resolved
  • Target version set to 11.1

The feature will be in Nightlies soon and it is targeted to FreeNAS 11.1-RELEASE. You will be able to choose which nic the guest will be attached to.

#14 Updated by Dru Lavigne over 1 year ago

  • Subject changed from VM does not boot if NIC is enabled to Add NIC default to new VM

#15 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.1 to 11.1-BETA1

#16 Updated by Joe Maloney about 1 year ago

  • Needs QA changed from Yes to No
  • QA Status Test Passes FreeNAS added
  • QA Status deleted (Not Tested)

#17 Updated by Dru Lavigne about 1 year ago

  • File deleted (debug-mlincek-20170531121548.tgz)

Also available in: Atom PDF