VirtualBox install/update Guest Additions

IT Tips
1. Make guest additions iso available on host server VBoxManage storageattach "" --storagectl IDE --port 0 --device 0 --type dvddrive --medium /usr/share/virtualbox/VBoxGuestAdditions.iso 2. Mount cdrom and install/update guest additions in guest sudo mount /dev/cdrom /media/cdrom sudo bash /media/cdrom/VBoxLinuxAdditions.run sudo umount /media/cdom 3. Reboot guest to ensure everything is loaded. sudo reboot now 4. Remove CD iso VBoxManage storageattach "" --storagectl IDE --port 0 --device 0 --medium "none"
Read More

VirtualBox headless VM autostart

IT Tips
1. Modify the file /etc/default/virtualbox and add a few variables. VBOXAUTOSTART_DB which contains an absolute path to the autostart database directory and VBOXAUTOSTART_CONFIG which contains the location of the autostart config settings. echo 'VBOXAUTOSTART_DB=/etc/vbox' | sudo tee -a /etc/default/virtualbox echo 'VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg' | sudo tee -a /etc/default/virtualbox 2. Create the autostart.cfg file NB: You may need to change the username or add others, depending on your installation. echo '# Default policy is to deny starting a VM, the other option is "allow".' | sudo tee /etc/vbox/autostart.cfg echo 'default_policy = deny' | sudo tee -a /etc/vbox/autostart.cfg echo '# Create an entry for each user allowed to run autostart' | sudo tee -a /etc/vbox/autostart.cfg echo 'vbox = {' | sudo tee -a /etc/vbox/autostart.cfg echo 'allow = true' | sudo tee -a /etc/vbox/autostart.cfg echo…
Read More

VirtualBox admin using phpvirtualbox

IT Tips
1 Add a vbox user sudo adduser vbox Now we must add the user to the vboxusers group: sudo adduser vbox vboxusers 2 Start VirtualBox Web Services Create the file /etc/default/virtualbox and put the line VBOXWEB_USER=vbox in it (so that the VirtualBox SOAP API which is called vboxwebsrv runs as the user vbox): echo '# virtualbox defaults file' | sudo tee /etc/default/virtualbox echo 'VBOXWEB_USER=vbox' | sudo tee -a /etc/default/virtualbox Next create the system startup links for vboxwebsrv and start it: sudo systemctl enable vboxweb-service sudo systemctl start vboxweb-service 3 Install Apache2 We need a web server with PHP support to serve phpVirtualBox. Install Apache and PHP as follows: sudo apt-get -y install apache2 libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapr1 php7.0-common php7.0-mysql php7.0-soap php-pear wget Restart Apache: sudo systemctl restart apache2.service…
Read More

Raspberry PI DHCP and DNS Server (dnsmasq)

IT Tips
SETTING UP A RASPBERRY PI AS A DHCP AND DNS SERVER dnsmasq: If dnsmasq is used as dhcp server, the local hostnames are automatically added "on the fly" to its dns cache. No need for an additional daemon. Dnsmasq is easier to install, and administrate than ISC dhcp-server+bind Its lease file is much easier to parse if need arises. Dnsmasq takes up less memory and CPU than ISC dhcp-server + Bind (approx. 10 times less) Dnsmasq does not bypass the kernel firewall rules like ISC daemon allegedly does in some configurations. There is a package for the Pi and so you can install it in the usual way using apt-get. DNS forwarding and cache - You still use your existing DNS (be it your ISP's DNS, Google public DNS, or…
Read More