[vbox] MOS 6.1 MU1 launch.sh fails network creation on Windows 10, vbox 4.3.12 or higher

Bug #1496042 reported by Bruce Basil Mathews
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Maksim Malchuk

Bug Description

$ bash launch.sh

Checking for 'free'... OK

Checking for 'expect'... OK

If you run this script under Cygwin, you may have to add path to VirtualBox directory to your PATH.

Usually it is enough to run "export PATH=$PATH:"/cygdrive/c/Program Files/Oracle/VirtualBox"

Checking for "VBoxManage"... OK

Checking for VirtualBox Extension Pack... OK

Checking for Mirantis OpenStack ISO image... OK

Going to use Mirantis OpenStack ISO file iso/MirantisOpenStack-6.1.iso

Checking if SSH client installed... OK

Checking if ipconfig or ifconfig installed... OK

Setup is done.

Creating host-only interface

0%...

Progress state: E_FAIL

VBoxManage.exe: error: Failed to create the host-only adapter

VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)

VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,int,int *)" at line 66 of file VBoxManageHostonly.cpp

Interface was successfully created

Disabling DHCP server on interface: ...

Configuring IP address 10.20.0.1 and network mask 255.255.255.0 on interface: ...

+ VBoxManage hostonlyif ipconfig '' --ip 10.20.0.1 --netmask 255.255.255.0

VBoxManage.exe: error: The host network interface with the given name could not be found

VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component Host, interface IHost, callee IUnknown

VBoxManage.exe: error: Context: "FindHostNetworkInterfaceByName(name.raw(), hif.asOutParam())" at line 218 of file VBoxManageHostonly.cpp

VBoxManage.exe: error: Could not find interface ''

+ set +x

Verifying interface has IP 10.20.0.1 and mask 255.255.255.0 properly set.

New IP address 10.20.0.1 does not match the applied one

Looks like VirtualBox failed to apply settings for interface

Sometimes such error happens under Windows.

Please run launch.sh one more time.

If this error remains after several attempts, then something really went wrong.

Aborting.
---------------------------------------------------------------------------------------------------------------------------
Second, third and fourth attempt:

$ bash launch.sh

Checking for 'free'... OK

Checking for 'expect'... OK

If you run this script under Cygwin, you may have to add path to VirtualBox directory to your PATH.

Usually it is enough to run "export PATH=$PATH:"/cygdrive/c/Program Files/Oracle/VirtualBox"

Checking for "VBoxManage"... OK

Checking for VirtualBox Extension Pack... OK

Checking for Mirantis OpenStack ISO image... OK

Going to use Mirantis OpenStack ISO file iso/MirantisOpenStack-6.1.iso

Checking if SSH client installed... OK

Checking if ipconfig or ifconfig installed... OK

Setup is done.

Creating host-only interface

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Interface VirtualBox Host-Only Ethernet Adapter was successfully created

Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter...

Configuring IP address 10.20.0.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter...

+ VBoxManage hostonlyif ipconfig 'VirtualBox Host-Only Ethernet Adapter' --ip 10.20.0.1 --netmask 255.255.255.0

+ set +x

Verifying interface VirtualBox Host-Only Ethernet Adapter has IP 10.20.0.1 and mask 255.255.255.0 properly set.

New Net Mask 255.255.255.0 does not match the applied one 15.0.0.0

Looks like VirtualBox failed to apply settings for interface VirtualBox Host-Only Ethernet Adapter

Sometimes such error happens under Windows.

Please run launch.sh one more time.

If this error remains after several attempts, then something really went wrong.

Aborting.

Revision history for this message
Miroslav Anashkin (manashkin) wrote :

Bruce, what were Virtual Box and Extension pack versions you ran under Windows 10 and got this error?

BTW, it is possible for Virtual Box to fail network creation at first run - it happens since Virtualbox is installed under administrative account but scripts should be run without administrative privileges and Windows should ask for administrative action to confirm.

Changed in fuel:
status: New → Incomplete
Revision history for this message
Alfius Yonatan (ayonatan) wrote :

I got similar error message running:
- Windows 7 Enterprise SP1
- VBox 5.0.4r102546 with extension_Pack-5.0.4-102546
- CYGWIN_NT-6.1 x86 64 bit
- MOS 7.0

