Mouse and keyboard not working on VirtualBox 6

This is for discussing general topics about how to use VirtualBox.
Locked
Qwazzy
Posts: 1
Joined: 8. Jul 2019, 21:06

Mouse and keyboard not working on VirtualBox 6

Post by Qwazzy »

I'm trying to install Ubuntu on VirtualBox 6.0.8 and neither mouse nor keyboard works on the guest machine, while icons on the bottom pane indicate that keyboard and mouse are captured. I have wireless usb Logitech mouse and keyboard and everything work absolutely fine on VirtualBox 5.

Host is Windows 10 with Hyper-V enabled.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Mouse and keyboard not working on VirtualBox 6

Post by socratis »

Qwazzy wrote:Host is Windows 10 with Hyper-V enabled.
That doesn't sound good... Take a look at the status bar. Do you have the "slow" icon (Image)?

If yes, look in the "Control Panel" » "Programs and Features" » "Turn Windows features on or off", and make sure that the none of the following are active: If VirtualBox is running without Hyper-V enabled, where proper, hardware virtualization is actually available, then the standard virtualization icon (Image) would show. Disable Hyper-V in your host and see what happens...

To be 100% sure, we need to see a complete VBox.log, from a complete VM run, where the problem occurs:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe problem / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Ayush Akarsh
Posts: 4
Joined: 29. May 2020, 14:44

Re: Mouse and keyboard not working on VirtualBox 6.1.8

Post by Ayush Akarsh »

I am using Ubuntu 18.04 as VM on a windows 10 host. My mouse and keyboard are not working, though I have checked that they are properly captured. I have tried the following:
Restarting the host and guest multiple times.
Increasing the size of video memory.
Turning virtulization technology enabled in bios menu.
Installing the latest oracle virtual box, and reattaching the same vdi file.
Changing the checkboxes of mouse and keyboard capture options.
Disabling hyper-visor in programs and features.

Please suggest anything that I may have missed. Also, I am attaching the log file as well.
Attachments
Ubuntu 18.04-2020-05-29-13-04-20.rar
The log file
(27.54 KiB) Downloaded 30 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Mouse and keyboard not working on VirtualBox 6

Post by scottgus1 »

Ayush Akarsh wrote:mouse and keyboard ... are properly captured
How are you doing this? If you are using USB filters or selecting keyboard and mouse from the USB menu, don't do either. The mouse and keyboard remain in the host OS and get sent into the guest as needed automatically by Virtualbox. Trying to capture them will mess up Virtualbox's programming.

One thing that might help, once you have un-captured the keyboard and mouse:
Guest Additions information report: Version 6.0.14 r132055 '6.0.14_Ubuntu'
You're using the Ubuntu fork of Guest Additions. Uninstall these and install the Guest Additions from the ISO that came with Virtualbox, guest window's Devices menu, Insert Guest Additions CD Image, then run the installer from the guest's CD drive.
Ayush Akarsh
Posts: 4
Joined: 29. May 2020, 14:44

Re: Mouse and keyboard not working on VirtualBox 6

Post by Ayush Akarsh »

scottgus1
I am not using any usb filters. I have the enable usb check box checked and usb 2.0(OHCI + EHCI ) controller enabled.
I am just confirming that the mouse and keyboard are captured by looking at the bottom right of my VM start screen.

I am not able to find or uninstall Guest Additions information report: Version 6.0.14 r132055 '6.0.14_Ubuntu' this. Please elaborate.

Also, inside storage option of the settings of the VM, I have attached the Guest VBoxGuestAdditions.iso( I have tried inserting inside the sata controller as well as the ide controller) but upon clicking to insert the image in the way you suggested, I am getting an error.
Error:Could not mount the media/drive 'C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED).

Also, lastly, as you kindly suggested to run the installer from the guest CD-ROM, the thing is that I cannot login inside the VM, as I cannot enter the password, since the screen
which I am attaching is not responding to the keyboard or the mouse so I cannot enter the password and login inside . So, please suggest anything considering things discussed above.
Attachments
I can  see the bottom right that keyboard and mouse are captured(both are green)
I can see the bottom right that keyboard and mouse are captured(both are green)
Capture2 (3).png (9.37 KiB) Viewed 18492 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Mouse and keyboard not working on VirtualBox 6

Post by scottgus1 »

It sure would be hard to install the Guest Additions from the guest's CD drive if you can't log in, huh? Sorry about missing that.

