This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
other:vb:update [2015/03/17 13:41] jypeter [Updating Linux] Had tu use %%--%% to display 2 dashes instead of a long dash |
other:vb:update [2016/09/19 15:19] (current) jypeter [Updating Linux] Improved... |
||
---|---|---|---|
Line 2: | Line 2: | ||
<note important>Important reminder: | <note important>Important reminder: | ||
+ | * //VB// : VirtualBox | ||
+ | * //VM// : a Virtual Machine running inside VB | ||
* VB //host//: the machine and operating system where the VB program is running. | * VB //host//: the machine and operating system where the VB program is running. | ||
- | * VB //guest//: the operating system running **inside** VB. | + | * VB //guest//: the operating system running **inside** VB (aka //VM//). |
</note> | </note> | ||
+ | |||
+ | ===== When should you update the VB? ===== | ||
+ | |||
+ | <note warning>If you are not used to installing and debugging VB, you may want to play it safe and **not update VB**. Many things are fixed in a new version, but things can also break (e.g. network access, graphics, ...) and you may have to use the VB forum to get everything working again... | ||
+ | |||
+ | It is safe to update the Linux running inside VB</note> | ||
+ | |||
+ | VB will periodically check if a new version is available. You can also check that manually by doing: //File --> Check for updates...// | ||
+ | |||
===== Updating the VirtualBox program on the host ===== | ===== Updating the VirtualBox program on the host ===== | ||
- | * Download the latest version of VB, and the matching VB additions file from the [[https://www.virtualbox.org/|VirtualBox web site]] | + | * Click on the link that VB will display in a pop-up window when there is a new version, or download the latest version of VB from the [[https://www.virtualbox.org/|VirtualBox web site]] |
- | * Execute the VirtualBox-NN1234-Win.exe installer | + | * If the host where you are updating VB has no network connection, you probably also want to download the matching //VB Extension Pack// |
+ | * You can also download an updated version of the //User Manual// from the same page | ||
+ | * Make sure that: | ||
+ | * Your VB guest is in the //Powered Off// state (i.e. you have exited the guest with a proper Linux shut down last time you used the guest) | ||
+ | * VB is not running (e.g. you don't have an open //Oracle VM VirtualBox Manager// window) | ||
+ | * Execute the VirtualBox-vvvv-NNNN-Win.exe installer **as an Administrator** (e.g. right-click on the installer and select //run as Administrator//). | ||
+ | * Accept all the default settings | ||
+ | * Make sure you don't have another program using the network when the installer warns you about having to temporarily stop the network | ||
+ | * Choose to start VB at the end of the installation, and accept to download and install the updated //Oracle VM VirtualBox Extension Pack// when VB tells you that a new pack is available | ||
+ | * Reboot the computer if VB asks for it (otherwise, you may get weird error messages when trying to restart the guest) | ||
+ | * Start the VM, optionally [[#updating_linux|update the linux guest]] and no not forget to [[#updating_the_linux_guest_additions|update the guest additions]] | ||
+ | |||
+ | ==== Note about the manual update of the extension pack ==== | ||
+ | |||
+ | It is also possible to manually install the updated extension pack, but there is a risk of losing the settings | ||
* Double click on the Oracle_VM_VirtualBox_Extension_Pack-NN1234.vbox-extpack extension pack and follow the instructions | * Double click on the Oracle_VM_VirtualBox_Extension_Pack-NN1234.vbox-extpack extension pack and follow the instructions | ||
* **WARNING!** VB seems to go back to its default settings during the update (since version 4.3.22?), resulting in //an apparent disappearance of the VB after the update//! | * **WARNING!** VB seems to go back to its default settings during the update (since version 4.3.22?), resulting in //an apparent disappearance of the VB after the update//! | ||
* **1)** Restore the preferences by hand, as specified in [[other:vb:install#installing_vb_on_a_windows_host]] | * **1)** Restore the preferences by hand, as specified in [[other:vb:install#installing_vb_on_a_windows_host]] | ||
- | * **2)** Go to the directory where the VM is installed (e.g. ''E:\VirtualBox\VirtualBox VMs\Fedora Core 20 CLIM_ESTIMR'') and double click on the ''XXXXX.vbox'' setting file located in this directory | + | * or **2)** Go to the directory where the VM is installed (e.g. ''E:\VirtualBox\VirtualBox VMs\Fedora Core 20 CLIM_ESTIMR'') and double click on the ''XXXXX.vbox'' setting file located in this directory |
- | * Do not forget to update the guest additions (see below) | + | |
+ | ==== Cleaning up things ==== | ||
+ | |||
+ | After updating VB, you can remove the downloaded extension packs from ''C:\Users\your_login\.VirtualBox'' (i.e. all the ''Oracle_VM_VirtualBox_Extension_Pack-NNNN.vbox-extpack'' files) | ||
===== Updating the Linux guest system ===== | ===== Updating the Linux guest system ===== | ||
Line 25: | Line 54: | ||
* Outside LSCE: **yum %%--%%disablerepo lsce update** | * Outside LSCE: **yum %%--%%disablerepo lsce update** | ||
- | * //Is there a cleanup step or a temporary directory to remove?// | + | Note: You will know you have updated the //Linux kernel//, if ''yum update'' displays something like the following: |
+ | <code>Installing: | ||
+ | kernel x86_64 3.19.8-100.fc20 updates 34 M | ||
+ | kernel-devel x86_64 3.19.8-100.fc20 updates 9.3 M | ||
+ | kernel-modules-extra x86_64 3.19.8-100.fc20 updates 2.1 M</code> | ||
- | ==== Updating the guest additions ==== | + | === Cleaning up things === |
+ | |||
+ | Check the space available on the disks with ''df -h'' | ||
+ | |||
+ | It may be a good idea to clean the yum cache from time to time | ||
+ | |||
+ | <code> | ||
+ | # Execute the following commands as root | ||
+ | |||
+ | du -sh /var/cache/yum | ||
+ | yum clean all | ||
+ | du -sh /var/cache/yum | ||
+ | yum update | ||
+ | du -sh /var/cache/yum | ||
+ | </code> | ||
+ | |||
+ | Recent machines (Fedora Core 22 and later) may use ''dnf'' instead of //yum//, and PackageKit. Use the following commands for cleaning the cache: | ||
+ | * **dnf** (/var/cache/dnf): ''dnf clean all'' | ||
+ | * **PackageKit** (/var/cache/PackageKit): ''pkcon refresh force'' | ||
+ | |||
+ | It's also a good thing to clean the //journal// (note: limiting the journal size probably has to be done only once) | ||
+ | |||
+ | <code># Execute the following commands as root | ||
+ | |||
+ | du -sh /var/log/journal | ||
+ | journalctl --disk-usage | ||
+ | |||
+ | # Edit the /etc/systemd/journald.conf file and add the following option | ||
+ | # SystemMaxUse=50M | ||
+ | # Then use the following command to restart the service and remove old journal entries | ||
+ | |||
+ | systemctl restart systemd-journald.service | ||
+ | </code> | ||
+ | |||
+ | Note: **abrt** ([[http://abrt.readthedocs.io/en/latest/|Automated Bug Reporting Tool]]) may also leave some big directories in several places on the system (/var/cache/abrt, /var/spool/abrt-upload, /var/tmp/abrt, ...). The content of /var/tmp/abrt can be cleaned by deleting the reports in ''gnome-abrt''... | ||
+ | |||
+ | ==== Updating the Linux guest additions ==== | ||
The guest additions are extensions of the guest system that will allow a better integration of the guest and the host: | The guest additions are extensions of the guest system that will allow a better integration of the guest and the host: | ||
Line 38: | Line 107: | ||
* //many other subtle things...// | * //many other subtle things...// | ||
- | You have to update the guest additions when you update the Linux guest or you update the VB program running on the host | + | You should update the guest additions: |
+ | * after updating the **Linux guest kernel** (no need to update the guest additions after non kernel updates) | ||
+ | * after updating the **main VirtualBox program** running on the host | ||
- | * In the VB window (the one where the guest is running), select //Devices->Insert Guest Additions CD Image...//. | + | Guest additions updating steps: |
+ | * If you have just updated the Linux kernel (when doing a Linux update), make sure you reboot the Linux guest before you reinstall the guest additions, so that the new kernel is running when you install the guest additions! | ||
+ | * In the VB window (the one where the guest is running), select //Devices->Insert Guest Additions CD Image...//. A //virtual// CD icon should appear on the desktop of the Linux guest | ||
* Click on //Force unmount// in the popup Window, if a previous virtual CD is still present | * Click on //Force unmount// in the popup Window, if a previous virtual CD is still present | ||
+ | * Right-click on the CD icon and choose //Mount Volume// | ||
* Click on //Cancel// if you get a popup window displaying //This medium contains software intended to be automatically started. Would you like to run it?// | * Click on //Cancel// if you get a popup window displaying //This medium contains software intended to be automatically started. Would you like to run it?// | ||
- | * Become root in a window: **sudo su -** | + | * Become root in a window: ''sudo su -'' |
- | * Check where the CD image has been installed: **df -h**\\ The CD should be available in ///run/media/your_login/VBOXADDITIONS_NNNN// | + | * Check where the CD image has been installed: ''df -h'' |
- | * Go to the additions' directory: **cd /run/media/your_login/VBOXADDITIONS_NNNN** | + | * The CD should be available in ''/run/media/your_login/VBOXADDITIONS_vvvv_NNNN'' |
- | * Run the installation script: **./VBoxLinuxAdditions.run** | + | * If the CD icon has appeared on the Linux desktop, but you don't see any subdirectory in ''/run/media'', right-click on the CD icon and select //Mount volume// |
- | * Reboot: **shutdown -r now** | + | * Go to the additions' directory: ''cd /run/media/your_login/VBOXADDITIONS_vvvv_NNNN'' |
- | * Virtually eject the CD image by selecting in the VB window, //Device->CD/DVD Devices->Remove disk from virtual drive// | + | * Run the installation script: ''./VBoxLinuxAdditions.run'' |
+ | * Reboot: ''shutdown -r now'' | ||
+ | * Log in | ||
+ | * Virtually eject the CD image by selecting in the VB window, //Device->Optical Drives->Remove disk from virtual drive// | ||
* Note: click in //Force unmount// in the popup Window, if necessary | * Note: click in //Force unmount// in the popup Window, if necessary | ||
+ | * The //virtual// CD icon should disappear from the desktop of the Linux guest | ||
* **After rebooting**, if you get a smaller VB window and you get a notification telling you that the graphics are running in software rendering mode (and that was not already the case before updating), and when you open a terminal and move the window around, the window is moving more slowly than before, see the note below to check if the guest additions are running or not | * **After rebooting**, if you get a smaller VB window and you get a notification telling you that the graphics are running in software rendering mode (and that was not already the case before updating), and when you open a terminal and move the window around, the window is moving more slowly than before, see the note below to check if the guest additions are running or not | ||
Note: you can check the status or force the re-installation of the guest additions with | Note: you can check the status or force the re-installation of the guest additions with | ||
- | * Status (running or not): **/etc/init.d/vboxadd status** | + | * Status (running or not): ''/etc/init.d/vboxadd status'' |
- | * Starting manually the //guest additions service//: **/etc/init.d/vboxadd start**\\ Use the //setup// line below to reinstall the guest additions if you get an error message when trying the //start// command | + | * Starting manually the //guest additions service//: ''/etc/init.d/vboxadd start''\\ Use the //setup// line below to reinstall the guest additions if you get an error message when trying the //start// command |
- | * Install: **/etc/init.d/vboxadd setup** | + | * Install: ''/etc/init.d/vboxadd setup'' |
+ | |||
+ | ==== The Linux guest and the host graphics card ==== | ||
- | Note: if you want some details about how the graphics are handled by the current installation of you VB (i.e. **is your VM using the graphics card of the Windows host** or is it running is it use the sloooow software mode?), you can use the following commands | + | If you want some details about how the graphics are handled by the current installation of you VB (i.e. **is your VM using the graphics card of the Windows host** or is it running is it use the sloooow software mode?), you can use the following commands |
- | * **glxgears**: if things work correctly, you will get a window with smoothly rotating gears (you can make the window fullscreen and check that it is still working) and the terminal will display some frames per second statistics | + | * ''modinfo vboxvideo'' will give you some information about the video driver provided by VB. Theoretically, //vboxvideo// should also appear when you type ''lsmod'' |
+ | * ''glxgears'': if things work correctly, you will get a window with smoothly rotating gears (you can make the window fullscreen and check that it is still working) and the terminal will display some frames per second statistics | ||
* You may get some warning and error messages, but you should be good if the gears are rotating smoothly | * You may get some warning and error messages, but you should be good if the gears are rotating smoothly | ||
- | * You can run the //glxinfo// command and you should see a reference to your graphics card if the video is indeed using it\\ **glxinfo | \grep -i opengl**\\ OpenGL vendor string: Humper\\ OpenGL renderer string: Chromium \\ OpenGL version string: 2.1 Chromium 1.9\\ **NVIDIA card =>** OpenGL shading language version string: 4.40 **NVIDIA** via Cg compiler\\ **Intel HD Graphics xxxx card =>** OpenGL shading language version string: 4.00 - **Build 10.18.10.3993**\\ OpenGL extensions: | + | * You can run the //glxinfo// command and you should see a reference to your graphics card if the video is indeed using it\\ ''glxinfo | \grep -i opengl''\\ OpenGL vendor string: Humper\\ OpenGL renderer string: Chromium \\ OpenGL version string: 2.1 Chromium 1.9\\ **NVIDIA card =>** OpenGL shading language version string: 4.40 **NVIDIA** via Cg compiler\\ **Intel HD Graphics xxxx card =>** OpenGL shading language version string: 4.00 - **Build 10.18.10.3993**\\ OpenGL extensions: |
- | * You can get some additional information (including the screen resolution) with the //xdpyinfo//\\ **xdpyinfo | less** | + | * You can get some additional information (including the screen resolution) with the //xdpyinfo//\\ ''xdpyinfo | less'' |
- | ==== In case of weird graphics problems... ==== | + | === In case of weird graphics problems... === |
There seems to be some problems linked to some combination of: | There seems to be some problems linked to some combination of: |