Setting Up New Server Share

From Heit Lab Wiki
Jump to: navigation, search

These procedures can only be preformed by server administrators.

Add a new share that is already accessible by the VM

  1. Log into Webmin (port 12321), select SAMBA server
  2. Click on "Create A New Share"
  3. Provide a name and directory to share
  4. Change "Create with" Owner = vboxadd, Group = vboxsf
  5. Click Create

You should return to the share window

  1. Click on the new share, select "Security and Access Control"
  2. Add users who can access the groups to the "Set the Read/Write Users" and "Set the Read/Write Groups" lists.
  3. Hit save

You will return to the security window

  1. Click on "File Permissions"
  2. Under "New Unix file mode" enter 660; under "New Unix directory mode" enter 770
  3. Click save; then return to the share window

Scroll to the bottom of the window and hit "Reset SAMBA server"; the share should now be available.

Add a new share to the VM

  1. Log into the host machine using remote desktop
  2. Shut down the VM you are adding the share to
  3. Start the virtualbox manager, open the settings for the VM, under shared folders add the new folder.
  4. Restart the VM, check to see if new folder is mounted.  It should be found under media/sh_XXX, where XXX is the share name
If the share is not mounted:
  1. Login to the shell-in-a-box (port 12320)
  2. apt-get update
  3. apt-get install dkms
  4. apt-get install build-essential
  5. apt-get install linux-headers-$(uname -r)
  6. reboot system (reboot 0)
  7. Mount the virtualbox guest addition iso:
    • Download the newest guest additions ISO from virtualbox webpage, or copy from the host system (use the Webamin file browser to upload)
    • Mount it:
      • mkdir /mnt/iso
      • mount -o loop VBOX.ISO /mnt/iso/ (where VBOX.ISO is the iso for the guest additions)
      • cd /mnt/iso/
  8. Run virtualbox guest additions for linux, using the --nox11 tag to reduce error messages
  9. Reboot; shared folders should appear under /media/

Note: This can be completed semi-automatically by:

  1. Upload the guest additions for the current version of virtualbox
  2. Run the updateVM script.

mkdir /home/iso
mount -o loop $(ls VBoxG*) /home/iso/
apt-get update
apt-get install dkms
apt-get install build-essential
apt-get install linux-headers-$(uname -r)
bash /home/iso/ --nox11
umount /home/iso
reboot 0
Personal tools
MediaWiki Appliance - Powered by TurnKey Linux