Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant 2.3.2 and Virtualbox 7.0.2 - startup error #12968

Closed
Warh40k opened this issue Oct 22, 2022 · 19 comments · Fixed by #12991 or #12994
Closed

Vagrant 2.3.2 and Virtualbox 7.0.2 - startup error #12968

Warh40k opened this issue Oct 22, 2022 · 19 comments · Fixed by #12991 or #12994

Comments

@Warh40k
Copy link

Warh40k commented Oct 22, 2022

Debug output

https://gist.github.com/Warh40k/f5b22574e436d17855023e169fae46ee

Expected behavior

The machine is started properly

Actual behavior

The vagrant up fails

Reproduction information

Reproducible with the Vagrantfile and vagrant up. This configuration worked fine on previous versions of vbox and vagrant (6.1.40 and 2.3.1 respectively)

Provider version

Virtual box: Version 7.0.2-1 r154219
Virtual box host modules: virtualbox-host-modules-arch 7.0.2-1-x86-64
Vagrant version: Vagrant 2.3.2

Host operating system

archLinux (Linux 6.0.2-arch1-1)

Guest operating system

bento/ubuntu-18.04

Steps to reproduce

  1. Clone yii2-advanced-template and use default VagrantFile
  2. vagrant up

Vagrantfile
https://gist.github.com/Warh40k/8bd43c791701ad254550937dd5785104

@Warh40k Warh40k added the bug label Oct 22, 2022
@Warh40k
Copy link
Author

Warh40k commented Oct 23, 2022

The issue was solved by reverting virtualbox to 6.1.40-1

@jav-12
Copy link

jav-12 commented Oct 24, 2022

Yep. Downgrade to VirtualBox to 6.1. That worked for me.

@xpertbot
Copy link

xpertbot commented Oct 26, 2022

Reverting to VB 6.1 on MacOS Ventura is not a solution because of the kernel extensions missing.

@chrisroberts
Copy link
Member

Hi there. Would you please provide the debug output from the command that is generating this error. I am unable to reproduce it and debug output will be helpful in identifying the underlying cause (in this case it would be running a vagrant up --debug)

Thanks

@bradsi
Copy link

bradsi commented Nov 1, 2022

@chrisroberts Not certain if this is a related issue, my bad if not. Here is my debug output:

MacOS Ventura 13.0
Virtualbox: 7.0.2r154219
Vagrant: 2.3.2

Laravel Homestead box version 12.x (Ubuntu 20.04)

Command: ["hostonlyif", "create"]

Stderr: 0%...NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 105 of file VBoxManageHostonly.cpp

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 105 of file VBoxManageHostonly.cpp

 INFO interface: Machine: error-exit ["Vagrant::Errors::VBoxManageError", "There was an error while executing `VBoxManage`, a CLI used by Vagrant\nfor controlling VirtualBox. The command and stderr is shown below.\n\nCommand: [\"hostonlyif\", \"create\"]\n\nStderr: 0%...NS_ERROR_FAILURE\nVBoxManage: error: Failed to create the host-only adapter\nVBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory\nVBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface\nVBoxManage: error: Context: \"RTEXITCODE handleCreate(HandlerArg *)\" at line 105 of file VBoxManageHostonly.cpp\n"]

@PedroClemo
Copy link

PedroClemo commented Nov 1, 2022

I'm experiencing the same as @bradsi with the same macOS, VirtualBox and Vagrant versions...

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

Tried rolling VirtualBox back to 6.1.40 (and older) but as @xpertbot says, this won't work on macOS 13 due to missing kernel extensions.

@chrisroberts
Copy link
Member

@bradsi @PedroClemo The issue you are encountering is not the same as this one. It's the change in how private networks are created/used using the macos framework and is being tracked in #12959

@vessd
Copy link

vessd commented Nov 5, 2022

Provider version
Virtual box: 7.0.2r154219
Virtual box host modules: virtualbox-host-dkms 7.0.2-2
Vagrant version: Vagrant 2.3.2

Host operating system
Arch Linux (Linux 6.0.7-arch1-1)