$ sh launch.sh
Checking for 'free'... OK
Checking for 'expect'... OK
If you run this script under Cygwin, you may have to add path to VirtualBox directory to your PATH.
Usually it is enough to run "export PATH=$PATH:"/cygdrive/c/Program Files/Oracle/VirtualBox"
Checking for "VBoxManage"... OK
Checking for VirtualBox Extension Pack... OK
Checking for Mirantis OpenStack ISO image... OK
Going to use Mirantis OpenStack ISO file iso/MirantisOpenStack-7.0.iso
Checking if SSH client installed... OK
Checking if ipconfig or ifconfig installed... OK
Setup is done.
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Creating host-only interface
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter...
Configuring IP address 10.20.0.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter...
+ VBoxManage hostonlyif ipconfig 'VirtualBox Host-Only Ethernet Adapter' --ip 10.20.0.1 --netmask 255.255.255.0
+ set +x
Verifying interface VirtualBox Host-Only Ethernet Adapter has IP 10.20.0.1 and mask 255.255.255.0 properly set.
New Net Mask 255.255.255.0 does not match the applied one 15.0.0.0
Looks like VirtualBox failed to apply settings for interface VirtualBox Host-Only Ethernet Adapter
Sometimes such error happens under Windows.
Please run launch.sh one more time.
If this error remains after several attempts, then something really went wrong.
Aborting.

Revision history for this message
Vivek Kumar Jaiswal (vivek-krj) wrote :
Download full text (4.5 KiB)

I got the similar error but I was able to fix the same for the above mentioned environment.

It is happening because somehow when the script is applying the changes to network interfaces for Adapter #1,#2 and #3, it is applied but Virtual box itself is talking some time to get it reflected and in mean while the validation process is getting failed and script is throwing following error message :

--------------------------------------------------------------------------------------------------------
New Net Mask 255.255.255.0 does not match the applied one 15.0.0.0
New Net Mask 255.255.255.0 does not match the applied one 15.0.0.0
Looks like VirtualBox failed to apply settings for interface VirtualBox Host-Only Ethernet Adapter
Sometimes such error happens under Windows
--------------------------------------------------------------------------------------------------------

To fix this if you just put sleep for 2 second (just to make sure that changes are reflected when script is querying to virtual box) in following script function then it is going to solve the problem :

NOTE : You just need to copy paste the commands between the echo's mentioning before & after (you can remove echo but it is there just for debugging purpose)

1. Go into your virtual box script directory where launch.sh is present.
2. You will see another directory named as functions, go into the same directory
3. Open file network.sh in your editor.
4. Search function check_if_iface_settings_applied()
5. Add extra 4 lines as shown below :

check_if_iface_settings_applied() {
  name=$1
  ip=$2
  mask=$3
  echo "Verifying interface $name has IP $ip and mask $mask properly set."
  # Please leave 12 spaces in place - these are placed intentionally
  case "$(uname)" in
    CYGWIN*)
      OIFS=$IFS
      IFS=","
      ;;
    *)
      ;;
    esac
  local new_name=(`VBoxManage list hostonlyifs | egrep -A9 "Name: $name\$" | awk '/Name/ { $1 = ""; print substr($0, 2) }'`)
  case "$(uname)" in
    CYGWIN*)
      IFS=$OIFS
      ;;
    *)
      ;;
  esac
  local new_ip=(`VBoxManage list hostonlyifs | egrep -A9 "Name: $name\$" | awk '/IPAddress:/ {print $2}'`)
  local new_mask=(`VBoxManage list hostonlyifs | egrep -A9 "Name: $name\$" | awk '/NetworkMask:/ {print $2}'`)

  echo "******** before sleep mask extracted : $new_mask ***********"
  sleep 2
  local new_mask=(`VBoxManage list hostonlyifs | egrep -A9 "Name: $name\$" | awk '/NetworkMask:/ {print $2}'`)
  echo "******** after sleep mask extracted : $new_mask ***********"

  local new_dhcp=(`VBoxManage list hostonlyifs | egrep -A9 "Name: $name\$" | awk '/DHCP:/ {print $2}'`)
  # First verify if we checking correct interface
  if [[ "$name" != "$new_name" ]]; then
    echo "Checking $name but found settings for $new_name"
    return 1
  fi
  if [[ $ip != $new_ip ]]; then
    echo "New IP address $ip does not match the applied one $new_ip"
    return 1
  fi
  if [[ $mask != $new_mask ]]; then
    echo "New Net Mask $mask does not match the applied one $new_mask"
    return 1
  fi
  if [[ "Disabled" != $new_dhcp ]]; then
    echo "Failed to disable DHCP for network $name"
...

Read more...

Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) wrote :

