thalium / icebox

Virtual Machine Introspection, Tracing & Debugging
MIT License
564 stars 86 forks source link

System install of modified VirtualBox build #18

Closed Wenzel closed 4 years ago

Wenzel commented 5 years ago

Hi,

I would like to install the modified VirtualBox system-wide.

Currently, the build instructions that your provide generate an archive as last step on Linux tar -xjf tmp/VirtualBox.tar.bz2 -C linux.amd64.bin

As you may be familiar with the build system, do you know how can I install my virtualbox system-wide ? Is there an equivalent of sudo make install to get it in /usr/local ?

Thanks.

bamiaux commented 5 years ago

I don't know, if you want to install it system-wide you should follow the instructions here: https://www.virtualbox.org/wiki/Linux%20build%20instructions You will also see that we are following those instructions in our gitlab-ci.yml The last step is `sudo make install which you are looking for.

IMHO it is better to leave the customized version in a separate directory & run it from here.

SamRSA commented 5 years ago

Hi,

I would like to install the modified VirtualBox system-wide.

Currently, the build instructions that your provide generate an archive as last step on Linux tar -xjf tmp/VirtualBox.tar.bz2 -C linux.amd64.bin

As you may be familiar with the build system, do you know how can I install my virtualbox system-wide ? Is there an equivalent of sudo make install to get it in /usr/local ?

Thanks.

Instead of "make install":

# enter bin directory
cd out/linux.amd64/release/bin

# copy libs
cp -prf *.so /usr/lib/
# create directory
mkdir -p /usr/local/virtualbox
# copy files
cp -prf * /usr/local/virtualbox/
# make symbolic links
ln -s /usr/local/virtualbox/VirtualBox /usr/local/bin/VirtualBox
ln -s /usr/local/virtualbox/VBoxSVC /usr/local/bin/VBoxSVC

# Dont forget to add new group:
groupadd vboxusers
usermod -G vboxusers -a $USER

# Give permissions:
chmod 660 /dev/vboxdrv
chgrp vboxusers /dev/vboxdrv
Wenzel commented 5 years ago

@bamiaux , it looks like the sudo make install in the Linux guide is just to compile the linux kernel modules.

@SamRSA I tested your solution and it works ! I just have to simlink all the binaries

@bamiaux My main goal was to build applications on top of the FDP library. I looked into my out/linux.amd64/release directory, but I can't find any library matching the name *fdp*.so ??

I know it is located under icebox/src/FDP, and installed by a cmake rule in https://github.com/thalium/icebox/blob/b5e0d047318d6e67f47c7fa225849cdfe9c60f4c/build/CMakeLists.txt#L54

So how can I find and install this .so system-wide ?

Thanks !

Fimbure commented 5 years ago

After you followed these instructions: https://github.com/thalium/icebox/blob/master/doc/BUILD.gen.md#job-gcc

You should find icebox/bin/x64/libfdp.so

Side note: you can use TARGET=Unix Makefiles (by default) and make if you prefere

Fimbure commented 5 years ago

FDP server side (modified vbox) and client side (icebox) are built separately. Each of them have their own build chain.

Wenzel commented 5 years ago

@Fimbure I'm configuring the Icebox build and following your BUILD instructions.

One small issue you might want to fix is this: Capture d’écran de 2019-10-24 12-18-34

I had my default python configured on Python2, so you might want to search for /usr/bin/python3

bamiaux commented 5 years ago

Yes, it's a bug fixable in cmake 3.12, but I cannot use it yet because the distribution i'm using does not have this version yet. I'll see if I can find a workaround eventually

bamiaux commented 5 years ago

@Fimbure I'm configuring the Icebox build and following your BUILD instructions.

One small issue you might want to fix is this: Capture d’écran de 2019-10-24 12-18-34

I had my default python configured on Python2, so you might want to search for /usr/bin/python3

Fixed in https://github.com/thalium/icebox/commit/fdaab7fed7654d6847170067157aaeceba216fa0

bamiaux commented 4 years ago

Is there anything to do for this ticket ?

Wenzel commented 4 years ago

hi @bamiaux,

I implemented the solution proposed by @SamRSA:

- name: find all VirtualBox libraries
  find:
    paths: "/vagrant/icebox/third_party/virtualbox/out/linux.amd64/release/bin"
    patterns: '*.so'
  register: vbox_libs

- name: symlinks VirtualBox libraries to fake system-wide installation
  file:
    src: "{{ item.path }}"
    path: "/usr/lib/{{ item.path | basename }}"
    owner: root
    group: root
    state: link
  loop: "{{ vbox_libs.files }}"

- name: symlinks VirtualBox binaries to fake system-wide installation
  file:
    src: "/vagrant/icebox/third_party/virtualbox/out/linux.amd64/release/bin/{{ item }}"
    path: "/usr/local/bin/{{ item }}"
    owner: root
    group: root
    state: link
  with_items:
    - 'VirtualBox'
    - 'VBoxManage'
    - 'VBoxSVC'
    - 'VBoxHeadless'
    - 'vboxdrv.sh'

It works for, me so I will close this issue.

Thanks !