marvel-nccr / quantum-mobile

A Virtual Machine for computational materials science
https://quantum-mobile.readthedocs.io
Other
91 stars 32 forks source link

Cannot resize host window #171

Closed giovannipizzi closed 3 years ago

giovannipizzi commented 3 years ago

When I resize the window in QM 21.03.18-qe, the inner guest desktop remains small and I get a popup error (see screenshot below):

Screenshot 2021-03-25 at 09 13 18

I'm using VirtualBox 6.1.18. Note that in the same host machine (so same VirtualBox etc.), resizing the window of e.g. Quantum Mobile 20.11.2a works fine and the desktop gets rescaled accordingly.

chrisjsewell commented 3 years ago

Yeh you beat me to it, I believe its related to:

I've updated my VirtualBox to 6.1.18 r142142 (+ extension pack) and vagrant-vbguest to 0.29.0 (and bento/ubuntu-18.04 was already updated to 202012.21.0, which appears to have triggered the issue), so see if this is still there in the next build

giovannipizzi commented 3 years ago

I think this is a critical bug to fix before the end-of-month official release - in my opinion, not being able to resize the window makes the VM unusable :-(

Luckily, I should have found how to fix it. As reported in one of the links above, the issue is that you need to have the kernel headers installed (and gcc, but that one is in there), so that the Guest Additions can build the appropriate kernel modules.

Here how I fixed it (tested in the most recent VBox 6.1.20 with updated Extension pack). Note that this is done "by hand" here, but this probably can be automated (my guess: just install the kernel module with sudo apt install linux-headers-generic as the very first thing, and then let Vagrant do its job in installing the most recent guest additions.

  1. insert the CD of the guest additions (I turned off the VM, added it from the settings)
  2. Started the VM, started the software (suggested by Nautilus when opening the CD on the desktop as an 'autolaunch' softare)
  3. I got this log:
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.20 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.18 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel 
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel 
4.15.0-142-generic. Please install them and execute
  /sbin/rcvboxadd setup
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted
Press Return to close this window...
  1. It says above clearly that the kernel modules are missing.
  2. install the kernel modules with sudo apt install linux-headers-generic (this should install the correct version, if you want to check you can use name -r to get the current one, that is anyway also written in the log above)
  3. Run now sudo /sbin/rcvboxadd setup. The log now seems happier:
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel 
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 4.15.0-142-generic.
update-initramfs: Generating /boot/initrd.img-4.15.0-142-generic
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted
  1. Reboot as requested
  2. Now I can resize the window and it works!

@chrisjsewell can you please fix this, and explicitly double check that the OVA you will produce works as intended, before the next release? (If you create a temporary OVA after the fix and you share it with me privately - e.g. google Drive - I can test, if you cannot reproduce)

chrisjsewell commented 3 years ago

@giovannipizzi can you confirm you have tested this with the latest release, because I updated everything before the build and no longer encounter this issue?

giovannipizzi commented 3 years ago

Yes, I confirm this was tested with the OVA of Quantum Mobile 16.04.21a, downloaded from the link on the Quantum Mobile homepage.

For completeness:

  1. I installed it in Virtualbox 6.1.18, and I still had the issue
  2. I upgraded Virtualbox to 6.1.20 as well as the extension pack, started the VM, same issue
  3. Followed the instructions above, and the problem is now fixed.

Are you saying that if you install directly from the OVA, you don't get the issue - i.e. you can resize and the desktop is also resized? Maybe someone else with a Mac could try (e.g. @mbercx ?): just download the OVA, start the VM, resize the window and check if the desktop resizes or you get the same result as the screenshot in the first post above. If needed I'm happy to re-try again from the OVA deleting the current VM I have, but I doubt I'll get a different behaviour. It would be good if at least another person tries and we see if this is reproducible

mbercx commented 3 years ago

I'm unable to reproduce the issue for QM v20.11.2a, but for v16.04.21a I get the same error message as in @giovannipizzi's screen shot. I'm using:

VirtualBox 6.1.16 macOS Mojave v 10.14.5

sphuber commented 3 years ago

I can confirm the behavior for v16.04.21a using VirtualBox 6.1.18 on Ubuntu 20.04

bosonie commented 3 years ago

II can confirm the behavior for v16.04.21a using VirtualBox 6.1.16 on Ubuntu 18.04

giovannipizzi commented 3 years ago

As a side comment, since the root of the issue is with the Guest Additions not working, other features like Sharing folders with the host might not work (I just heard by private email a report that I couldn't check, that in v16.04.21a sharing of folders does not work). However, I can confirm that in my version with the fix described above, sharing works as expected

chrisjsewell commented 3 years ago

Alright try: https://drive.google.com/file/d/13rKBKRynodjj4zk4qbsh_E6CNZRnyC8i/view?usp=sharing

giovannipizzi commented 3 years ago

I confirm that it works!! Screen can be resized, copy-paste works bidirectionally, and I can share folders

sphuber commented 3 years ago

Great, let me know if I also still need to check.