Setting as triaged due to reproduced errors in comments above + possible solution.

Changed in fuel:
status: Incomplete → Triaged
importance: Undecided → High
assignee: nobody → Serhiy Ovsianikov (sovsianikov)
milestone: none → 8.0
Dmitry Pyzhov (dpyzhov)
tags: added: area-library
Changed in fuel:
status: Triaged → In Progress
Revision history for this message
Fabrizio Soppelsa (fsoppelsa) wrote :
tags: added: team-bugfix
Changed in fuel:
assignee: Serhii Ovsianikov (sovsianikov) → Maksim Malchuk (mmalchuk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/261062
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=a8a752103daf7dd475754ab9122cc6fd38278c28
Submitter: Jenkins
Branch: master

commit a8a752103daf7dd475754ab9122cc6fd38278c28
Author: Maksim Malchuk <email address hidden>
Date: Wed Dec 23 20:24:13 2015 +0300

    Debug and Notice messages during Fuel master start

    Instead of running 'dockerctl build all' command in the background
    and long wait for a debug output we've split the command to build
    each container one by one, but keep the original order. Doing this,
    we have much more information what is going on.

    Also this commit adds some important message to the log which used
    as an anchor for VirtualBox scripts.

    Change-Id: I77a1d3a32633390c1fe37bbeb81da5d0996972df
    Partial-Bug: #1496042
    Closes-Bug: #1529467

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/262437

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/8.0)

Reviewed: https://review.openstack.org/262437
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=9a80d32c64512fcd52fac24bae9b10513999d2b6
Submitter: Jenkins
Branch: stable/8.0

commit 9a80d32c64512fcd52fac24bae9b10513999d2b6
Author: Maksim Malchuk <email address hidden>
Date: Wed Dec 23 20:24:13 2015 +0300

    Debug and Notice messages during Fuel master start

    Instead of running 'dockerctl build all' command in the background
    and long wait for a debug output we've split the command to build
    each container one by one, but keep the original order. Doing this,
    we have much more information what is going on.

    Also this commit adds some important message to the log which used
    as an anchor for VirtualBox scripts.

    Change-Id: I77a1d3a32633390c1fe37bbeb81da5d0996972df
    Partial-Bug: #1496042
    Closes-Bug: #1529467

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-main (master)

Fix proposed to branch: master
Review: https://review.openstack.org/266934

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-main (master)

Reviewed: https://review.openstack.org/266934
Committed: https://git.openstack.org/cgit/openstack/fuel-main/commit/?id=7b6c10e99ca8452bf54bcb7f27ad18fc59826334
Submitter: Jenkins
Branch: master

commit 7b6c10e99ca8452bf54bcb7f27ad18fc59826334
Author: Maksim Malchuk <email address hidden>
Date: Tue Dec 29 21:06:32 2015 +0300

    Proper Windows 7/8/10 support

    This commit adds enchantments and proper support for Windows 7/8/10:
     * more verbose messages.
     * by default all network interfaces will be removed.
     * some code cleanup and regexp fixes.
     * added sleeps for some network operations.
     * proper support for windows full filenames.

    Change-Id: Ic56f8d114bdaf83dd12b76dd6cc46eaa8d74da52
    Closes-Bug: #1524558
    Closes-Bug: #1496042

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-main (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/268058

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-main (stable/8.0)

Reviewed: https://review.openstack.org/268058
Committed: https://git.openstack.org/cgit/openstack/fuel-main/commit/?id=406aa4219ed89d231bbd26349adfc15dbcc10125
Submitter: Jenkins
Branch: stable/8.0

commit 406aa4219ed89d231bbd26349adfc15dbcc10125
Author: Maksim Malchuk <email address hidden>
Date: Tue Dec 29 21:06:32 2015 +0300

    Proper Windows 7/8/10 support

    This commit adds enchantments and proper support for Windows 7/8/10:
     * more verbose messages.
     * by default all network interfaces will be removed.
     * some code cleanup and regexp fixes.
     * added sleeps for some network operations.
     * proper support for windows full filenames.

    Change-Id: Ic56f8d114bdaf83dd12b76dd6cc46eaa8d74da52
    (cherry-picked from 78aa1e59c558e890659e0187c909f8445bca34e9)
    Closes-Bug: #1524558
    Closes-Bug: #1496042

Revision history for this message
ElenaRossokhina (esolomina) wrote :

Verified on 8.0:
vbox 5.0.14 r105127 + extpack
Windows 10
ISO #555

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.