- VirtualBox
- Содержание
- Enabling Virtualisation
- Install VirtualBox
- Install the Extension Pack(Optional)
- Install extensionpack using AUR
- Get extensionpack from VirtualBox
- Adding Your Account to the vboxusers User Group
- Selecting a Display Controller
- Troubleshooting guest
- Guest Configuration
- Guest Installation
- Guest Additions
- Guest Display
- Guest Internet Connection
- Как установить VirtualBox на Manjaro 20
- Как установить VirtualBox на Manjaro 20
- Установка VirtualBox на Manjaro 20 Nibia
- Шаг 1. Перед тем, как запустить руководство, приведенное ниже, убедитесь, что наша система обновлена:
- Шаг 2. Установка VirtualBox на Manjaro 20.
- Шаг 3. Запуск VirtualBox.
- VirtualBox/Install Arch Linux as a guest
- Contents
- Installation in EFI mode (optional)
- Installation in EFI mode on VirtualBox
- Install the Guest Additions
- Set optimal framebuffer resolution
- Load the VirtualBox kernel modules
- Launch the VirtualBox guest services
- Auto-resize Guest Display
- Hardware acceleration
- Enable shared folders
- Manual mounting
- Automounting
- Mount at boot
- Troubleshooting
- Access serial port from guest
- Guest freezes after starting Xorg
- Fullscreen mode shows blank screen
- Linux guests have slow/distorted audio
- Linux guests have slow/laggy audio
- Arch: pacstrap script fails
- Windows host: VERR_ACCESS_DENIED
- No hardware 3D acceleration in Arch Linux guest
VirtualBox
Содержание
Developed by Sun Microsystems, now Oracle Corporation, VirtualBox is a popular application that allows for other operating systems (known as Guests) to be installed and run within an existing operating system (known as the Host). This is undertaken through the process of virtualisation, whereby virtual versions of your computer (also referred to as virtual machines or VMs) are created within and draw resources directly from the host system. As such, how fast or powerful a virtual machine may be will depend entirely on the resources available — and allocated — for it to use. The benefits of virtualisation include:
- The fast and easy installation of other operating systems without affecting your existing system (e.g. no need for dual booting and/or preparation in the form of hard disk partitioning or re-sizing)
- Completely safe learning and experimentation with operating systems, as nothing that occurs within a Guest will affect the Host (e.g. the Host operating system can also be installed as a Guest in a virtual machine as a risk-free means of trying out new things), and
- An almost unlimited capacity to install as many additional operating systems as desired. provided space is available on your hard drive to store them!
Enabling Virtualisation
Before installing VirtualBox, it is important to first ensure that virtualization has been enabled in your BIOS. The exact instructions for doing this vary based on your hardware. Please review the manual provided by your computer or motherboard manufacturer for specific instructions.
Install VirtualBox
To install VirtualBox, you need to install the packages virtualbox and linux*-virtualbox-host-modules . The latter must match the version of the kernel you are running. To list what kernels is installed use mhwd (example)
To install VirtualBox and the kernel modules for your installed kernel enter the following command in the terminal:
Once the installation has completed, it will then be necessary to add the VirtualBox Module to your kernel. The easy way is to simply reboot your system. Otherwise, to start using VirtualBox immediately, enter the following command:
Install the Extension Pack(Optional)
The extension pack is a proprietary set of extensions providing extra functionality to VirtualBox like USB2 and USB3 passthrough. You only need this if you are going to use the functionality provided and it is not required for VirtualBox to function.
- Oracle Cloud Infrastructure integration
- USB 2.0 and USB 3.0 Host Controller
- Host Webcam
- VirtualBox RDP
- PXE ROM
- Disk Encryption
- NVMe
Check your VirtualBox version (example)
Install extensionpack using AUR
Locate the correct AUR PKGBUILD using pamac (or the AUR helper of choice) — example is using pamac
When you have found the match you can install using the helper — example is using pamac
Get extensionpack from VirtualBox
Same rule apply — match your VirtualBox version — usually the latest version applies.
If the latest version do not match yours — you can find earlier versions using this page
The extension .vbox-extpack is a registered mime extension so just open the file and VirtualBox will install the extension pack. Provide your password when asked.
Adding Your Account to the vboxusers User Group
The final step is to now add your personal user account to the vboxusers group. This is necessary in order to fully access the features provided by VirtualBox. The $USER variable translates to the currently logged in user and you must logout or restart for the change to take effect.
For those intending to use Manjaro under VirtualBox, you can install Manjaro as usual. Please observe below point of setting the correct display type.
Selecting a Display Controller
Before installation of Manjaro ensure the correct display settings for VM. The Manjaro recommendation — to ensure the best experience — is contradicting the recommendations from VirtualBox developers. To have the VM screensize adapting to the window size — you need enable VBoxSVGA but doing so you cannot enable 3D. To use 3D you need to use VMSVGA which will force you to set the VM screen size inside the VM. If you use the VMSVGA adapter — mhwd will keep telling you to switch — you can do it but you will not be able to utilize 3D graphics.
Troubleshooting guest
If you deem it necessary to ensure the packages are installed please follow this recipe
Guest Configuration
You will need to load the modules if you don’t want to reboot:
The guest utils than need to be started and enabled:
Add you VM user to the vboxsf group (this requires you to logout to apply the new group)
Create media folder in root directory if it does not already exist
Assign the correct permissions to the media folder to be able to access shared folders
Advice on using Virtualbox effectively, as well as some tips and tricks learned along the way, have been provided for the benefit of new users.
Guest Installation
- Virtualbox can run installation files (ISOs) directly as virtual discs, so there is no need to burn them to an installation medium such as a disc or USB data stick.
- The process to install any Guest operating system, including Manjaro, is exactly the same as if actually installing for real on your computer.
Guest Additions
Guest Additions are special software packages designed to improve the performance and usability of guest operating systems.
They are installed within the Guest operating system itself, and most notably result in enhancing the display resolution, as well as enabling much better control over the mouse. As such, two tell-tale signs that Guest Additions have not been installed in a Guest are that the display will not scale to the size of the display window (i.e. it will be necessary to scroll around to see the whole screen), and the mouse may be quite hard to control.
Instructions for installing the guest additions in Manjaro are provided above. For other operating systems please review the VirtualBox instructions linked below
Guest Display
If you are using other guests e.g. Ubuntu, Linux Mint and others be sure to use the default VMSVGA display driver.
It will be necessary to activate the Enable 3D acceleration box in order to allow for some desktop effects (such as transparency) to be shown. This can be undertaken by going into the settings menu, and then selecting the Display section.
If you are getting screen distortion or transparent dialogs using Windows guest — shutdown the VM and change the graphics settings of the VM. Remove the checkbox for Enable 3D acceleration.
Guest Internet Connection
Some users have encountered problems when attempting to connect their virtual machine to the internet using the default VirtualBox settings. Where this is the case, try the following solution
Источник
Как установить VirtualBox на Manjaro 20
Как установить VirtualBox на Manjaro 20
В этом руководстве мы покажем вам, как установить VirtualBox на Manjaro 20. Для тех из вас, кто не знал, VirtualBox — это кроссплатформенное программное обеспечение виртуализации с открытым исходным кодом для архитектуры x86, и это программное обеспечение позволяет создавать и запускать гостевые операционные системы. системы («виртуальные машины»), такие как Linux и Windows, поверх операционной системы хоста.
В этой статье предполагается, что у вас есть хотя бы базовые знания Linux, вы знаете, как использовать оболочку, и, что наиболее важно, вы размещаете свой сайт на собственном VPS. Установка довольно проста и предполагает, что вы работаете с учетной записью root, в противном случае вам может потребоваться добавить ‘ sudo ‘ к командам для получения привилегий root. Я покажу вам пошаговую установку VirtualBox на Manjaro 20 ( Nibia ).
Установка VirtualBox на Manjaro 20 Nibia
Шаг 1. Перед тем, как запустить руководство, приведенное ниже, убедитесь, что наша система обновлена:
Шаг 2. Установка VirtualBox на Manjaro 20.
Теперь мы запускаем следующую команду для установки пакетов VirtualBox и хост-модуля VirtualBox:
После успешной установки хост-модуля VirtualBox и VirtualBox введите следующую команду, чтобы добавить модуль VirtualBox в ядро:
Затем мы добавляем учетную запись пользователя в группу пользователей VirtualBox для доступа ко всем функциям, предоставляемым VirtualBox. Обязательно укажите свое имя пользователя вместо username поля.
Шаг 3. Запуск VirtualBox.
Запустите VirtualBox. Если у вас нет значка на рабочем столе, панели или в меню приложения MX Linux в разделе «Стандартные», откройте окно терминала и запустите окно Oracle VM VirtualBox Manager. Используйте команду ниже:
Поздравляю! Вы успешно установили VirtualBox . Благодарим за использование этого руководства для установки последней версии Oracle VirtualBox в системе Manjaro. Для получения дополнительной помощи или полезной информации мы рекомендуем вам посетить официальный сайт VirtualBox .
Источник
VirtualBox/Install Arch Linux as a guest
This article is about installing Arch Linux in VirtualBox.
Boot the Arch installation media through one of the virtual machine’s virtual drives. Then, complete the installation of a basic Arch system as explained in the Installation guide.
Contents
Installation in EFI mode (optional)
Enabling EFI for Arch as guest is optional. If you want to install Arch Linux in EFI mode inside VirtualBox, you must change the firmware mode for the virtual machine. This must be done before installing Arch as guest, changing the option afterwards will result in unbootable machine unless the setting is reverted.
To enable EFI for a virtual machine using the graphical interface, open the settings of the virtual machine, choose System item from the panel on the left and Motherboard tab from the right panel, and check the checkbox Enable EFI (special OSes only).
Alternatively the same can be accomplished from the command line using VBoxManage:
efi will set the firmware for the virtual machine to EFI with the bitness matching the virtual machine’s CPU. To get a specific EFI bitness, set the firmware to efi64 for x86_64 EFI or efi32 for IA32 EFI.
After selecting the kernel from the Arch Linux installation media’s menu, the media will hang for a minute or two and will continue to boot the kernel normally afterwards. Be patient.
Starting with VirtualBox 6.1 the issue of forgetting NVRAM contents on shutdown is fixed. Proceed with the installation just as on a regular UEFI system.
Installation in EFI mode on VirtualBox
Once the system and the boot loader are installed, VirtualBox will first attempt to run /EFI/BOOT/BOOTX64.EFI from the ESP. If that first option fails, VirtualBox will then try the EFI shell script startup.nsh from the root of the ESP. This means that in order to boot the system you have the following options:
- Launch the bootloader manually from the EFI shell every time;
- Move the bootloader to the default /EFI/BOOT/BOOTX64.EFI path;
- Create a script named startup.nsh at the ESP root containing the path to the boot loader application, e.g. \EFI\grub\grubx64.efi .
- Boot directly from the ESP partition using a startup.nsh script.
Do not bother with the VirtualBox Boot Manager (accessible with F2 at boot), as it is buggy and incomplete. It does not store efivars set interactively. Therefore, EFI entries added to it manually in the firmware (accessed with F12 at boot time) or with efibootmgr will persist after a reboot but are lost when the VM is shut down.
Install the Guest Additions
VirtualBox Guest Additions provides drivers and applications that optimize the guest operating system including improved image resolution and better control of the mouse. Within the installed guest system, install:
- virtualbox-guest-utils for VirtualBox Guest utilities with X support
- virtualbox-guest-utils-nox for VirtualBox Guest utilities without X support
The guest additions running on your guest, and the VirtualBox application running on your host must have matching versions, otherwise the guest additions (like shared clipboard) may stop working. If you upgrade your guest (e.g. pacman -Syu ), make sure your VirtualBox application on this host is also the latest version. «Check for updates» in the VirtualBox GUI is sometimes not sufficient; check the VirtualBox.org website.
Set optimal framebuffer resolution
This article or section is a candidate for merging with VirtualBox/Tips and tricks#Set guest starting resolution.
Typically after installing Guest Additions, a fullscreen Arch guest running X will be set to the optimal resolution for your display; however, the virtual console’s framebuffer will be set to a standard, often smaller, resolution detected from VirtualBox’s custom VESA driver.
To use the virtual consoles at optimal resolution, Arch needs to recognize that resolution as valid, which in turn requires VirtualBox to pass this information along to the guest OS.
First, check if your desired resolution is not already recognized by running the command ( hwinfo need to be installed):
If the optimal resolution does not show up, then you will need to run the VBoxManage tool on the host machine and add «extra resolutions» to your virtual machine (on a Windows host, go to the VirtualBox installation directory to find VBoxManage.exe ). For example:
The parameters «Arch Linux» and «1360x768x24» in the example above should be replaced with your VM name and the desired framebuffer resolution. Incidentally, this command allows for defining up to 16 extra resolutions («CustomVideoMode1» through «CustomVideoMode16»).
Afterwards, restart the virtual machine and run hwinfo —framebuffer once more to verify that the new resolutions have been recognized by your guest system (which does not guarantee they will all work, depending on your hardware limitations).
Finally, add a video=resolution kernel parameter to set the framebuffer to the new resolution, for example:
Additionally you may want to configure your bootloader to use the same resolution. If you use GRUB, see GRUB/Tips and tricks#Setting the framebuffer resolution.
Load the VirtualBox kernel modules
To load the modules automatically, enable vboxservice.service which loads the modules and synchronizes the guest’s system time with the host.
To load the modules manually, type:
Launch the VirtualBox guest services
After the rather big installation step dealing with VirtualBox kernel modules, now you need to start the guest services. The guest services are actually just a binary executable called VBoxClient which will interact with your X Window System. VBoxClient manages the following features:
- shared clipboard and drag and drop between the host and the guest;
- seamless window mode;
- the guest display is automatically resized according to the size of the guest window;
- checking the VirtualBox host version
All of these features can be enabled independently with their dedicated flags:
Notice that VBoxClient can only be called with one flag at a time, each call spawning a dedicated service process. As a shortcut, the VBoxClient-all bash script enables all of these features.
virtualbox-guest-utils installs /etc/xdg/autostart/vboxclient.desktop that launches VBoxClient-all on logon. If your desktop environment or window manager does not support XDG Autostart, you will need to set up autostarting yourself, see Autostarting#On desktop environment startup and Autostarting#On window manager startup for more details.
VirtualBox can also synchronize the time between the host and the guest, to do this, start/enable the vboxservice.service .
Now, you should have a working Arch Linux guest. Note that features like clipboard sharing are disabled by default in VirtualBox, and you will need to turn them on in the per-VM settings if you actually want to use them (e.g. Settings > General > Advanced > Shared Clipboard).
Auto-resize Guest Display
This option will automatically change the resolution of the Arch guest, whenever the window of the virtual machine is resized. This option is enabled by default, and in graphical interface is located at View -> Auto-resize Guest Display. When using KDE Plasma, on GUI login screen (Session) select Plasma (X11) instead of the default session Plasma (Wayland), which does not work with auto-resize.
Hardware acceleration
Hardware acceleration can be activated in the VirtualBox options. The GDM display manager 3.16+ is known to break hardware acceleration support. [1] So if you get issues with hardware acceleration, try out another display manager (lightdm seems to work fine). [2] [3]
If the hardware acceleration does not work as expected, try changing the Graphics Controller option found under the Screen tab in the Display options of the settings GUI. It seems that depending on the host GPU type, not all emulated controllers work equally well.
Enable shared folders
Shared folders are managed on the host, in the settings of the Virtual Machine accessible via the GUI of VirtualBox, in the Shared Folders tab. There, Folder Path, the name of the mount point identified by Folder name, and options like Read-only, Auto-mount and Make permanent can be specified. These parameters can be defined with the VBoxManage command line utility. See there for more details.
No matter which method you will use to mount your folder, all methods require some steps first.
To avoid this issue /sbin/mount.vboxsf: mounting failed with the error: No such device , make sure the vboxsf kernel module is properly loaded. It should be, since we enabled all guest kernel modules previously.
Two additional steps are needed in order for the mount point to be accessible from users other than root:
- the virtualbox-guest-utils package created a group vboxsf (done in a previous step);
- your user must be in vboxsf user group.
Manual mounting
Use the following command to mount your folder in your Arch Linux guest:
where shared_folder_name is the Folder name assigned by the hypervisor when the share was created.
If the user is not in the vboxsf group, to give them access to our mountpoint we can specify the mount(8) options uid= and gid= with the corresponding values of the user. These values can obtained from the id command run against this user. For example:
Automounting
In order for the automounting feature to work you must have checked the auto-mount checkbox in the GUI or used the optional —automount argument with the command VBoxManage sharedfolder .
The shared folder should now appear as /media/sf_shared_folder_name . If users cannot access the shared folders, check that /media has permissions 755 or is owned by the vboxsf group if using permissions 750 . This is currently not the default if the /media directory is created by vboxservice.service .
You can use symlinks if you want to have a more convenient access and avoid to browse in that directory, e.g.:
Mount at boot
You can mount your directory with fstab. However, to prevent startup problems with systemd, noauto,x-systemd.automount should be added to /etc/fstab . This way, the shared folders are mounted only when those mount points are accessed and not during startup. This can avoid some problems, especially if the guest additions are not loaded yet when systemd reads fstab and mounts the partitions.
- sharedFolderName : the value from the VirtualMachine’s Settings > SharedFolders > Edit > FolderName menu. This value can be different from the name of the real folder name on the host machine. To see the VirtualMachine’s Settings go to the host OS VirtualBox application, select the corresponding virtual machine and click on Settings.
- /path/to/mntPtOnGuestMachine : if not existing, this directory should be created manually (for example by using mkdir).
- dmode / fmode are directory/file permissions for directories/files inside /path/to/mntPtOnGuestMachine .
As of 2012-08-02, mount.vboxsf does not support the nofail option:
Troubleshooting
Access serial port from guest
Guest freezes after starting Xorg
Faulty or missing drivers may cause the guest to freeze after starting Xorg, see for example [4] and [5]. Try disabling 3D acceleration in Settings > Display, and check if all Xorg drivers are installed.
Fullscreen mode shows blank screen
On some window managers (i3, awesome), VirtualBox has issues with fullscreen mode properly due to the overlay bar. To work around this issue, disable Show in Full-screen/Seamless option in Guest Settings > User Interface > Mini ToolBar. See the upstream bug report for more information.
If the guest’s screen goes black above a certain size (e.g. above 2048 pixels wide), increasing the Settings > Display > Screen > Video Memory can help.
Linux guests have slow/distorted audio
The AC97 audio driver within the Linux kernel occasionally guesses the wrong clock settings when running inside VirtualBox, leading to audio that is either too slow or too fast. To fix this, create a file in /etc/modprobe.d/ with the following line:
Linux guests have slow/laggy audio
In some cases, audio can have laggy performance (for example lag behind video when streaming video online). A possible workaround can be to use the Intel HD Audio controller in VirtualBox and disable its power saving by adding the following line in a file in /etc/modprobe.d/ in the guest OS:
Arch: pacstrap script fails
If you used pacstrap in this article to also #Install the Guest Additions before performing a first boot into the new guest, you will need to umount -l /mnt/dev as root before using pacstrap again; a failure to do this will render it unusable.
Windows host: VERR_ACCESS_DENIED
To access the raw VMDK image on a Windows host, run the VirtualBox GUI as administrator.
No hardware 3D acceleration in Arch Linux guest
virtualbox-guest-utils package as of version 5.2.16-2 does not contain the file VBoxEGL.so . This causes the Arch Linux guest to not have proper 3D acceleration. See FS#49752.
To deal with this problem, apply the patch set at FS#49752#comment152254. Some fix to the patch set is required to make it work for version 5.2.16-2.
Источник