Guest operating system
archlinux/archlinux

vagrant up --debug
https://gist.github.com/vessd/e6abbc99dcbf859643959aaa3d59aaff

@OccultScientist
Copy link

Exactly the same issue as @bradsi and @PedroClemo above, subscribing for solution

@OccultScientist
Copy link

If it helps anyone, @cblpok kindly helped me out over here: #12959

I'm now able to work again

@chrisroberts
Copy link
Member

@vessd Thanks for providing the debug output! Unfortunately, it doesn't contain the output from the vbox command that I was looking for to determine the actual cause. Would you mind providing the output from: VBoxManage list systemproperties

Thanks so much!

@vessd
Copy link

vessd commented Nov 9, 2022

$ LANG=C VBoxManage list systemproperties
API version:                     7_0
Minimum guest RAM size:          4 Megabytes
Maximum guest RAM size:          2097152 Megabytes
Minimum video RAM size:          0 Megabytes
Maximum video RAM size:          256 Megabytes
Maximum guest monitor count:     64
Minimum guest CPU count:         1
Maximum guest CPU count:         64
Virtual disk limit (info):       2199022206976 Bytes
Maximum Serial Port count:       4
Maximum Parallel Port count:     2
Maximum Boot Position:           4
Maximum PIIX3 Network Adapter count:   8
Maximum ICH9 Network Adapter count:   36
Maximum PIIX3 IDE Controllers:   1
Maximum ICH9 IDE Controllers:    1
Maximum IDE Port count:          2
Maximum Devices per IDE Port:    2
Maximum PIIX3 SATA Controllers:  1
Maximum ICH9 SATA Controllers:   8
Maximum SATA Port count:         30
Maximum Devices per SATA Port:   1
Maximum PIIX3 SCSI Controllers:  1
Maximum ICH9 SCSI Controllers:   8
Maximum SCSI Port count:         16
Maximum Devices per SCSI Port:   1
Maximum SAS PIIX3 Controllers:   1
Maximum SAS ICH9 Controllers:    8
Maximum SAS Port count:          255
Maximum Devices per SAS Port:    1
Maximum NVMe PIIX3 Controllers:  1
Maximum NVMe ICH9 Controllers:   8
Maximum NVMe Port count:         255
Maximum Devices per NVMe Port:   1
Maximum virtio-scsi PIIX3 Controllers:  1
Maximum virtio-scsi ICH9 Controllers:   8
Maximum virtio-scsi Port count:         256
Maximum Devices per virtio-scsi Port:   1
Maximum PIIX3 Floppy Controllers:1
Maximum ICH9 Floppy Controllers: 1
Maximum Floppy Port count:       1
Maximum Devices per Floppy Port: 2
Default machine folder:          /home/sergey/VirtualBox VMs
Raw-mode Supported:              no
Exclusive HW virtualization use: on
Default hard disk format:        VDI
VRDE auth library:               VBoxAuth
Webservice auth. library:        VBoxAuth
Remote desktop ExtPack:          Oracle VM VirtualBox Extension Pack
VM encryption ExtPack:           Oracle VM VirtualBox Extension Pack
Log history count:               3
Default frontend:                
Default audio driver:            ALSA
Autostart database path:         
Default Guest Additions ISO:     /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso
Logging Level:                   all
Proxy Mode:                      System
Proxy URL:                       
User language:                   C

@chrisroberts
Copy link
Member

@vessd Thanks so much for providing that information. It's surprising as I was assuming the default machine folder value was either not being listed or was formatted differently (given the origin of the error is from that value failing to be found). I'm curious if you are still encountering the same error when using vbox 7.

I've got a PR addressing this error, but it's targeted mainly at providing a nice user error message when encountered and including more information in the logs for debugging. If you are still seeing the error and the default machine folder value is still in the systemproperties output, please do let me know as it is very unexpected behavior.

@vessd
Copy link

vessd commented Nov 11, 2022

@chrisroberts I ran the version from PR and realized that the problem is that the result of the command is output in the system locale. That is, there is no Default machine folder: string.

