| 1 | === Windows Hosts === #windows |
| 2 | |
| 3 | Use the `packing` target of `kmk` to create `out\win.(x86|amd64)\(debug|release)\bin\VirtualBox-*.msi`. Use this |
| 4 | MSI install package to do a normal install. If installation fails for any reason, use logging with the MSI installer: |
| 5 | {{{ |
| 6 | msiexec /i VirtualBox-xxxxx.msi /l* install.log |
| 7 | }}} |
| 8 | |
| 9 | During development it is probably much more useful to run directly from the output directory. In order to do that you need to load the drivers. (For only loading the support driver, substitute `load.cmd` for `loadall.cmd`.) Use the following commands with the windows host: |
| 10 | {{{ |
| 11 | loadall.cmd |
| 12 | }}} |
| 13 | |
| 14 | For uninstallation: |
| 15 | {{{ |
| 16 | comregister.cmd -u |
| 17 | loadall.cmd -u |
| 18 | }}} |
| 19 | Whenever changes are made to the main API or the driver, you need to repeat the registration and driver loading steps. |
| 20 | |
| 21 | When changing files be sure to have first a look in taskmanager if the VBoxSVC and/or VBoxSDS servers are still running. This may happen if VBox didn't terminate correctly. [[BR]] |
| 22 | A quicker alternative is to get pskill from http://www.sysinternals.com/Utilities/PsKill.html and simply kill VBoxSVC and VBoxSDS when uncertain whether they are running or not: |
| 23 | {{{ |
| 24 | pskill VBoxSVC |
| 25 | pskill VBoxSDS |
| 26 | }}} |
| 27 | |
| 28 | If you don't want to debug assertions, you can start !VirtualBox with: |
| 29 | {{{ |
| 30 | set VBOX_ASSERT=none |
| 31 | set VBOX_LOG=... |
| 32 | set VBOX_LOG_FLAGS=time thread buffered |
| 33 | }}} |
| 34 | |
| 35 | |
| 36 | === Linux Hosts === #linux |
| 37 | |
| 38 | If you want to get started up with a minimum of fuss and learning curve, execute `./loadall.sh` from the build folder. This will do the following: |
| 39 | * Put kernel modules using the current local source code in place so that they are automatically loaded at boot (for the current kernel only). |
| 40 | * Set up automatic device node creation, including ownership and permissions, using udev. |
| 41 | * Set up USB pass-through. To use this you need to be a member of the group vboxusers (log out and back in again after joining to make it effective). |
| 42 | You can update the minimal installation by repeating the procedure, or clean it up again by executing `./loadall.sh -u`. |
| 43 | |
| 44 | Geting a minimal local build going without any form of installation can be done by executing `./load.sh` from the build directory. This loads the main support driver and nothing else. You can repeat this after changes or updates to the module source code. The module can be removed again with `./load.sh -u`. In this case you need to take care of udev rules and/or device nodes yourself. |
| 45 | |
| 46 | SELinux hosts (e.g. Oracle Linux, Fedora): It might be necessary to disable SELinux if you see messages like ''nsNativeComponentLoader: SelfRegisterDll(VBoxC.so) Load FAILED with error: /root/src/vbox/out/linux.amd64/debug/bin/components/../VBoxVMM.so: cannot restore segment prot after reloc: Permission denied'' |
| 47 | |
| 48 | Disable SELinux temporary on a running system by executing |
| 49 | {{{ |
| 50 | /usr/sbin/setenforce 0 |
| 51 | }}} |
| 52 | or disable it permanently by editing /etc/selinux/config and changing "enforcing" to "disabled". |
| 53 | |
| 54 | === Mac OS X Hosts === #osx |
| 55 | |
| 56 | To get a local build going, load the kernel extensions: |
| 57 | {{{ |
| 58 | cd VBox/out/darwin.x86/release/dist |
| 59 | sudo ./load.sh |
| 60 | }}} |
| 61 | |
| 62 | If you get code signing error while running above script execute following command and restart the machine. |
| 63 | {{{ |
| 64 | sudo nvram boot-args=kext-dev-mode=1 |
| 65 | }}} |
| 66 | |
| 67 | Running the executables in `VirtualBox.app/Contents/MacOS` works as usual. |
| 68 | |
| 69 | |
| 70 | === Solaris Hosts === #solaris |
| 71 | |
| 72 | To get a local build going without using the install package is as follows: |
| 73 | |
| 74 | Copy the VBI interfaces (not required for VirtualBox 3.1 and higher) from the source tree to the appropriate place. Copying both 32-bit and 64-bit doesn't hurt. |
| 75 | {{{ |
| 76 | cp src/VBox/Runtime/r0drv/solaris/vbi/64/vbi /platform/i86pc/kernel/misc/amd64/vbi |
| 77 | cp src/VBox/Runtime/r0drv/solaris/vbi/32/vbi /platform/i86pc/kernel/misc/vbi |
| 78 | }}} |
| 79 | |
| 80 | Next, copy and install the appropriate vboxdrv |
| 81 | {{{ |
| 82 | cp out/solaris.amd64/release/bin/vboxdrv /platform/i86pc/kernel/drv/amd64/vboxdrv |
| 83 | cp out/solaris.x86/release/bin/vboxdrv /platform/i86pc/kernel/drv/vboxdrv |
| 84 | }}} |
| 85 | |
| 86 | Copy the driver configuration file (no 64/32-bit differences here, the configuration file goes into the 32-bit |
| 87 | location) |
| 88 | {{{ |
| 89 | cp src/VBox/HostDrivers/Support/solaris/vboxdrv.conf /platform/i86pc/kernel/drv |
| 90 | }}} |
| 91 | |
| 92 | |
| 93 | If you have previous installed the module, remove it first before trying to load a new one |
| 94 | {{{ |
| 95 | su |
| 96 | rem_drv vboxdrv |
| 97 | }}} |
| 98 | |
| 99 | Load the module(s) |
| 100 | {{{ |
| 101 | add_drv -m'* 0666 root sys' vboxdrv |
| 102 | }}} |
| 103 | |
| 104 | Create the devlink |
| 105 | {{{ |
| 106 | ln -s /devices/pseudo/vboxdrv@0:vboxdrv /dev/vboxdrv |
| 107 | }}} |
| 108 | |
| 109 | Check if the module is of the right revision using: |
| 110 | {{{ |
| 111 | modinfo | grep vbox |
| 112 | 237 fffffffff7a97748 2900 75 1 vboxflt (VirtualBox NetBow 3.2.1r61839) |
| 113 | 238 fffffffff8771000 27e10 107 1 vboxdrv (VirtualBox HostDrv 3.2.1r61839) |
| 114 | ... |
| 115 | }}} |