appwiki:virtualmachine

Differences

This shows you the differences between two versions of the page.


Previous revision
appwiki:virtualmachine [2022/09/19 15:58] (current) – [FAQ - Problem and Solution] ying
Line 1: Line 1:
 +====== Linux in VirtualBox Experience Report ======
  
 +  * Ubuntu 16 and 17 with guest tool installed:
 +    * in Gnome desktop environment, works ok, but once full screen folder or firefox window, it freeze and lag like hell
 +    * in Kubuntu 17 (KDE interface),  laggy and no window show, just the taskbar and corner button showing, look like windows 10
 +    * in Ubuntu-MATE desktop environment, beautiful and smooth, not more max window freeze bug.
 +  * centos 7 in Mate or Gnome with guest tool installed:
 +    * perfectly good once guest tool settle, window is smooth and fast with Mate compared to ubuntu.
 +  * Note, even after install vbox guest addition, screen size adjust may not work properly and display may not detect VBX as display. As each different release at a time may use different Xorg version, if your virtualbox is not updated, its vboxaddition tools may not have latest vboxvideo driver for it, so either update your virtualbox to latest or use older release that works with the vboxvideo driver.
 +    * to check Xorg server version, use this cmd, if vboxvideo_drv.so load fail, it may not support high resolution size or screen size adjustment <code bash>view /var/log/Xorg.0.log</code>
 +    * to check vboxaddition tool supported Xorg version, check the folder, example Xorg 1.17 matchs vboxvideo_drv_117.so <code bash>cd /usr/lib64/VBoxGuestAdditions/;ls</code>
 +
 +**Default firefox freeze CentOS or Ubuntu in virtualbox**
 +
 +  * Make sure manually download latest official firefox, and don't use the old firefox comes within OS.
 +  * launch the latest download firefox within unzipped folder in terminal <code>./firefox</code>
 +====== Solutions ======
 +
 +===== Portable Virtual Box =====
 +
 +  * portable virtual box: https://www.youtube.com/watch?v=FKpM41w-S88
 +
 +===== VM server or Remote Display setup =====
 +
 +  * VirtualBox support Remote Display, which the VM is running in one machine and Screen Control is on another machine,
 +    * steps:
 +      - install virtualbox extension package for your version of virtualbox, ref: https://www.youtube.com/watch?v=KHkE2PoWJnE
 +      - enable remote display on your VM instance, ref: https://www.youtube.com/watch?v=nkrYsIC_06U
 +      - start in headless mode to stop refresh on both client and remote side: https://www.youtube.com/watch?v=xxTbuJaAmIE
 +    * on another computer, use Remote Desktop application such as windows built-in remote desktop or putty ssh to connect the IP:RemoteDisplayPort as how it see that VM server.
 +      - make sure in display tab, preset the resolution before connection
 +
 +===== Shared Folder mount on Windows guest OS=====
 +
 +  * create shared folder
 +    * choost host path
 +    * mount name
 +    * Mount point: (E:) for E drive
 +
 +
 +
 +===== Guest Addition and Share Folder Working Guide of Ubuntu VM on Win7 =====
 +
 +  * Problem Description:
 +    * the Device menu > install guest addition tool on Ubuntu VM just not work for me
 +    * Shared Folder not show up after adding (auto-mount) in VirtualBox
 +  
 +  * current setting for the VM for smooth graphic and action
 +    * 2GB for ram, 2 Core, 128 VRAM w 3D acceleration, shared folder with auto mount
 +
 +  * Solution Guide: 
 +    - Update Ubuntu OS first just to be safe
 +      * type update from App search, and click software updater to update itself and install updates
 +      * restart
 +    - Install virtualbox guest addition from Ubuntu's all-in-one software online center, apt-get
 +      * Since install from CDROM most likely not working (vboxadd error) and that CDROM is designed for generic linux
 +      * open terminal app, and admin mode on <code bash>sudo bash</code>
 +      * update apt-get index info and install virtualbox service and interaction with host one-by-one-with-Yes<code bash>
 +apt-get install virtualbox-guest-dkms
 +apt-get install virtualbox-guest-x11
 +</code>
 +    - restart
 +    - now check guest os and guest tool running process with "vbox" name <code bash>
 +hostnamectl
 +ps -ef | grep -i vbox
 +</code>
 +    - we now can copy-paste from host and vm, go VM Device menu > Copy Paste Enable (note, drag and drop not work for me)
 +    - If shared folder you setup in VM not show up, check virtualbox service is active or not <code bash>systemctl status virtualbox-guest-utils.serivce</code>
 +    - if it shows "Loaded and Inactive", we active service by command <code bash>
 +sudo service virtualbox-guest-utils start
 +</code>
 +    - Now, we check service status again, and it should show "Loaded, Active" <code bash>systemctl status virtualbox-guest-utils.serivce</code>
 +    - Shared Folder should show up on Desktop and /Media/sf_sharedName
 +    - But, you may notice lock icon on all existing files in shared folder, due to your current user name in Ubuntu not in edit group of share folder,  let us add you to in the permission list with command
 +      - check your user name <code bash>whoami</code>
 +      - check your user name in which group <code bash>groups YourName</code>
 +      - add your user in vboxsf group for editing share folder <code bash>sudo usermod -G vboxsf -a YourName</code>
 +    - restart
 +    - Now, you should see shared folder on your desktop and you can edit its content
 +      - if still not show up, open terminal and active that virtualbox service again. <code bash>sudo service virtualbox-guest-utils start</code>
 +    - Install MATE ubuntu desktop environment (choose lightdm as switcher option on cmd window) and switch to it to avoid Gnome freeze when maximize window <code bash>sudo apt install -y ubuntu-mate-desktop</code>
 +ref:
 +  * install ubtunu 17.04 and Guest Addition from apt-get and check running
 +    * https://www.youtube.com/watch?v=Y9CA7xxJeeE
 +  * share folder permission setup with user and vboxsf group
 +    * https://www.youtube.com/watch?v=YxL414FRccQ
 +  * ideal case of install guest addition from CDROM, not working for me
 +    * https://www.youtube.com/watch?v=9xxTH40G7Ss
 +
 +===== Guest Addition and Share Folder Working Guide of CentOS7 VM on Win7 =====
 +
 +  * Solution Guide: 
 +    - I tried official guide, and it works perfectly, including share folder
 +      - admin mode <code bash>sudo -i</code>
 +      - install dkms <code bash>yum install dkms</code>
 +        - if above not working, try add this repo and try again <code bash>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm</code>
 +      - install kernel source and develop tool for guest tool compile use <code bash>yum groupinstall "Development Tools"
 +yum install kernel-devel</code> 
 +      - load the guest CD and let it auto, it will pop admin pass, and install as normal, perfectly ok. Mouse move flow works, windows resize works, shared folder auto load after restart.
 +      - add user to share folder permission group.
 +      - check your user name <code bash>whoami</code>
 +      - check your user name in which group <code bash>groups YourName</code>
 +      - add your user in vboxsf group for editing share folder <code bash>sudo usermod -G vboxsf -a YourName</code>
 +      - restart and you can do anything with the folder now
 +    - Install MATE desktop environment to avoid UI freeze during UI maximize operation
 +      - code <code bash>
 +sudo yum install epel-release
 +sudo yum groupinstall "MATE Desktop"
 +</code>
 +      - choose lightdm as switcher option on cmd window
 +      - switch at login \\ {{:appwiki:virtualmachine:centos_login_desktop.png?400|}}
 +
 +  * ref: 
 +    * https://wiki.centos.org/HowTos/Virtualization/VirtualBox/CentOSguest
 +    * https://www.youtube.com/watch?v=IIKmTSuP15M
 +    * (not work for my centos7, stuck with build path not there) 
 +      * https://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/
 +
 +===== CentOS as Host =====
 +
 +  * follow guide: https://wiki.centos.org/HowTos/Virtualization/VirtualBox
 +
 +===== Network communication between Host and VM =====
 +
 +**Intro on inter-network between host and VM**
 +  * as you can see in the OS X VM access Host method, VM can call Host with the host default IP of 10.0.2.2 in VM's network
 +  * to make Host to call VM, 
 +
 +====== Why Virtual Machine ======
 +
 +  * Check this video on "Why": http://www.youtube.com/user/lockergnome#p/u/12/pRBA8ZdDlRo
 +
 +
 +====== Tech guide list on Virtualization ======
 +
 +  * [[http://www.sysprobs.com/|SysProbs]]: a tip and guide site about virtualization tools
 +
 +
 +====== FAQ - Problem and Solution ======
 +
 +  * clone a virtual VDI drive to another copy with different disk id <code>vboxmanage clonevdi {sourcevdi} {destinationvdi}</code>
 +  * Guest Machine: Mac OS X, access window host share folder. ([[http://www.sysprobs.com/mac-os-guest-virtualbox-326-snow-leopard-1064-windows-7-32-bit|ref]])
 +    * for mac guest, no need VirtualBox way setup, just make a shared folder in Windows in the normal Windows network share method (right click, and choose share enable and permission)
 +    * in Mac Finder, Cmd + K to go to (by default) <code>smb://192.168.56.1/</code>
 +    * then type user and pass, it should go (thus your acc needs a pass)
 +    * In case it failed, go Windows > Network, make sure the VirtualBox virtual-host-network icon is enabled.
 +    * detail on os x on pc page [[techwiki:osx_pc#os_x_on_pc]]
 +
 +  * Problem: 64bit OS option not shown in virtualbox create option
 +    * solution: you need to enable virtualization support for your AMD or Intel CPU in motherboard bootup bios setting page
 +    * example: 
 +      - in MSI motherboard, boot with Del key hold, PC will go to bios page.
 +      - for intel CPU: you need to enable VT-x and VT-d feature in bios setting
 +      - for AMD CPU: you need to enable AMD SVM-secure vm feature 
 +        - (in MSI motherboard case) : go Overclocking page: OC Explore mode = Expert, scroll down to Advance CPU feature, SVM mode = enable, go normal page, save and exit