@chrisroberts
Copy link
Member

@vessd Can you provide the output of the command that's in the logs when you run it with --debug?

@vessd
Copy link

vessd commented Nov 11, 2022

 INFO warden: Calling IN action: #<VagrantPlugins::ProviderVirtualBox::Action::CleanMachineFolder:0x00007fa7c8c586f0>
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "list", "systemproperties"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31999
DEBUG subprocess: Exit status: 0
 WARN virtualbox_7_0: failed to determine machine folder from system properties
DEBUG virtualbox_7_0: processed output for machine folder lookup:
Версия API:                     7_0
Минимальный размер гостевой RAM:          4 Мегабайта
Максимальный размер гостевой RAM:          2097152 Мегабайта
Минимальный размер видео RAM:          0 Мегабайт
Максимальный размер видео RAM:          256 Мегабайт
Максимально гостевых мониторов:     64
Минимально гостевых ЦПУ:         1
Максимально гостевых ЦПУ:         64
Ограничение виртуального диска (инфо):       2199022206976 Байт
Максимально последовательных портов:       4
Максимально параллельных портов:       2
Максимальная загрузочная позиция:           4
Максимально PIIX3 сетевых адаптеров:   8
Максимально ICH9 сетевых адаптеров:   36
Максимально PIIX3 IDE Контроллеров:   1
Максимально ICH9 IDE Контроллеров:    1
Максимально IDE портов:          2
Максимально устройств на IDE порт:    2
Максимально PIIX3 SATA Контроллеров:   1
Максимально ICH9 SATA Контроллеров:    8
Максимально SATA портов:         30
Максимально устройств на SATA порт:   1
Максимально PIIX3 SCSI Контроллеров:   1
Максимально ICH9 SCSI Контроллеров:    8
Максимально SCSI портов:         16
Максимально устройств на SCSI порт:   1
Максимально PIIX3 SAS Контроллеров:   1
Максимально ICH9 SAS Контроллеров:    8
Максимально SAS портов:         255
Максимально устройств на SAS порт:   1
Максимально PIIX3 NVMe Контроллеров:   1
Максимально ICH9 NVMe Контроллеров:    8
Максимально NVMe портов:          255
Максимально устройств на NVMe порт:    1
Максимально PIIX3 virtio-scsi Контроллеров:   1
Максимально ICH9 virtio-scsi Контроллеров:    8
Максимально virtio-scsi портов:         256
Максимально устройств на virtio-scsi порт:   1
Максимально PIIX3 Флоппи Контроллеров:   1
Максимально ICH9 Флоппи Контроллеров:    1
Максимально Флоппи портов:          1
Максимально устройств на Флоппи порт:    2
Папка машины по умолчанию:          /home/sergey/VirtualBox VMs
Raw-режим поддерживается:              нет
Эксклюзивное использование аппаратной виртуализации: вкл
Формат жесткого диска по умолчанию:        VDI
Библиотека аутентификации VRDE:               VBoxAuth
Библиотека аутентификации вебсервиса:        VBoxAuth
Пакет расширения удаленного рабочего стола:          Oracle VM VirtualBox Extension Pack
VM encryption ExtPack:           Oracle VM VirtualBox Extension Pack
Размер истории в журнале:               3
Фронтэнд по умолчанию:                
Аудио драйвер по умолчанию:            ALSA
Путь базы данных автостарта:         
ISO Дополнений Гостевой ОС по умолчанию:     /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso
Уровень журнала:                   all
Режим Прокси:                      Система
URL Прокси:                       
Пользовательский язык:                   ru_RU

ERROR warden: Error occurred: Vagrant failed to determine the machine folder on this host from
the VirtualBox system information. Try running the command again.
If this error persists, please report this error as a bug.

@chrisroberts
Copy link
Member

perfect, thank you!

@vessd
Copy link

vessd commented Nov 11, 2022

2d7340f fixes this for me.

@chrisroberts
Copy link
Member

@vessd Awesome, thanks for the confirmation!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
8 participants