Solved VirtualBox creates small logs in the working directory

I upgraded VirtualBox from virtualbox-ose-6.1.22_1 to virtualbox-ose-6.1.26_3. After the upgrade, VirtualBox began creating small logs in the working directory (see the example bellow) each time the virtual machine was started.

2021-10-17-15-54-52.042-VirtualBoxVM-1348.log
Code:
Log created: 2021-10-17T15:54:52.428574000Z
Process ID:  1348 (0x544)
Parent PID:  1325 (0x52d)
Executable:  /usr/local/lib/virtualbox/VirtualBoxVM
Arg[0]: /usr/local/lib/virtualbox/VirtualBoxVM
Arg[1]: --comment
Arg[2]: FreeBSD
Arg[3]: --startvm
Arg[4]: 131b3663-d604-492b-8aba-aac89e21fa02
Arg[5]: --no-startvm-errormsgbox

Have anybody idea how to stop the creating of these annoying logs?
 
Incidentally (not a proposed fix), would /var/run be a better path for log files such as this?
VirtualBox creates detailed logging to the default directory ~/VirtualBox VMs/vm_name/Logs. In my opinion, these small logs are useless and shouldn't even exist.
 
Have anybody idea how to stop the creating of these annoying logs?
To suppress the logs being created set the VirtualBox environment variable VBOX_LOG_DEST to "nofile" in the users login shell configuration file.

For csh/tcsh in ~/.cshrc:
Code:
setenv VBOX_LOG_DEST nofile

For shells reading ~/.profile:
Code:
export VBOX_LOG_DEST=nofile
 
Use the ➕ Quote feature, then go to the topic where you'd like to ❝ Insert quotes…
My post #11 was a rhetorical question. I know about the "+Quote" function. "Reply" or "+Quote" is not important, It makes no sense to me replying to a comment from one thread in another thread.

The Off-Topic posts in this thread where not exceeding the acceptable amount. It's not like the thread being hijacked. There where 3 Off-Topic posts of 9 posts In this thread .

Without post #8, #10, #11, #12 and this post #13 it would have been 8 posts. Now there are 13, 7 of them Off-Topic.

Look at this, we are discussing useless subjects: How and where should a response be places. I for myself find it more productive to dig for information to the subject. Have you checked your bug report linked above? I dropped a comment there in reply to G. Falsi.
 
I have one little bit Off-Topic question. When variable VBOX_LOG_DEST is setted in the login shell, it works. But the direct run from another shell VBOX_LOG_DEST=nofile VirtualBox & doesn't work. Why?
 
I'm not sure I understand what you are trying to do. You say your login shell is shells/bash and, as I understand, the VirtualBox variable in the login shells configuration file (~/.profile or ~/.bash_profile) is working fine.

When you say "another shell" to which another shell are you referring?

I assumed when I asked you which shell you are trying to run VirtualBox from is one of the base shells (sh(1), tcsh(1)) or from ports (shells/zsh, shells/fish, etc).
 
All shells were bash.

At first, I tried to run VBOX_LOG_DEST=nofile VirtualBox & in the X session from bash, but it didn't work.

For the second time, I shutdown X session and then exported the variable in the login shell export VBOX_LOG_DEST=nofile. I didn't change any shell configuration file. Then I started the X again and run VirtualBox from bash shell VirtualBox & and it worked.
 
At first, I tried to run VBOX_LOG_DEST=nofile VirtualBox & in the X session from bash, but it didn't work.
I can't reproduce. Executing VBOX_LOG_DEST=nofile VirtualBox & from a bash shell in a X terminal in a running Xorg session works fine on my system. I can't tell why it's not working for you.

I didn't change any shell configuration file.
Why don't you set the VirtualBox variable in a bash configuration file? This way it won't be necessary to define the variable every time executing VirtualBox form a X terminal or care about it when launching VirtualBox from a application launcher.
 
Why don't you set the VirtualBox variable in a bash configuration file? This way it won't be necessary to define the variable every time executing VirtualBox form a X terminal or care about it when launching VirtualBox from a application launcher.
I know I can set a variable in the bash configuration file. I did it from a shell to quickly test if it works. Because it didn't work for me, I began experimenting with different setup methods.
 
I tried to run VBOX_LOG_DEST=nofile VirtualBox & again and it works now. I checked to see if I had made a typo the first time, but I didn't. Maybe the reason why it didn't work the first time was some strange state of bash.
 
Back
Top