I can't turn Ubuntu 16.04 in fullscreen mode using VirtualBox 6.0.4 - virtual-machine

I've installed "Seed Ubuntu 16.04 32bit" on VirtualBox and the VirtualBox Guest Additions 6.0.4 but i cant view the machine in fullscreen mode. What can i do?
My main system is Win10 build 18362

Right click on desktop and go to "display settings". There set Resolution to 1920:1200 (16:10). Click on Apply. Then a popup will appear, click keep configurations.

enter in ubunto config -> divice -> and change the resolution

Related

How to add XAMPP to my desktop in Ubuntu 20.04?

I just installed XAMPP on my Ubuntu O.S but I want to add a GUI icon to my desktop? I followed an old post which generated the GUI but it doesn't launch when I click it. Can anyone provide a detailed step for Ubuntu 20.04?

virt-manager guest resize not working

Installed virt-manager,
target virtual machine is debian jessie with spice-vdagent installed
shared clipboard, and latency-free mouse input works
Display: Spice
Video: QXL
Channel spice: spicevmc, virtio, com.redhat.spice.0 (confirmed /dev devices exist in target vm)
Make sure guest resizing is enabled in virt-manager:
Menu View -> Scale Display ->
Auto resize VM with window (Checked)
Make sure your have a spice agent on your guest (the virtual machine)
https://www.spice-space.org/download.html#guest
'spice-vdagent' on linux
'spice-guest-tools' on windows
How I figured this out,
I found a setting in "spicy" that I assumed had an equivalent in virt-maanger. To connect with spicy from spice-client-gtk apt package, I found the port to connect to by checking sudo ss -nlp | grep qemu, and connected to that port on localhost. Spicy's toggle was much easier to find: Options -> Resize guest to match window size (Checked).
For XFCE, this is a known bug which does not appear to have been fixed yet (confirmed still broken in Xubuntu 20.04).
This issue is due to a change in spice-vdagent whereby instead of changing the resolution directly, it instead notifies the DE to make the change, and that functionality has not been implemented yet in XFCE.
One workaround is to run the following in the guest every time you resize your window:
$ xrandr --output Virtual-1 --auto
According to Installing Windows 10 in KVM + libvirt, visit Spice then scroll down to Windows binaries and then click the link spice guest tools. Proceed to install the spice tools after download completes. Once installation is complete, you should be able to get the guest VM resolution to match that of the resized VM window.
For me, "Auto resize VM with window" was greyed out until I installed the spice guest tools; I did not even have to reboot after installation - this feature was available immediately and it just worked - :).
Host machine: Ubuntu 16.04.6 LTS (Xenial Xerus)
Guest VM: Windows 10 Pro (Version 1809 build 17763.379)
#ThorSummoner's approach works, but if you have a high resolution monitor, the guest video driver may not have enough memory to draw the larger screen. In that case, you will need to increase the video memory, but unfortunately the virt-manager GUI doesn't provide a method to do so. So instead follow this procedure:
View -> Details -> copy the UUID.
sudo virsh edit <copied uuid>
Look for a line like the following: <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>. Your type and other parameters may be different, but as long as there's a vgamem, you can continue.
Change vgamem to 32768
Save & exit. The config file will automatically be checked for errors.
Then restart your VM, and try again.
Short answer that worked for me:
I also have Display set to Spice. If the VM's virtual Video hardware was set to VGA or QXL, I could not resize the desktop in the guest. When I changed Video to Virtio in virt-manager and restarted the VM, it worked.
Longer background in case it's useful to future visitors:
I ran into this problem in May 2020 and while the older answers here were of some help I thought I'd add some clarifications since the virt-manager UI and libvirt capabilities continuously evolve.
In my case, I have a Fedora 32 (KDE Spin) Linux host and the same OS in the guest. My virt-manager version is 2.2.1.
As with thorsummoner's original situation above I am using Display Spice so I can have goodies like the shared clipboard between host and guest.
The guest seemed stuck on 1024x768. xrandr in the guest showed lots of higher resolutions available, but when I tried to set the resolution to 1920x1080 -- whether with xrandr --output Virtual-1 --mode 1920x1080 or with Plasma's Display setting -- it would only momentarily change to the higher resolution. Then, clunk, it would change right back.
Explicitly setting a higher level VGA video memory did not work (although it did help for another problem long ago).
No matter what I set virt-manager's View -> Scale to display menu options to, this still happened.
The fix for me was in the virtual hardware Video settings. Note: not Display, but a separate entry further down in the left-hand-side Hardware list in virt-manager.
If video was set to VGA or QXL, I could not resize the guest.
Then I changed the video hardware to Virtio, and the problem went away. I could resize the desktop with either xrandr commands or the GUI Display preferences, and the changes would stick even after restarts.
Of course the guest VM should be cleanly shut down before making this change to its virtual hardware settings.
What worked for me is much simplified modified ThorSummoner's answer:
Step 1:
View > Scale Display > Always
Step 2:
View > Scale Display > Auto Resize VM with window
Step 3:
In the guest OS, set the desired resolution.
I tried everything I saw to make it work but the only thing that worked for me was to set video to QXL (didn't tried Virtio or VGA after that tho) and do a proper shutdown of the Windows 10 VM (from inside the VM, do a "shutdown"). If you use the reboot from virt-manager it seem's like it doesn't reboot entirely.
What worked for me (finally!):
Debian 11.6 on my host laptop.
Debian unstable as my guest VM.
In the guest, "apt install spice-vdagent".
In the guest details (View / Details):
Display Spice = Spice Server
Video = QXL
View / Scale Display = Always
When logged into KDE Plasma (X11) as my Desktop Environment, the View / Scale Display had the "Auto-resize window with VM" option selected, but it was grayed out and KDE's resolution would not resize as I changed the guest window size; it would scale to some degree, but it seemed to be using a magnification effect rather than actually changing the resolution.
When logged into Cinnamon or into Gnome (just plain "Gnome", not "Gnome Wayland" or "Gnome on Xorg" or any of the other Gnome options in my selection pull-down menu), the View / Scale / Auto-resize was not grayed out, and both DE's resized as I resized the guest window.
Note: the resizing was not instantaneous; it took a second or two after I finished resizing the guest window before the DE changed resolution to match.
In my case, I had manually set resolution to 1920x1080 prior to booting with SPICE vdagent. I just had to go to settings, display (will depend slightly between DE), and select the resolution corresponding to SPICE resize mode.
For those of you who still haven't got virt to auto-resize with suggested config (spice channel, spice guest tool, QXL), this is how I solved mine.
Background: I got it to auto resized before, but I got a clean install of ubuntu, and using the same config, same vm files (was actually physical partition), but I can't get it to resize again. I got spice channel in the config with QXL video, spice guest tools in windows guest, but still can get it to resize.
So finally, I just got a clean install of both windows and my distro (this is not the solution, just indicating that my config was clean). I tried again with the same config but nothing work, and I started to wonder if windows I the problem here, which it ultimately was. I checked the device manager to see that 2 virtio drivers were rejected by windows secure boot. So as an instinct I went in tiano bios (ovmf) and disable secure boot. It's working fine now.
Form me it was just a matter of going to the VM click Show virtual hardware details icon, resize that window, then click back on the Show the graphical window icon since they share the same window.
Resizing on Windows guest works if you install the virtio display driver.
Open "Device Manager", right click on "Display adapters", right click on the one entry you find, then "Update driver", browse for a driver, select the virtio ISO, and install the driver.
Notice the entry won't be displayed with a yellow warning sign, as Windows will use the Microsoft Basic Display Adapter drivers, and so it is all fine for it.

VBoxManage command falied Xamarin android player error on windows

After installing Xamarin studio and Xamarin android player along with Oracle VirtualBox. I have created demo code and installed Nexus 4 (kitkat) virtual device in Android player but after running application Xamarin Android player gets started but got following window with error.
This worked for me:
Network Connections -> Right click VirtualBox Host-Only Network -> Properties -> Enable (or Disable then Enable) "VirtualBox NDIS6 Bridged Networking Driver"
I found another question similar to the current question. see it Here
If you are using windows 10 then you need to have latest version of virtual box installed. you can get it from Virtual Box Downloads page.
I hope it helps.

VirtualBox: Cannot access the kernel driver

When I try to launch VM in Oracle VirtualBox on Windows 10 it says "Cannot access the kernel driver". I tried complete reinstall (remove everything and install), repair installation (repair in the installer) and installing 2 drivers manually (VBoxUSBMon and VBoxDrv). Nothing worked. I'm using VirtualBox 4.3.12 because I was not able to launch newer version on Windows 10 for some reason.
The problem is with the installer. The new location of the driver is at C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv\VBoxDrv.sys. However the installer points to the old driver location of C:\Program Files\Oracle\VirtualBox\VBoxDrv.sys.
To fix the problem you need to point the registry value to the new location. Step to do that:
Close VirtualBox
Open regedit.exe from the Start Menu
Navigate to HKEY_LOCAL_MACHINE\system\currentcontrolset\services\vboxdrv
Double click the name ImagePath
Change the value from \??\C:\Program Files\Oracle\VirtualBox\VBoxDrv.sys to \??\C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv\VBoxDrv.sys
Restart VirtualBox
I found this answer in the VirtualBox Forum
I went to Control Panel > Programs and Feature (or right click Windows logo) then selected Oracle VM VirtualBox(4.3.12) and then hit repair at the top.
I restarted then it worked!!
Im running windows 10.0 Home
Downgrade to VirtualBox 4.3.10.
This worked fine for me after trying all that is mentioned above.
Download an old copy of your Virtualbox installer (make sure it's the
same version!)
Run the installer
Select "Repair"
Reboot
Uninstall the old version
Install the new version
Hope it helps!
I have VirtualBox 4.3.14 and I got the "Cannot access the kernel driver" . I did the traditional repair ,reboot and didn't solve a thing.
After a manual installation of these drivers everything works again.
Go to
C:\Program Files\Oracle\VirtualBox\drivers\USB\filter
Select VBoxUSBMon.inf and click the right mouse button. Then pick Install.
Go to
C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv
Select VBoxDrv.inf and click the right mouse button. Then pick install.
VirtualBox should now work again as expected.
I hope this helps ! :D
Just faced this problem after updating to virtual box 6.1.2 version in windows.
The answer by AllanT worked for me, except that it required one more step:
Execute this from the command line as admin: sc.exe start vboxdrv
(restarting the vbox service was not enough).
Note: I would've added this as a comment to AllanT's post but I still don't have enough rep!
You can open the CMD as admin and locate the folder that you have the Oracle Virtual Box in and run each of the the following with your Virtual Machine's name, if you are using an iso file or a vmdk:
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "Your VM Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
Make sure to replace "Your VM Name" with "Your actual VM name".
For more on the latest OS X check an example here: https://techsprobe.com/6-step-install-macos-catalina-on-virtualbox-on-windows-pc/
Just wanted to add, I had this problem on Windows 10. None of the fixes I found worked. Turned out it was due to Trusteer Endpoint Protection, which once uninstalled fixed this perfectly.
This is because VirtualBox gets confused about some of their files and settings. When i updated my VirtualBox to 6.0.14 from 6.0.10 then i got this error.
In my case i just deleted C>Username>Program Files>Oracle>VirtualBox folder. And after that i uninstalled VirtualBox from my machine.
After these steps i did a simple fresh install of VirtualBox on my machine and this solves my issue. Hope you also got some help.
Have a nice day random man and great future..
I faced the same issue. I am not sure which file was missing. Uninstall and install worked for me :)

