Bug 270833 - After upgrading the system virtual machines cannot be started under virtualbox-ose
Summary: After upgrading the system virtual machines cannot be started under virtualbo...
Status: Closed Not A Bug
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Graham Perrin
URL: https://docs.freebsd.org/en/books/han...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-14 10:27 UTC by RicardoK
Modified: 2023-04-19 16:58 UTC (History)
2 users (show)

See Also:


Attachments
/var/log/messages (58.03 KB, text/plain)
2023-04-14 10:27 UTC, RicardoK
no flags Details
error message (20.15 KB, application/pdf)
2023-04-14 10:29 UTC, RicardoK
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description RicardoK 2023-04-14 10:27:48 UTC
Created attachment 241472 [details]
/var/log/messages

After upgrading the system from version 13.1-RELEASE to version 13.2-RELEASE, virtual machines cannot be started under VirtualBox-ose version 6.1.36_1. After reinstalling virtualbox-ose, the problem persists.
Comment 1 RicardoK 2023-04-14 10:29:31 UTC
Created attachment 241473 [details]
error message
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2023-04-15 15:37:58 UTC
(In reply to RicardoK from comment #0)

Amongst messages, in your first attachment: : 

Apr 14 11:02:34 rk-bsd kernel: KLD vboxdrv.ko: depends on kernel - not available or version mismatch
Apr 14 11:02:34 rk-bsd kernel: linker_load_file: /boot/modules/vboxdrv.ko - unsupported file type


A warning about kernel modules was added to the FreeBSD Handbook a few hours ago. 

If the upgrade, in your case, preceded sight of the warning: our apologies.
Comment 3 RicardoK 2023-04-16 11:39:16 UTC
I understand that I did not take into account the warning, which was not yet in place at the time of my update.
I performed the update according to the instructions https://www.freebsd.org/releases/13.2R/installation/

Could you please point out to me what I should do in my situation to be able to use VirtualBox ?
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2023-04-16 14:14:07 UTC
(In reply to RicardoK from comment #3)

As a basis, you'll need a copy of the ports collection (see <https://docs.freebsd.org/en/books/handbook/ports/#ports-using>) plus, if I recall correctly, a copy of the source code for FreeBSD. 

Before proceeding, an essential question. 

For packages, which repository do you use – quarterly, or latest? 

You'll find one of the two words in output from the following command: 


pkg -vv | grep -e url -e enabled -e priority
Comment 5 RicardoK 2023-04-17 09:35:08 UTC
For packages, I use the quarterly repository.

url : "pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly",
    enabled : yes,
    priority : 0,
Comment 6 RicardoK 2023-04-18 08:44:37 UTC
(In reply to Graham Perrin from comment #4)

For packages, I use the quarterly repository.

url : "pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly",
    enabled : yes,
    priority : 0,
Comment 7 Graham Perrin freebsd_committer freebsd_triage 2023-04-19 16:58:34 UTC
(In reply to RicardoK from comment #5)

You can use Git to get copies of the ports and src repos, see for example <https://docs.freebsd.org/en/books/handbook/mirrors/#git>. 

<https://docs.freebsd.org/en/books/handbook/ports/#ports-using-git-method> describes how to get the quarterly branch of ports. 

---- 

Alternatively, maybe simpler, use Gitup: 

1.  pkg install gitup

2.  edit the file named below, to use releng/13.2 instead of releng/13.1
    in the release section

3. gitup quarterly && gitup release


/usr/local/etc/gitup.conf

---- 

After you have copies of the repos: 

a) pkg delete virtualbox-ose-kmod

b) run the port-specific command that is shown at <https://www.freshports.org/emulators/virtualbox-ose-kmod/#add>. 

Then, load the kernel module. Restarting the computer should do this, automatically.