The "Version 6.0.14 r132055 '6.0.14_Ubuntu'" refers to Guest Additions that are already installed in the guest Ubuntu. Some Linux distros pre-install their fork of Virtualbox's Guest Additions to facilitate use of their distro in a Virtualbox guest. Some times that works, sometimes it doesn't. Your keyboard and mouse are integrated into the guest using the pre-installed Guest Additions, that's what the green icons in the status bar show. So you're not capturing the keyboard and mouse with USB filters, which is good.

The VERR_PDM_MEDIA_LOCKED error when trying to load the Guest Additions ISO means they're already loaded. (Other OS families will just eject the 'CD' and let it be re-inserted. Linux locks the 'CD' sometimes, thus that error.)

I missed this in the log earlier:
00:00:51.869902 supR3HardenedErrorV: supR3HardenedScreenImage/LdrLoadDll: cached rc=VERR_SUP_VP_NOT_OWNED_BY_TRUSTED_INSTALLER fImage=1 fProtect=0x0 fAccess=0x0 cHits=5 \Device\HarddiskVolume6\Users\Legion\AppData\Local\Microsoft\OneDrive\20.052.0311.0011\amd64\FileSyncShell64.dll
00:00:51.869950 supR3HardenedErrorV: supR3HardenedMonitor_LdrLoadDll: rejecting 'C:\Users\Legion\AppData\Local\Microsoft\OneDrive\20.052.0311.0011\amd64\FileSyncShell64.dll' (C:\Users\Legion\AppData\Local\Microsoft\OneDrive\20.052.0311.0011\amd64\FileSyncShell64.dll): rcNt=0xc0000190
It seems that something related to OneDrive on your PC is corrupted. I'm not really sure how to fix it, or if it is causing the keyboard and mouse trouble.

Reboot your host PC and try an 'sfc /scannow' in an Administrator command prompt.

After that the only thing I could suggest is that your guest may be expecting a different keyboard layout than the host OS is set to. And I would try a fresh brand new guest with a new install of Ubuntu, to see if the same thing happens.
Ayush Akarsh
Posts: 4
Joined: 29. May 2020, 14:44

Re: Mouse and keyboard not working on VirtualBox 6

Post by Ayush Akarsh »

