Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VM + Batocera (*img) on Vdisk?

Featured Replies

Hello everyone,

I am currently trying to set up Batocera as a VM and am encountering some challenges. I initially configured my VM with Windows 11, using the Batocera image as the first disk (vdisk1) and an additional disk (vdisk2) for extra storage.

I was able to pass through my RTX 2070 graphics card without any issues, and the internet connection works flawlessly as well.

My goal now is to install Batocera onto a virtual disk so I can fully utilize its capabilities. However, I find that the *.img file is too small and Batocera attempts to download all packages before the installation can be completed.

The original image batocera-x86_64-x86_64-38-20231014.img could be successfully enlarged after some research. But I noticed that within this image lies another image named 1.userdata.img, which it tries to write to, but is obviously still too small.

Under Windows, it seems impossible to edit the *.img files – it always reports them as corrupted.

In Unraid, I managed to enlarge the outer image, but I'm not making any progress with the inner image. Has anyone here had similar experiences or could offer alternative suggestions? Or has someone else solved it differently? I'm grateful for any hints or assistance!

I've tried multiple times, but the problem persists: the disk is reportedly too small. Inside the *.img file is the 1.userdata.img, which seems to be too small.

Thanks in advance for your help!

 

 

translated by chatgpt

Solved by blackY.

  • Author
  • Solution

Hello, I just wanted to let everyone know that I've solved the problem. Here are the steps I followed:

1.Download Batocera.

2.Edit a Windows VM to add a 'virtual USB hard drive'.

3.Start the Windows VM and install Batocera on the virtual USB hard drive.

4.Now, you can mount the virtual USB hard drive in a new VM and install everything as you would on a regular computer.

"virtual USB hard drive"?
Where is this option?

  • 1 year later...

for anyone coming from the future, the main thing to get this working was "sudo fallocate -l 16G batocera.img" to make the image larger.

Here are all my notes:

setting up the VM

that makes the .img larger, allowing batocera to install whatever it needs.

here are all the steps I did

  • download batocera  

  • extract .img

  • sudo fallocate -l 16G batocera.img    (as seen here in method 2THIS IS KEY AND IS USED TO MAKE THE VIRTUAL DRIVE LARGER TO ALLOW BATOCERA TO ISNTALL STUFF.

  • create new windows 10 VM

  • skip the OS drive

  • pass the .img file as a manual vdisk.

  • AD_4nXe0xkbPmDUzodIdbB85oZ5XXbj8Xwsbcnam_PACBebvHoo7v9hU3Ao_3Ol1s11zA6gWa5tGrB5nyGxg_9CG7dofvfOKpRulUI1eQHcjqGZJ1zlClSbOf3JHsfPVR8jib38yxI117A?key=2LTSY9ct6fPWXTTlihieuq6s

  • pass gpu, usb controller if desired:

    AD_4nXdtRe7Cttf2MqiH4DPVPZQhg48JiCLedGaSGju_TQcbIzvPT3frS-zGcXZ2ppNJo9-EiBfKJ8cOMb16iNfurss8zqS2TELsShbR7MsvNG8GuZ4fK7MagLWzRRuO8077pCMfgvJe2w?key=2LTSY9ct6fPWXTTlihieuq6s

setting up network shares

Also, since I dont have the img on a usb key, I had to mount the img file to edit the settings when I wanted to read the roms from a share:

  • shut down the vm

  • mount the img on my unraid:  

  • mkdir -p /mnt/batocera_img

  • # Create a loop device with partitions

  • losetup -Pf batocera.img

  • AD_4nXdV4mKmtzLyfDMylilBJrJBqnewle6RCTYlp7DS-CFmUS4ZBJutcSXNr-gCaZ_JCwhdSi0pBpp9VEXAMnk136nPJyT3YfLeSRdDASWnX8yJXvYUDhm_KDCLaBysNh3s0neiAQMbow?key=2LTSY9ct6fPWXTTlihieuq6s

  • # Find out the loop device name (e.g., /dev/loop4)

  • lsblk

  • AD_4nXf3FZRw_1ZN0gCHcPCFxERtcA6uj1JDiuRjoDkAELfHIX52O8I7pWzq3PVWjzVEEI0JKvNfNdArxiJsXYdl7DJ9yPsCzK3Nl4qzf8jmAxMz1G58nBSHmgaB9EzVhgtxLkzBQcjGMw?key=2LTSY9ct6fPWXTTlihieuq6s

  • mkdir -p /mnt/batocera_img

  • mount /dev/loop4p1 /mnt/batocera_img

  • nano /mnt/batocera_img/batocera.conf

  • replace sharedevice=LOCAL with sharedevice=NETWORK

  • setup the shares:
    ## NETWORK -> Use the network share, requires configuration first. See
    https://wiki.batocera.org/store_games_on_a_nas

  • sharedevice=NETWORK

  • [email protected]:data/emulation/roms:guest

  • [email protected]:data/emulation/bios:guest

  • [email protected]:data/emulation/batocera/saves:guest

  • AD_4nXfhIbD20HUWsoniUlNfxxL1hQXWugSc0P_s6bJLMXaM-IsZHqAro3EaPtUYQke9Aj7GL71TlGus33tULC8F94KrzA9Gp78gmfRXCQSM283t2AADi6qo31zPLNX_QJL1PlL_bUEKWg?key=2LTSY9ct6fPWXTTlihieuq6s

  • umount /mnt/batocera_img

unzipping files

I had a bunch of PSX roms that needed to be unzipped (7z), so I installed it using nerd tools and ran this script:

for file in *.7z; do

folder="${file%.7z}"

mkdir -p "$folder"

7z x "$file" -o"$folder"

done

fixing sound

Sound worked until I plugged a PS4 controller. To fix it, I did the following from this reddit post (https://www.reddit.com/r/batocera/comments/p5v5zh/no_sound_through_hdmi/)

Timmun90 did you go into (From Batocera main MENU ) KODI / setting ⚙️/ System / Audio : In the AUDIO PASSTHROUGH - ENABLE Allow PASSTHROUGH and your TVs or Audio Passthrough DEVICE should be selected. I’m my setup I have a Samsung 57” Shown as HDA INTEL PCH , SAMSUNG on HDMI #0 Lastly make sure that your AUDIO OUTPUT matches KODI. ON BATOCERA / System Settings / Harware Audio Output should be set to same as above HDMI# 0

fixing slow emulation

apparently batocera defaults to 4k resolution when plugged into a TV.

unnamed.jpg

Edited by morglum

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.