meta data for this page
  •  

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vm:virtualbox [2020/01/21 09:18] – virtualbox renamed to vm:virtualbox niziakvm:virtualbox [2023/10/17 10:55] (current) niziak
Line 1: Line 1:
 +====== Virtualbox ======
 +
 ===== Issues ===== ===== Issues =====
 +
 +==== Discard machine "starting" state ====
 +
 +<code bash>
 +VBoxManage list vms
 +VBoxManage discardstate aab57b2d-566b-4d63-bca1-2a8ae74cd213
 +
 +VBoxManage: error: The machine '...' is already locked for a session (or being unlocked)
 +VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
 +VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1247 of file VBoxManageMisc.cpp
 +
 +rm /tmp/.vbox-john-ipc/lock
 +</code>
 +
 +Edit .vbox file and remove ''aborted="true"''
  
 ==== Error -610 in supR3HardenedMainInitRuntime! ==== ==== Error -610 in supR3HardenedMainInitRuntime! ====
Line 20: Line 37:
 </code> </code>
 ===== Tips & Tricks ===== ===== Tips & Tricks =====
 +
 +==== Virtualization in VBox ====
 +TAG: nested virtualization
 +VBox doesn't support nester virtualization.
 +
 +
 +==== Boot from USB ====
 +
 +There is no option to boot from USB. You need to use helper bootloader.
 +Download [[https://www.plop.at/en/bootmanager/download.html|plop]] and extract ISO from zip.
 +
  
 ==== optimize for Intel ==== ==== optimize for Intel ====
Line 34: Line 62:
 === Systemd based way === === Systemd based way ===
  
 +== Classic way ==
 +
 +There is a script ''/usr/lib/virtualbox/vboxautostart-service.sh'' which is called by ''/lib/systemd/system/vboxautostart-service.service''
 +Script is calling binary ''VBoxAutostart''.
 +Script is sourcing following configration files:
 +  * ''/etc/vbox/vbox.cfg''
 +  * ''/etc/default/virtualbox''
 +And using following variables:
 +  * ''$VBOXAUTOSTART_DB''
 +  * ''$VBOXAUTOSTART_CONFIG''
 +
 +
 +<code bash>
 +systemctl enable vboxautostart-service.service
 +</code>
 +
 +
 +== Single service per VM ==
 <file systemd etc/systemd/system/vboxvmservice@.service>  <file systemd etc/systemd/system/vboxvmservice@.service> 
 [Unit] [Unit]
Line 45: Line 91:
 ExecStart=/usr/bin/VBoxHeadless -s %i ExecStart=/usr/bin/VBoxHeadless -s %i
 ExecStop=/usr/bin/VBoxManage controlvm %i savestate ExecStop=/usr/bin/VBoxManage controlvm %i savestate
 +TimeoutSec=5min
 +TimeoutStopSec=5min
 +
  
 [Install] [Install]