I am not sure when the following issue started for me. Looking at my commits, I was using the SDK successfully the last time end of June. I think that was SDK version 3.1.7. I tried to install that again, but it requests current version even if I use the offline installer.
My system:
SailfishOS SDK 3.2.10.2
openSUSE Tumbleweed
Linux 5.8.4
glibc 2.31
VirtualBox 6.1.12
The SDK is not able to detect that the Build Engine VirtualBox VM has been started. Clicking on the icon to start the VM in the SDK starts the VM but than tells me that it could not have started it. But VirtualBox Manager tells me that it has been started and I can also connect to it via SSH.
I also tried to use the Docker Build Engine, but there I have another issue. (sb2d says it detected an buffer overflow and terminates.)
Same here (im also on tumbleweed). Kernel 5.8 broke VBox 6.1.12 i think, I had to upgrade to a pre-release version to even get it to work, and then the SDK still didnt work anyway. fortunately i was able to make docker work.
After that please paste the output of sfdk --debug engine exec true.
Should you need to use an older SDK version like 3.1.7 meanwhile, you can install it when you disable the “updates” repository in the installer settings. Works with online installers as well.
Running sfdk --debug engine exec true gives the following, IMHO sadly not really helpful, output:
sfdk: [I] Starting the build engine…
sfdk.lib: [W] VmConnection: "Failed to start virtual machine \"Sailfish OS Build Engine\""
Failed to start the build engine
But the engine has been started.
Output of VBoxManage list vms:
"Sailfish OS Build Engine" {c01b6c51-46bf-4506-857f-aa4c07ab5649}
"Sailfish OS Emulator 3.3.0.16" {f9e89826-23aa-49da-ae74-cf432e122172}
One more note:
After SDK installation, all ports of the VMs (Build Engine SSH, Build Engine Web, Emulator SSH) are set to 1024. Trying to change them to the former default ports (2222, 8080, 2223) seems not to work. After restarting the SDK, the settings there tell me again that they are on port 1024.
The invalid port settings are interesting. Possibly vboxmanage changed its command line syntax or output formatting.
Please try (after stopping the VM) rm ~/.cache/SailfishSDK/libsfdk/vminfo.xml and get more detailed log with QT_LOGGING_RULES=sfdk.vms.debug=true sfdk --debug engine exec true.
Could you please paste the output of vboxmanage showvminfo "Sailfish OS Build Engine" executed while the VM is running according to vbox UI (after the failed sfdk engine exec command)?
That at least brings me one step further. But sadly not to the final.
Using the wrapper script (and VBoxManage instead of vboxmanage, as that is the binary name on openSUSE) at least starts the VM partly successful. But than it can not connect to SSH. I also tried it in the SDK with the same result when trying to compile something. Here is my ouput:
sfdk.vms: [D] Creating VM "sfdkvm:VirtualBox#Sailfish OS Build Engine"
sfdk.vms: [D] Creating VM "sfdkvm:VirtualBox#Sailfish OS Emulator 3.3.0.16"
sfdk.vms: [D] Using cached VM info for "sfdkvm:VirtualBox#Sailfish OS Build Engine"
sfdk.vms: [D] Using cached VM info for "sfdkvm:VirtualBox#Sailfish OS Emulator 3.3.0.16"
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:35:59.509") Refresh requested; synchronization: 1
sfdk: [I] Starting the build engine…
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:35:59.593") Connect requested
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:35:59.595") VM_STATE: VmOff --connect-requested--> VmStarting
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:35:59.595") Start fast VM state polling
sfdk.vms: [D] Starting "sfdkvm:VirtualBox#Sailfish OS Build Engine"
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:35:59.595") *** Disconnected --> Starting
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:36:00.635") VM running: false --> true
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:36:00.635") VM_STATE: VmStarting --successfully-started--> VmRunning
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:36:00.635") Stop fast VM state polling
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:36:00.635") *** Starting --> Connecting
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:36:00.635") SSH_STATE: SshNotConnected --VM-running&connect-requested--> SshConnecting
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:36:00.669") SSH error: "SSH-Verbindungsfehler.\ncommand-line line 0: Bad port '0'.\r\n"
sfdk.vms: [D] "sfdkvm:VirtualBox#Sailfish OS Build Engine" QTime("20:36:01.588") SSH try connect - previous error: "SSH-Verbindungsfehler.\ncommand-line line 0: Bad port '0'.\r\n"
The last two lines are repeated until I kill sfdk. (SSH-Verbindungsfehler = SSH connection error)
As written I also tried it inside the SDK with manually setting the ports to values mentioned in a previous comment. There the similar error is as follows:
Error connecting to the build engine: SSH-Verbindungsfehler.
command-line line 0: Bad port '0'.
That did not help. This is the part of the installation log without the simple file copying:
Komponente Sailfish OS Build Engine wird installiert
Virtual machine 'Sailfish OS Build Engine' is created and registered.
UUID: 6ef07b4d-e1a0-4bea-baa2-4a061feff85e
Settings file: '/home/buschmann/Dokumente/Entwicklung/SailfishOS/mersdk/Sailfish OS Build Engine/Sailfish OS Build Engine.vbox'
UUID changed to: 570f6e04-12ca-4384-a41c-73a5b9beff23
Komponente Sailfish OS Build Targets wird installiert
/home/buschmann/Dokumente/Entwicklung/SailfishOS/mersdk/targets/targets.repository
/home/buschmann/Dokumente/Entwicklung/SailfishOS/mersdk/targets/targets.repository/Updates.xml
/home/buschmann/Dokumente/Entwicklung/SailfishOS/mersdk/targets/targets.repository/manage.sh
Komponente SailfishOS-latest (3.3.0.16) wird installiert
/home/buschmann/Dokumente/Entwicklung/SailfishOS/emulator/Sailfish OS Emulator 3.3.0.16
/home/buschmann/Dokumente/Entwicklung/SailfishOS/emulator/Sailfish OS Emulator 3.3.0.16/sailfishos.vdi
Virtual machine 'Sailfish OS Emulator 3.3.0.16' is created and registered.
UUID: 47588568-f09e-4d61-b83c-68df7d1031ca
Settings file: '/home/buschmann/Dokumente/Entwicklung/SailfishOS/emulator/Sailfish OS Emulator 3.3.0.16/Sailfish OS Emulator 3.3.0.16/Sailfish OS Emulator 3.3.0.16.vbox'
UUID changed to: ab851c44-706b-4ecc-ae4a-709c66d1d6f0
Komponente Qt QmlLive Integration for Sailfish IDE wird installiert
Komponente Sailfish OS Build Engine Integration for Sailfish IDE wird installiert
Generating keys...
Generating keys...
Komponente Common Sailfish OS Emulator Integration Bits for Sailfish IDE wird installiert
Error: Device model was not found.
Error: Device model was not found.
Error: Device model was not found.
Error: Device model was not found.
Komponente Sailfish OS Emulator Integration for Sailfish IDE wird installiert
VBoxManage: error:
Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error:
Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error:
Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error:
Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error:
Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1926 of file VBoxManageModifyVM.cpp
0%...
10%...20
%...30%...
40%...50%...
60%...70%...80%...90%...
100%
Snapshot taken. UUID: 0783c7b4-6ea1-45fa-9b60-1c95b94b933d
Generating keys...
Generating keys...
Error: Emulator was not found.
Komponente SailfishOS-latest (3.3.0.16) wird installiert
Komponente SailfishOS-latest-armv7hl (3.3.0.16) wird installiert
Komponente SailfishOS-latest-i486 (3.3.0.16) wird installiert
Komponente Sailfish OS Build Target latest-i486 (3.3.0.16) Integration for Sailfish OS IDE wird installiert
Error: Id was not found.
Komponente Sailfish OS Build Target latest-armv7hl (3.3.0.16) Integration for Sailfish OS IDE wird installiert
Error: Id was not found.
Schreiben des Verwaltungswerkzeugs.
Installation abgeschlossen!
I have a feeling this is the real cause of your issues, even though I can’t prove it. But you can! Please upgrade your virtualbox to 6.1.14, which was released a few days ago, and try again. You might have to reinstall the Sailfish SDK after that, as your vm settings are probably incorrect.
I now tried a fresh install with VirtualBox 6.1.14, but now I can not even install the SDK. During installation I get the following error message:
Warning: VBoxManage: error: Invalid NIC type 'virtio' specified for NIC 1
A popup window shows up with the following text:
Error installing component org.merproject.mersdk:
Execution failed (Unexpected exit code: 1): "/usr/bin/VBoxManage modifyvm Sailfish OS Build Engine --ostype Linux26 --memory 1024 --vram 10 --ioapic on --pae on --nic1 nat --cableconnected1 on --nictype1 virtio --natpf1 guestssh,tcp,127.0.0.1,2222,,22 --natpf1 guestwww,tcp,127.0.0.1,8080,,9292 --nic2 intnet --cableconnected2 on --intnet2 SailfishSDK --nictype2 virtio --macaddress2 08005A11F155"
I tried with and without the wrapper. Looking at the help output of VBoxManage help modifyvm I have only the following options for --nictype, but not virtio: Am79C970A|Am79C973|Am79C960|82540EM|82543GC|82545EM