scottgus1
Thanks a lot for showing your concern.
I tried your way 'sfc /scannow', it showed some files were corrupt. Then still, the problem persisted(couldn't move past the login screen).
As you said, I guess I will now build a new VM. There are a few things I want to clear out though:
1. Does creating a back up in ubuntu 18.04 actually, help in recovering lost data while creating a new VM.
2. Alternatively, I can host my coding projects on github and back up the data on google drive. Do you use any alternatives to create a backup for a VM?
3. Any other things you want to say so that this hosrrible mistake doesn't happen again.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Mouse and keyboard not working on VirtualBox 6

Post by scottgus1 »

Re #3, have plenty of good restorable backups, in different formats and providers.

A copy of the shut-down (not save-stated) guest folder with all files therein, as well as the guest disk files if they are not in the guest folder, serves as a complete backup of the activated guest. You can FC file-compare the backup to confirm the copy. If the original is lost, move a copy of the backup back to the original location and the guest will be ready again. The copy can be used on a different host PC too, just by registering the guest's .vbox file. (note that if the original guest had all the guest disk files in the guest folder, the guest is completely usable on any capable host and host OS. If the disk files are outside the guest folder then the .vbox file has absolute paths to the disk files and these paths must be either reproduced on the new host or the .vbox file must be modified.) Virtualbox 6.0.x and later have the right-click-the-guest Move command to move the guest folder to the same drive the guest drive file is on, and the File menu's Virtual Media Manager's Move command to move the guest's drive file into the guest folder next to the .vbox file, to achieve the optimum guest format.

You can also run in-the-guest 3rd-party backup software, though you will need a boot disc ISO from the backup software to restore. If the backup software is a command or app in the OS itself, you will need to install the OS again to restore the backup.

Whatever method you use to backup, be sure you know how to restore. A backup that can't be restored isn't a backup, it's just an increased carbon footprint. Practice ahead of time how to back up a guest and restore into a new guest.

I don't know how to help with #1, I am not strong in Linux. #2 means trusting cloud providers, which may be OK in addition to your own backups. Personally I don't trust the cloud Their computers go crazy sometimes, too.

Finally, don;t destroy this bad guest. You might be able to attach the bad guest's drive as a second drive to a new working guest and copy the data off.
Ayush Akarsh
Posts: 4
Joined: 29. May 2020, 14:44

Re: Mouse and keyboard not working on VirtualBox 6

Post by Ayush Akarsh »

scottgus1
I want to confirm what you are saying. I think I have to copy the contents of the folder in the photo(I think better would be to use the clone feature of the virtual media manager), and that would serve as a backup, in any other or the same machine, I just have to start the .vbox file with VirtualBox and that will be okay. I want to confirm if I have to place it(the entire copy) in a particular location before opening the .vbox file or not or I can do it from anywhere.

Alternatively, I can export it in the form of an .ova file in the same or different pc and then open it with VirtualBox. Also, I have seen that for Linux guests like Ubuntu 18.04, I can easily create a snapshot and that the current state can easily be restored to any snapshot in the snapshots list.

Also, I want to confirm when do we have to tinker with the VirtualBox.xml inside C\Users\UserName\.VirtualBox , with respect to the machine entry, and with respect to UUIDs of the hard disks. I want to be certain in this area. When I want to restore to a previous backup, on a different machine, do I have to change the src or is taken care of?

Lastly, whenever, I log in the newly created the VM, I see two messages in the system logs during start up: [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message.
I can login after that. I just want to fix this.
Is that because that the graphics controller is VMSVGA?? Also, as you suggested I tried attaching that bad guest drive as a secondary master in IDE, but the new guest won't boot up(Screen becomes blank with just a cursor)
Attachments
This would be my optimum guest folder which would be copied.
This would be my optimum guest folder which would be copied.
Capture-min.PNG (32.62 KiB) Viewed 18448 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Mouse and keyboard not working on VirtualBox 6

Post by scottgus1 »

the screenshot shows everything that would need to be backed up for the 'Ubuntu 18.04' guest. In fact, just copy the folder containing all these things, and that's the backup. Restoring involves placing the backup copy back where it was before, in D:\VM. You can't restore two copies of the guest, only one, right over the top of the original. (If you find you need a copy of a guest, then cloning is a good way to make copies.) You can also put the backup on another host PC, if the present PC dies.
Also, make sure the guest is fully shut down, not save-stated, before backing it up.

BTW, you should set your Windows host to show all extensions, so the .vbox and .vdi files can be seen better.

Exporting and cloning aren't recommended for backing up a VM. Either process changes some guest settings, and a change in the guest means there's no way to FC- or hash-confirm the backup. Also, UUIDs will change, and reactivation will be required.
Ayush Akarsh wrote:I can easily create a snapshot and that the current state can easily be restored to any snapshot in the snapshots list.
Snapshots make a guest more delicate and definitely do not work as backups. They are similar to Windows' System Restore points: they are point-in-past-time markers, not extractable, useless without the base system in place, but easier to corrupt because the files are accessible on the host drive. They do not store "files", like a backup folder would. Virtualbox snapshots store changed disk sectors, which may or may not contain the entire file. They should only be used on guests you're experimenting with and with data you wouldn't mind losing. (The forums are replete with users destroying their important data because they did something wrong with a snapshot.)

Additionally, each snapshot, if used long enough, has the potential to grow to the final size of the original drive, and will not shrink once another snapshot is taken. The guest's total data size on the host could be many times what it would have been without the snapshots, and with tremendous amounts of dead data that will never be used or changed.
Ayush Akarsh wrote:when do we have to tinker with the VirtualBox.xml inside C\Users\UserName\.VirtualBox
Never if we let Virtualbox handle the guests. The main Virtualbox window does everything that needs to be done to Virtualbox.xml. Every time the forum reports a user needing to manually edit the XML is because of pebcak errors, not Virtualbox errors.
Ayush Akarsh wrote:two messages in the system logs during start up: [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message.
These messages are not a problem I get them too, and the guests always continue to boot and work well. It's a Linux message, not a Virtualbox message. You can research the messages using the Linux OS help channels if you want.
Ayush Akarsh wrote:I tried attaching that bad guest drive as a secondary master in IDE, but the new guest won't boot up(Screen becomes blank with just a cursor)
On my Ubuntu Budgie guest the hard drive is on the SATA controller; only the guest's CD drive is on IDE. Put the bad guest's drive on the SATA controller, and make sure the port number of the good booting drive is SATA port 0, the bad drive should be port 1 or higher. (I suspect that IDE might get tested for boot before SATA.)
BillShannon
Posts: 1
Joined: 2. Apr 2022, 21:22

Re: Mouse and keyboard not working on VirtualBox 6

Post by BillShannon »

Just wanted to pass along that I had a similar problem. The icons showed that the mouse and keyboard were captured, but then when trying to use the VM, it was slow to do anything. It would accept my clicks and typing, but then would take ten minutes to perform a simple task.

I followed the suggestion of socratis on July 10, 2019, and turned off "Microsoft Defender Application Guard." I rebooted and this fixed the problem.

Thank you so much for helping out here in the forums!
Locked