Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
run_batocera_in_vm [2022/10/18 02:21] – guest additions is a different thing atarirun_batocera_in_vm [2025/02/06 00:36] (current) – Fix numbering on last point by removing the blank line above "Enjoy" dekay
Line 4: Line 4:
  
 <WRAP center round important> <WRAP center round important>
-Except massive performance deficits compared to bare-metal installation. Virtual Machines don't take kindly to newer/modern graphics APIs and standards.+Expect massive performance deficits compared to bare-metal installation. Virtual Machines don't take kindly to newer/modern graphics APIs and standards.
 </WRAP> </WRAP>
  
Line 14: Line 14:
 If you need further help with installing VirtualBox, refer to their helpful [[https://www.virtualbox.org/manual/ch01.html#hostossupport|user manual]] If you need further help with installing VirtualBox, refer to their helpful [[https://www.virtualbox.org/manual/ch01.html#hostossupport|user manual]]
 </WRAP> </WRAP>
 +  - If you downloaded the Batocera image file from the website, it is in ''.img.gz'' format. Uncompress the ''.gz'' part with your favorite uncompressing tool (7-Zip, WinRar...) to make it a ''.img'' file. Some browsers uncompress the file you downloaded by default.
   - Convert the Batocera IMG file to a VDI using the command line (''[Win]'' + ''[R]'', then type ''cmd''). For example, for the default VirtualBox installation using Batocera v33 beta: <code>   - Convert the Batocera IMG file to a VDI using the command line (''[Win]'' + ''[R]'', then type ''cmd''). For example, for the default VirtualBox installation using Batocera v33 beta: <code>
 "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertdd C:\batocera-x86_64-33-20211108.img C:\batocera-x86_64-33-20211108.vdi "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertdd C:\batocera-x86_64-33-20211108.img C:\batocera-x86_64-33-20211108.vdi
Line 123: Line 124:
 yum install virt-manager qemu yum install virt-manager qemu
 </code> </code>
 +  - Make sure your user owns the ''libvirt'' socket. Change out the username:username with your actual username:<code bash>
 +sudo chown username:username /var/run/libvirt/libvirt-sock</code>
   - Create a VM with the Batocera image as a drive in Qemu.   - Create a VM with the Batocera image as a drive in Qemu.
     - Go to **File** -> **New virtual machine...**\\ {{:qemu-vm-french-1.png?520|}}     - Go to **File** -> **New virtual machine...**\\ {{:qemu-vm-french-1.png?520|}}
Line 128: Line 131:
     - "Browse" for an existing image.\\ {{:qemu_bato_browse_for_image.png?360|}}     - "Browse" for an existing image.\\ {{:qemu_bato_browse_for_image.png?360|}}
     - Click "Browse for local..." and select the Batocera image file.\\ {{:qemu-vm-french-4-b.png?440|}} {{:qemu-vm-french-5.png?620|}}     - Click "Browse for local..." and select the Batocera image file.\\ {{:qemu-vm-french-4-b.png?440|}} {{:qemu-vm-french-5.png?620|}}
 +    - Select the OS: ''Microsoft Windows 10'' (FIXME no screenshot? What does this mean, as we've already selected our image?)
     - The dialogue box should now look like this, proceed:\\ {{:qemu_bato_i_dunno.png?360|}}     - The dialogue box should now look like this, proceed:\\ {{:qemu_bato_i_dunno.png?360|}}
 +    - Grant access permission to the emulator to search into the selected path
     - Change the default **Memory** and **CPU** numbers if you choose. The defaults are good enough.\\ {{:qemu-vm-french-3.png?360|}}     - Change the default **Memory** and **CPU** numbers if you choose. The defaults are good enough.\\ {{:qemu-vm-french-3.png?360|}}
     - Give your virtual machine a name and click **Finish**.\\ {{:qemu-vm-french-6.png?360|}}     - Give your virtual machine a name and click **Finish**.\\ {{:qemu-vm-french-6.png?360|}}
   - (Optional) If you'd prefer to passthrough your GPU to the virtual machine for extra performance (warning: <wrap em>your host machine will lose access to the GPU you passthrough</wrap>) follow the instructions here: https://www.server-world.info/en/note?os=Debian_11&p=kvm&f=12   - (Optional) If you'd prefer to passthrough your GPU to the virtual machine for extra performance (warning: <wrap em>your host machine will lose access to the GPU you passthrough</wrap>) follow the instructions here: https://www.server-world.info/en/note?os=Debian_11&p=kvm&f=12
 +  - (Optional) For gamepad support:
 +    - Connect the gamepad into a USB port on the host computer.
 +    - On the virtual machine, go to **View** -> **Redirect USB Devices** and then select the connected gamepad.\\ {{:qemu-redirectusbdevice.png?direct&400|}}
 +  - (Optional) For external storage device support:
 +    - Connect the USB external disk into a USB port on the host computer.
 +    - On the virtual machine, go to **View** -> **Redirect USB Devices** and then select the connected USB disk device.\\ {{:qemu-externalstoragedevice.png?direct&400|}}
 +    - Now goes to Settings -> Storage Devices -> And select the USB Disk, system will reboot to apply the changes.
   - Enjoy!   - Enjoy!
- 
-If you face an error about the "default" network device like this: 
- 
-{{:qemu_network_error.png?360|}} 
- 
-then you are not currently passing through your network connection to the virtual machine. Run the following on your host machine to enable that: 
- 
-<code bash> 
-sudo virsh net-start default 
-</code> 
- 
-<WRAP center round todo> 
-No controller workaround needed? 
-</WRAP> 
- 
 ===== Proxmox ===== ===== Proxmox =====
  
Line 168: Line 165:
 ==== My controller isn't working! ==== ==== My controller isn't working! ====
  
-First, make sure you have passed it through as a USB device to the VM itself (step 7d. in the instructions above).+First, make sure you have passed it through as a USB device to the VM itself (refer to the instructions above).
  
 If it's still not working, check that the controller itself is working fine on your host machine outside of VirtualBox. If it's still not working, check that the controller itself is working fine on your host machine outside of VirtualBox.
Line 179: Line 176:
  
 Windows shouldn't have this issue as long as the program is run in administrator mode. Windows shouldn't have this issue as long as the program is run in administrator mode.
 +
 +==== I have no network connection even though my host has one ====
 +
 +If you face an error about the "default" network device like this:\\ {{:qemu_network_error.png?360|}}
 +
 +then you are not currently passing through your network connection to the virtual machine. Run the following on the host machine to enable that:
 +
 +<code bash>
 +sudo virsh net-start default
 +</code>
  
  • run_batocera_in_vm.1666059699.txt.gz
  • Last modified: 4 years ago
  • by atari