VBoxManage: error: Failed to create the host-only adapter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am running vagrant 1.4 and virtual box 4.3 on fedora 17 machine. When I do "vagrant up", I get this error:
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: VBoxNetAdpCtl: ioctl failed for /dev/vboxnetctl: Inappropriate ioctl for devic
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp
I had the same problem today. The reason was that I had another VM running in VirtualBox.
Solution:
Open VirtualBox and shut down every VM running
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
Restart VirtualBox
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
You should now be able to run vagrant up or vagrant reload and have your new host configured.
As mentioned in this answer, recent versions of macOS can block VirtualBox.
Solution:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
(thanks to #pazhyn, #lsimonetti & #dave-beauchesne for clarifications)
For Mac OS X 10.9.3 and Vagrant 1.6.3 and VirtualBox 4.3.6 this problem was fixed with restarting the VirtualBox
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
TL;DR MacOS is probably blocking VirtualBox. Go to System Preferences > Security & Privacy Then hit the "Allow".
Solution:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
MacOS by default can block kexts from loading. You must click the "allow" button before executing the VirtualBoxStartup.sh script.
Then run:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart like the answer above.
(This article provides more clarity to MacOS kernel extension loading)
This issue appears to be fixed by installing the latest version of Virtual Box.
I had this issue after upgrading to OS X El Captian. Upgrading to the latest version of VB solved the issue for me. Virtual box will give you the latest link if you go to the virtualbox menu at the top of your screen and clicking check for updates.
Got the error in Mac after the update to Mojave. Probably you have an older version of virtual box.
Update to a recent version of virtualbox. (5.2 at the time of wrting this post)
Edit: adding #lsimonetti's comment.
In addition to that upgrade to Virtualbox 5.2, you need Vagrant >= 2.0.1
If you are on Linux, simply run: sudo vboxreload
I'm running Oracle VM Virtualbox on Ubuntu 16.04 LTS.
The solution that worked was to reinstall virtualbox as mentioned here:
sudo apt remove virtualbox virtualbox-5.0 virtualbox-4.*
sudo apt-get install virtualbox
I couldn't find my VirtualBox installation folder, as such could not issue the command:
$sudo /Library/StartupItems/VirtualBox/VirtualBox restart
I had to reinstall Virtual Box on my machine.
Here's the downloads page: Downloads Page
Then vagrant up worked for me after.
If after performing what is said by #totophe and on macOS it still doesn't work, just restart your mac. Then open the terminal and vagrant up.
This usually happens after each macOS update.
I had similar problem upgrading to OSX Monterey.
Solution:
Install VirtualBox Extension (download)
Accept VirtualBox Security & Privacy/Privacy/Input Monitoring
VirtualBox can also have and lose permissions for Accessibility, check that as well
In my case, I was able to solve this issue by reinstalling virtual box. I was trying to use laravel's homestead and was having this error. Reinstalling helps creating the directories that are needed for virtual box again. Took me an hour to figure out.
I'm running Debian 8 (Jessie), Vagrant 1.6.5 and Virtual Box 4.3.x with the same problem.
For me it got fixed executing:
sudo /etc/init.d/vboxdrv setup
Tried multiple solutions but the below sequence works for me.
Virtual Box: 5.2.34
Vagrant: 2.2.5
Mac OSX: 10.14.6
First Allow access to oracle inc:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
Then restart VBox by this command:
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
Now try Vagrant up again.
I've just had the same problem after upgrading to mac os Big Sur
Linus solution worked for me
Grant permission to VirtualBox under System Preferences > Security & Privacy > General (this request is new to macOS High Sierra)
Open Terminal and run: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
https://stackoverflow.com/a/47652517/6146535
$sudo /Library/StartupItems/VirtualBox/VirtualBox restart
Worked great for me on Mac. This normally happens when I shut down my computer without running
$vagrant suspend
I am using ubuntu 14.04. I have genymotion installed on virtualbox. Every time I start genymotion I had no problem, but suddenly one time it said unable to load virtualbox engine and it didn't open. I went through the log file and found out it could not create a new host only network because it has already created all possible host only networks. And the problem is that it cannot allocate memory for a new network.
Fix: go to your virtual box File --> Preferences --> Network
Click the host-only tab and just delete some of the host-only networks so that you will get some memory freed and next time, a new network can be created easily.
Deletion fixed my problem.
In my case I had to do the following to solve this error for me:
totophe's answer in combination with (re)installing the latest VM-version (https://www.virtualbox.org/wiki/Downloads) (Thanks to jacobappleton & user1718159)
Steps:
First (re)install latest VirtualBox;
Run sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart in terminal (not sure if this is needed in order to get the system preferences show up the allow/disallow option);
Allow in Security & Privacy
Restart your machine
Run sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart again.
Ready to run vagrant up again.
I fixed this error by installing VirtualBox 4.2 instead of 4.3. I think the latest version of vagrant and VB 4.3 are incompatible on a fedora system.
CentOS Linux release 7.2.1511 (Core)
VirtualBox-5.0
I came across this tread while searching Google for...
VBoxManage: error: Failed to create the host-only adapter
I was using VirtualBox-5.0 to test some virtual machines created with Vagrant and setting private networks in my Vagrantfile
web.vm.network "private_network", ip: "192.168.10.2"
When evoking the command $ vagrant up I would get the above mentioned error along with /dev/vboxnetcrl does not exist.
It seems that my version of VirtualBox did not have the proper kernel module compiled for my version of Linux and the device, /dev/vboxnetcrl, does not get created.
Since I wanted to test virtual machine and not troubleshoot VirtualBox, my work around (not a solution) was to:
# yum remove VirtualBox-5.0
# yum install VirtualBox-4.3
After that I was able to create the virtual machines with specified host-adapters. And of course, under VirtualBox-4.3, /dev/vboxnetcrl was there.
Now on to testing my VMs. And when I have time, I'll see if I can get it working under VirtualBox 5.0
If you are on Linux:
sudo service virtualbox restart
Windows 10 Pro
VirtualBox 5.2.12
In my case I had to edit the Host Only Ethernet Adapter in the VirtualBox GUI. Click Global Tools -> Host Network Manager -> Select the ethernet adapter, then click Properties. Mine was set to configure automatically, and the IP address it was trying to use was different than what I was trying to use with drupal-vm and vagrant. I just had to change that to manual and correct the IP address. I hope this helps someone else.
I had the same problem just now and it was solved by simply reinstalling to the latest version of VirtualBox.
For those on Mac OS High Sierra - the installation might fail at first but you need to go to System Preferences > Security & Policy and click on the "Allow" button to allow Oracle installing the software.
For macOS Mojave, this solution worked:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
I faced this issue on mac.
I did the following
Go to:
Launcher->Virtualbox
Click the icon to open Virtualbox
Start Virtualbox with the button that pops up once Virtualbox starts. Wait till the terminal window gives you the prompt,
docker#boot2docker
Then try to open docker. Hope it works!
If you are sure you have allow Oracle from system preference and the error still persist. It is highly possible you have not started VirtualBox. Ensure it is running and run vagrant up again.
Finally worked for me by following Given link.
https://www.mediacurrent.com/blog/drupal-vm-failed-create-host-only-adapter/
Tried on : 06 Mar, 2021
Mac OS = 11.2.2 (20D80)
Oracle Virtual Box = Version 6.1.18 r142142 (Qt5.6.3)
~ ➤ docker-machine create --driver virtualbox Manager1
Running pre-create checks...
Creating machine...
(Manager1) Copying /Users/speedoo/.docker/machine/cache/boot2docker.iso to /Users/speedoo/.docker/machine/machines/Manager1/boot2docker.iso...
(Manager1) Creating VirtualBox VM...
(Manager1) Creating SSH key...
(Manager1) Starting the VM...
(Manager1) Check network to re-create if needed...
(Manager1) Found a new host-only adapter: "vboxnet0"
(Manager1) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env Manager1
~ ➤
~ ➤
~ ➤ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
Manager1 - virtualbox Running tcp://192.168.99.100:2376 v19.03.12
~ ➤
What helped me on Opensuse 42.1 is to install VirtualBox and Vagrant from the official RPMs instead of from Opensuse repositories.
I encountered this problem on Windows 8.1, VirtualBox 5.1.18 and Vagrant 1.9.3.
Deleting the VirtualBox Hosts-only Ethernet Adapter from VirtualBox Preferences (Network --> Hosts-only networks) fixed this for me, and vagrant up could continue and start the VM.
I had the same problem while following a tutorial on setting up Laravel Homestead for Windows 10. The tutorial provides an example IP address 192.168.10.10 to use for the server. The problem with their example IP is that if you already have a VirtualBox Host-Only Adapter set up, the IP you use for your vagrant server must have the same first three parts of the IP address of your current adapter.
You can check what your current Virtualbox Host-Only Adapter IP address is by running ipconfig (windows) ifconfig (mac/linux) and looking for VirtualBox Host-Only Adapter's IPv4 address. 192.168.56.1 was mine. Usually if the host IP is 192.168.56.1 then the guest IP will be 192.168.56.101 so instead of using the example IP I used 192.168.56.102. Any IP that is within 192.168.56.* that is not already taken should work.
After this homestead up worked perfectly for me.
TL;DR - If your current VirtualBox Host-Only Adapter IP is 192.168.56.1, make your Vagrant server IP 192.168.56.102.