User Tools

Site Tools


other:vb:use

Using VirtualBox

Important reminder:
  • VB: VirtualBox
  • VM: virtual machine
  • VB host: the machine and operating system where the VB program is running.
  • VB guest: the operating system (or VM) running inside VB.

We assume that you have already installed and updated VB

Starting VB and the VM

  • Start the Oracle VM VirtualBox application.
  • The available VM should appear in the upper left part of the Oracle VM VirtualBox Manager and can be in different states
    • Powered Off: you have finished your previous session by virtually shutting down your VM. When you click on Start, VB will start the VM just as if you had switched on a Linux computer: you will see briefly the Linux bootloader (where you usually don't have to do anything), then the usual Linux boot sequence and then the Linux login screen. Type your login, click on the cogwheel to select your Linux window manager (We recommend using Cinnamon) then type your password and click on Sign In.
    • Saved: you have finished your previous session by saving the current state of the VM. When you click on Start, VB will restore the VM in exactly the same state it was at the end of the session. This is the fastest way to resume working!
    • Aborted, etc…: something wrong or unexpected happened when the VM was stopping… It should be OK to click on Start to restart the VM (as if you were in the Powered Off state).
  • Once the VM is started/restored, it's OK to close the Oracle VM VirtualBox Manager window!

Suspending or stopping the VM

Remember that your Linux VM is a simulated virtual computer running on your host system, and it should logically behave just like a regular Linux computer

Stopping cleanly from Linux

  • You have not logged in yet, and you just have the Fedora Login screen: there should be a Power button displayed somewhere on the Linux screen (usually the upper right corner). Click on it and follow the instructions
  • If you have logged in, just use the shutdown button of the running Linux Window manager. If you are using Cinnamon (as suggested…): click on the Menu button at the lower left of the screen, then on the on/off switch icon, then on Shut Down. Do NOT select Suspend or Hibernate! If you want to Hibernate, it's better to use the option detailed in Stopping from VB below

Stopping from VB

  • Click on the Close ('X') button at the upper left the VB window, or on Machine → Close…
  • Choose one of the 3 possible options:
    • Save the machine state: the recommended option! This will take a snapshot of your Linux session and save it to disk. Next time you start your VM, you will be back in exactly the same state where you left off
    • Send the shutdown signal: theoretically, VB will tell the Linux system running on the VM to try to stop… and may fail. It's much better to stop cleanly!
      • If nothing happens (you machine stays in the Running state), try Send the shutdown signal again!
      • If still nothing happens, use Power off the machine (see below)…
    • Power off the machine: this is the same as brutally unplugging a real machine and will immediately stop the VB! Avoid doing this if you can (as you would avoid with a real computer)

Emergency stop

See the Power off the machine option above

Using shared folders

  • The shared folders make it possible for the guest to access directories of the host
  • The guest additions have to be installed in order to use the shared folders!
  • The Linux account on the guest that will use the Shared Folders has to be a member of the vboxsf Linux group

Configuration and use

  • Shut down the VM if it is running
  • Select the VM in the VB Manager window
  • Settings ⇒ Shared Folders
  • Click on the '+' sign and fill the fields of the Add Share window
    • Folder Path: e.g. H:\Scratch\<user_login>
    • Folder Name: e.g. Scratch
    • Auto-mount: selected
    • The newly configured folder will appear in the Machine Folders list
  • Start the VM and login
  • Type df -h and check that the defined shared folder appears as /media/sf_Scratch

Basic use of the VB

Network problems

If the host is correctly connected to the network, but you can't access the network from the VM and you get the following kind of ssh error message from the VM:
ssh user@machine
ssh: Could not resolve hostname machine: Name or service not known

You can reboot the VM, or more simply just restart the network (in the VM), with the following:
sudo service network restart

Problems when mounting LSCE disks in the VM

When your host is connected to the LSCE network, your VM should be able to access/mount directly all the LSCE disks in the VM (e.g., you can type cd /home/users/your_login directly in local terminal of your VM to access your LSCE home directory).

If you get an error message, there is probably a kerberos related problems… You can try typing klist and kinit in your local terminal and see if you can then access the LSCE disks!

If you still can't mount the disks, check the status of autofs, and restart it if necessary:

  • sudo systemctl status autofs
  • sudo systemctl start autofs

Some useful things to configure

The following settings can probably be done with any Linux environment, but the precise details below apply to the Cinnamon window manager

  • Add some useful things to panel bar at the bottom of the screen
    • Right click on an empty part of the bar → Add applets to the panel
      • Add Workspace switcher
      • Add Window list
      • Add System Monitor (there are several available, use sysmonitor@orcus). Right-click on it → Settings → only keep the CPU and Memory graphs
    • Right click on the on the Panel Launchers (the part of the panel with the Firefox, Thunderbird, Terminal and Files) → Add
      • to add an xterm launcher:
        Name: xterm
        Command
        xterm -ls -sl 1000 -bg black -fg white
        Click on the icon in the upper left corner and choose an icon (eg in /usr/share/icons/gnome)

Dealing with weird and unforeseen problems

Accessing the Linux system messages and logs

If something is not behaving as it should, it can be useful to check the system messages!

  • dmesg: print or control the kernel ring buffer
    dmesg -Hw
  • sudo tail -f /var/log/messages

Once you have a bit more technical information about what's going on, it's easier to

Updating VB

This is detailed in… the Update section :-)





[ PMIP3 Wiki Home ] - [ Help! ] - [ Wiki syntax ]

other/vb/use.txt · Last modified: 2016/09/08 08:39 by jypeter