[Feature request] Move certain VBox log files elsewhere

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
birdie
Posts: 425
Joined: 2. May 2010, 14:19
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Windows, Linux, other Unixes
Location: Artem S. Tashkinov
Contact:

[Feature request] Move certain VBox log files elsewhere

Post by birdie »

I really really dislike that VBox stores some if its log in the user home directory, I'm talking about:
$HOME/.VirtualBox/VBoxSVC.log*
$HOME/.VirtualBox/selectorwindow.log*
Would be nice if you could either disable them altogether or move them to e.g.
/tmp/.virtualbox-tmp
or something like that.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [Feature request] Move certain VBox log files elsewhere

Post by mpack »

Search the user manual for discussion of the VBOX_USER_HOME environment variable.
birdie
Posts: 425
Joined: 2. May 2010, 14:19
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Windows, Linux, other Unixes
Location: Artem S. Tashkinov
Contact:

Re: [Feature request] Move certain VBox log files elsewhere

Post by birdie »

mpack wrote:Search the user manual for discussion of the VBOX_USER_HOME environment variable.
And I don't want to touch the rest of the files thank you very much.
fth0
Volunteer
Posts: 5635
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [Feature request] Move certain VBox log files elsewhere

Post by fth0 »

See Technical documentation, especially the subpages with "logging" in their title.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: [Feature request] Move certain VBox log files elsewhere

Post by scottgus1 »

Moved to Suggestions, as this is more about basic Virtualbox operations, not about the 7.0 Beta as such.

Enhancement requests on the forum can only be discussed, not implemented. The place for asking the devs for an enhancement request is the Bugtracker. (There won't be much if any discussion there, though.)

As things stand now, the only interest presented in making this change is because you want it, but no problems with the present arrangements have been presented. So there may not be much reason so far in the devs' viewpoint to program in this capability. You'll need to make a stronger case to make the devs see why this would be a good idea.

For example, regarding size considerations, on my Windows host the VBoxSVC and selectorwindow logs take up less than 128kB. They'd fit on a 5-1/4" really old school floppy. So they're not pounding the C drive.

In what way do these files bother you?
JSM09A
Posts: 21
Joined: 17. May 2017, 04:51

Re: [Feature request] Move certain VBox log files elsewhere

Post by JSM09A »

fth0 wrote: 31. Aug 2022, 13:18 See Technical documentation, especially the subpages with "logging" in their title.
I reviewed all of that info and tried "export VBOX_LOG_DEST="dir=xxx" and VBOX_RELEASE_LOG_DEST" without success. It seemed to generate some -new- log files in the designated directory, but still generated the unwelcome VBoxSVC.log files in ~/.config/VirtualBox.

On this NVME build, all standard log files have been moved to /tmp to reduce "wasted" NVME writes, but there doesn't appear to be a way to move or suppress the VBoxSVC.log files (without also moving VirtualBox.xml which might be problematic). In my case, a Debian Live VM Snapshot is restarted for each/all web searches/accesses, so there are -many- VBoxSVC.log files written to NVME each day :(

As per original poster, the "desire" is for a way to configure the system so that file systems are only written-to/modified when an actual configuration change is made ... not during "normal" operations. However, I understand that this may not be sufficient justification/motivation for an overworked VBox developer to undertake such a project ...
fth0
Volunteer
Posts: 5635
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [Feature request] Move certain VBox log files elsewhere

Post by fth0 »

JSM09A wrote: 28. Nov 2023, 22:01 I reviewed all of that info and tried "export VBOX_LOG_DEST="dir=xxx" and VBOX_RELEASE_LOG_DEST" without success. It seemed to generate some -new- log files in the designated directory, but still generated the unwelcome VBoxSVC.log files in ~/.config/VirtualBox.
Did you mistype or did you use VBOXSVC_RELEASE_LOG_DEST?
JSM09A
Posts: 21
Joined: 17. May 2017, 04:51

Re: [Feature request] Move certain VBox log files elsewhere

Post by JSM09A »

fth0 wrote: 28. Nov 2023, 22:40 Did you mistype or did you use VBOXSVC_RELEASE_LOG_DEST?
Actually, I did not read the "Technical documentation" as carefully as I should have - sorry :oops:
There is a "Note" regarding "VBoxSVC" release logging with a separate link that I should have followed.
However, I just re-tried with VBOXSVC_RELEASE_LOG_DEST and indeed that seems to work ! THANKS !!!

VirtualBox still updates and rewrites selectorwindow.log and VirtualBox.xml even though there are no changes at all ... but this seems to be fundamental architectural design choice that would be hard to rectify.

Is there a way to move selectorwindow.log, or is this inadvisable ?

In any case, I am happy to at least be able to move the one log file. Thanks again.
fth0
Volunteer
Posts: 5635
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [Feature request] Move certain VBox log files elsewhere

Post by fth0 »

A quick search in the VirtualBox 7.0.12 source code for calls to VBoxLogRelCreate() revealed the following environment variable base names:

Code: Select all

VBOXAUTOSTART_RELEASE_LOG
VBOXBALLOONCTRL_RELEASE_LOG
VBOX_RELEASE_LOG
VBOX_GUI_SELECTORWINDOW_RELEASE_LOG
VBOXSDS_RELEASE_LOG
VBOXSVC_RELEASE_LOG
VBOXWEBSRV_RELEASE_LOG
VBOXDHCP_RELEASE_LOG
VBOXNET_%s_RELEASE_LOG
JSM09A
Posts: 21
Joined: 17. May 2017, 04:51

SOLVED - Re: [Feature request] Move certain VBox log files elsewhere

Post by JSM09A »

fth0 wrote: 29. Nov 2023, 01:11 A quick search in the VirtualBox 7.0.12 source code for calls to VBoxLogRelCreate() revealed the following environment variable base names:
That works as well !

To summarize, the following additions to .bashrc (or similar) fully satisfies the original poster's request:

Code: Select all

export VBOXSVC_RELEASE_LOG_DEST="dir=/tmp/.virtualbox-tmp"
export VBOX_GUI_SELECTORWINDOW_RELEASE_LOG_DEST="dir=/tmp/.virtualbox-tmp"
Many thanks to fth0 for their assistance !
Last edited by JSM09A on 1. Dec 2023, 01:40, edited 1 time in total.
fth0
Volunteer
Posts: 5635
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [Feature request] Move certain VBox log files elsewhere

Post by fth0 »

You're welcome, and thanks for reporting back! :)
Post Reply