|
Replies:
9
-
Last Post:
Jun 10, 2008 7:27 AM
by: jkeil
|
|
|
Posts:
347
From:
Registered:
7/5/06
|
|
|
|
dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 4:54 AM
To: OpenSolaris » discuss
|
|
VirtualBox uses a script named vnic_setup.sh to configure a crossbow interface.
This script uses the dladm to detect the active system NIC and configures a virtual nic using crossbows VNA. The scripts relied on the old format of dladm show-dev: dladm show-dev iwk0 link: down speed: 0Mb duplex: unknown rge0 link: up speed: 100Mb duplex: full
The new format creates a header line instead which confuses the command phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk 'NF==7 && $3=="up" { print $1 }'` into reporting LINK as the valid interface, I present this here.
<mike>
|
|
|
Posts:
2,142
From:
US
Registered:
3/9/05
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 5:26 AM
in response to: mdemarco
|
|
On Tue, 2008-06-10 at 04:54 -0700, Mike DeMarco wrote: > VirtualBox uses a script named vnic_setup.sh to configure a crossbow interface.
I'm a bit confused. Crossbow is a project under development. Are you referring to a hacked VirtualBox that was made to work with Crossbow, or is there actually support for Crossbow VNICs in official VirtualBox releases?
> This script uses the dladm to detect the active system NIC and configures a virtual nic using > crossbows VNA. > The scripts relied on the old format of dladm show-dev: > dladm show-dev > iwk0 link: down speed: 0Mb duplex: unknown > rge0 link: up speed: 100Mb duplex: full
That output format is documented to be _not_ parseable. There is a "-p" option to dladm which is meant to provide a stable and parseable output format. Unfortunately, that format will soon change as its not as parseable as we'd like it to be, but nevertheless, the snippet you have above is for the human readable output format.
> The new format creates a header line instead which confuses the command > phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk 'NF==7 && $3=="up" { print $1 }'` > into reporting LINK as the valid interface, I present this here.
That awk script was doomed to fail. If you can relay the version of VirtualBox you're using and where you obtained it (and that script), I'll try and contact the developers to discuss this issue with them.
-Seb
_______________________________________________ opensolaris-discuss mailing list opensolaris-discuss at opensolaris dot org
|
|
|
|
Posts:
6,810
From:
US
Registered:
3/9/05
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 5:46 AM
in response to: seb
|
|
Sebastien Roy writes: > On Tue, 2008-06-10 at 04:54 -0700, Mike DeMarco wrote: > > VirtualBox uses a script named vnic_setup.sh to configure a crossbow interface. > > I'm a bit confused. Crossbow is a project under development. Are you > referring to a hacked VirtualBox that was made to work with Crossbow, or > is there actually support for Crossbow VNICs in official VirtualBox > releases?
It's also possible that it's using the existing undocumented /usr/lib/vna feature, which was integrated a while ago for Xen.
-- James Carlson, Solaris Networking <james dot d dot carlson at sun dot com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss at opensolaris dot org
|
|
|
|
Posts:
347
From:
Registered:
7/5/06
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 5:55 AM
in response to: seb
To: OpenSolaris » discuss
|
|
> On Tue, 2008-06-10 at 04:54 -0700, Mike DeMarco > wrote: > > VirtualBox uses a script named vnic_setup.sh to > configure a crossbow interface. > > I'm a bit confused. Crossbow is a project under > development. Are you > referring to a hacked VirtualBox that was made to > work with Crossbow, or > is there actually support for Crossbow VNICs in > official VirtualBox > releases?
VirtualBox releas 1.6 documentation:
VirtualBox uses OpenSolaris’ Crossbow architecture for Host Interface Networking. Currently, Crossbow does not support permanent virtual network interfaces. Thus, all virtual network interfaces created will be lost when the host reboots. Note: Creating and using virtual network interfaces requires root permis- sions. This issue with Crossbow is likely to be resolved in subsequent Open- Solaris releases.
> > > This script uses the dladm to detect the active > system NIC and configures a virtual nic using > > crossbows VNA. > > The scripts relied on the old format of dladm > show-dev: > > dladm show-dev > > iwk0 link: down speed: 0Mb > duplex: unknown > rge0 link: up speed: 100Mb > duplex: full > hat output format is documented to be _not_ > parseable. There is a "-p" > option to dladm which is meant to provide a stable > and parseable output > format. Unfortunately, that format will soon change > as its not as > parseable as we'd like it to be, but nevertheless, > the snippet you have > above is for the human readable output format. > > > The new format creates a header line instead which > confuses the command > > phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk > 'NF==7 && $3=="up" { print $1 }'` > > into reporting LINK as the valid interface, I > present this here. > > That awk script was doomed to fail. If you can relay > the version of > VirtualBox you're using and where you obtained it > (and that script), > I'll try and contact the developers to discuss this > issue with them. > > -Seb
VirtualBox 1.6 version downloaded from the link provided on OpenSolaris front page.
|
|
|
|
Posts:
2,324
From:
DE
Registered:
6/16/05
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 6:00 AM
in response to: mdemarco
To: OpenSolaris » discuss
|
|
> VirtualBox uses a script named vnic_setup.sh to > configure a crossbow interface.
Which version of VirtualBox?
> This script uses the dladm to detect the active > system NIC and configures a virtual nic using > crossbows VNA. > The scripts relied on the old format of dladm show-dev: > dladm show-dev > iwk0 link: down speed: 0Mb duplex: unknown > ge0 link: up speed: 100Mb duplex: full > > The new format creates a header line instead which > confuses the command > phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk > 'NF==7 && $3=="up" { print $1 }'` > into reporting LINK as the valid interface, I present > this here.
VirtualBox 1.6.2's vnic_setup.sh also tries to parse the new "dladm show-dev" format, but ignores the result, and directly tries to parse "dladm show-link" output. This is where it picks up the bogus "LINK" interface name:
# Try obtain a physical NIC that is currently active phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk 'NF==7 && $3=="up" { print $1 }'` if [ -z "$phys_nic" ]; then # Try obtain a physical NIC that is currently active phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk 'NF==4 && $2=="up" { print $1 }'`
<<<<< should test phys_nic here....
# Failed to get a currently active NIC, get the first available NIC. phys_nic=`/usr/sbin/dladm show-link | /u]http://www.virtualbox.org/ticket/1498
|
|
|
|
Posts:
2,142
From:
US
Registered:
3/9/05
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 6:16 AM
in response to: jkeil
|
|
On Tue, 2008-06-10 at 06:00 -0700, Jürgen Keil wrote: > BTW: This seems to be a known bug: > > http://www.virtualbox.org/ticket/1498
Most of the information in that bug report is incorrect. I'll contact the VirtualBox developers to try and understand what they're trying to do. Output of dladm show-dev is most certainly not what they want.
-Seb
_______________________________________________ opensolaris-discuss mailing list opensolaris-discuss at opensolaris dot org
|
|
|
|
Posts:
2,324
From:
DE
Registered:
6/16/05
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 6:45 AM
in response to: seb
To: OpenSolaris » discuss
|
|
Sebastien C. Roy wrote: > On Tue, 2008-06-10 at 06:00 -0700, Jürgen Keil wrote: > > BTW: This seems to be a known bug: > > > > http://www.virtualbox.org/ticket/1498 > > Most of the information in that bug report is incorrect. I'll contact > the VirtualBox developers to try and understand what they're trying to > do. Output of dladm show-dev is most certainly not what they want.
Btw more or less the same bug existed with xen / xVM:
Bug ID 6647697 Synopsis: xVM needs change to work with post-clearview http://bugs.opensolaris.org/view_bug.do?bug_id=6647697
Or the duplicate:
Bug ID 6655005 Synopsis clearview(?) changed 'dladm show-link' format, causing vif-vnic to break http://bugs.opensolaris.org/view_bug.do?bug_id=6655005
|
|
|
|
Posts:
347
From:
Registered:
7/5/06
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 6:24 AM
in response to: jkeil
To: OpenSolaris » discuss
|
|
pkginfo -l SUNWvbox PKGINST: SUNWvbox NAME: Sun xVM VirtualBox CATEGORY: application ARCH: i386 VERSION: 1.6.0 BASEDIR: / VENDOR: Sun Microsystems, Inc. DESC: A powerful PC virtualization solution. PSTAMP: vbox20080430230848 INSTDATE: May 15 2008 08:31 EMAIL: info at virtualbox dot org STATUS: completely installed FILES: 549 installed pathnames 1 shared pathnames 25 directories 40 executables 154202 blocks used (approx)
|
|
|
|
Posts:
2,142
From:
US
Registered:
3/9/05
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 6:40 AM
in response to: mdemarco
|
|
On Tue, 2008-06-10 at 06:24 -0700, Mike DeMarco wrote: > pkginfo -l SUNWvbox > PKGINST: SUNWvbox > NAME: Sun xVM VirtualBox > CATEGORY: application > ARCH: i386 > VERSION: 1.6.0
Thanks. I've started a discussion on vbox-dev at virtualbox dot org to try and get this resolved.
-Seb
_______________________________________________ opensolaris-discuss mailing list opensolaris-discuss at opensolaris dot org
|
|
|
|
Posts:
2,324
From:
DE
Registered:
6/16/05
|
|
|
|
Re: dladm format change breaks VirtualBox nic script
Posted:
Jun 10, 2008 7:27 AM
in response to: mdemarco
To: OpenSolaris » discuss
|
|
> pkginfo -l SUNWvbox > VERSION: 1.6.0
Ok, so you could update to the recently released VirtualBox 1.6.2, it contains some changes for opensolaris in the vnic_setup.sh script .... but apparently the changes weren't tested on a recent opensolaris system, because it still doesn't work....
|
|
|
|
|