On Linux Mint 22.3 Cinnamon `/home/benjamin_loison/VirtualBox VMs/` is created only when logging in with the associated user, how to access this folder without logging in ? I have verified with `root` that the mentioned folder does not exist. It is not an encrypted home issue, because I am able to access `/home/benjamin_loison/.bashrc` for instance.
Sep 24, 9:16pm

The folder isn't created by the login process itself — it's created by VirtualBox on first launch (per user), based on the default machine folder recorded in that user's VirtualBox configuration (/home/benjamin_loison/.config/virtualbox/VirtualBox.xml, key defaultMachineFolder).

So there's nothing magic tying it to a login. Two options:

1. Pre-create it as root

bash
sudo mkdir -p "/home/benjamin_loison/VirtualBox VMs"
sudo chown benjamin_loison:benjamin_loison "/home/benjamin_loison/VirtualBox VMs"
sudo chmod 700 "/home/benjamin_loison/VirtualBox VMs"

VirtualBox only creates the directory if it's missing; if it already exists (with correct ownership), it will just use it. The user never needs to log in for it to exist.

2. Point VirtualBox somewhere else

If the goal is to access the VMs from another account (e.g., root or a second user), you can:

  • Edit defaultMachineFolder in that user's VirtualBox.xml to a shared location like /var/lib/virtualbox-vms, or set VBOX_USER_HOME / use VBoxManage setproperty machineFolder when running as that user once.
  • Note that running VMs belonging to another user requires starting VirtualBox as that user (e.g. sudo -u benjamin_loison VBoxManage startvm ...), since VBoxSVC runs per-user and VM files are owned per-user. Simply reading/copying the .vdi/.vbox files, though, needs only filesystem permissions:
bash
sudo cp -a "/home/benjamin_loison/VirtualBox VMs/." /target/dir/

In short: the folder's absence just means that user has never run VirtualBox (or never created a VM); create it manually as root with the right ownership and it behaves identically.

Sep 24, 9:16pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more