Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vboxwrapper]Enable vboxwrapper to use multiattach mode disk images #4603

Merged
merged 18 commits into from
Feb 17, 2022

Conversation

computezrmle
Copy link
Contributor

Required in connection with feature request #4602

Description of the Change
Enables vboxwrapper to deal with multiattach mode disk images and differencing images as described in the feature request.
Additional settings need to be done by the project admin who wants to use this functionality.
Also described in the feature request.
The traditional use of disk images is still there and remains the default.

Alternate Designs
None.
It's an enhancement based on a previously unused VirtualBox feature.

Release Notes
N/A

Required in connection with feature request BOINC#4602
Required in connection with feature request BOINC#4602
Required in connection with feature request BOINC#4602
Introduce tag <multiattach_vdi_file>
Introduce tag <multiattach_vdi_file>
Add code to use VirtualBox differencing images
@AenBleidd AenBleidd self-requested a review January 13, 2022 13:41
@AenBleidd AenBleidd self-assigned this Jan 13, 2022
@AenBleidd
Copy link
Member

Windows build fail is expected, waiting for the fix to be merged: microsoft/vcpkg#22509

@AenBleidd AenBleidd added this to the Client Release Foxic milestone Jan 13, 2022
@computezrmle computezrmle changed the title [WIP][vboxwrapper]Enable vboxwrapper to use multiattach mode disk images BOINC#4602 [vboxwrapper]Enable vboxwrapper to use multiattach mode disk images BOINC#4602 Jan 14, 2022
@computezrmle
Copy link
Contributor Author

Who is responsible to trigger manual page changes?

Since the PR passed all automatic test I assume it may be merged into the master some day.
In that case some manual pages will/may also need to be updated.

I'm currently aware of the following pages.

https://boinc.berkeley.edu/trac/wiki/VboxApps#TheVboxjobdescriptionfile
Will need an update since the PR introduces a new tag to be used in vbox_job.xml:

https://boinc.berkeley.edu/trac/wiki/AppVersionNew#Theversiondescriptionfile
May need an update since project admins should not use the <copy_file/> tag if differencing images are used.

Where should the following hints for project admins go to?

When an image file is ready to be send out, the new method can safely be used.
Do not use differencing images while image file creation is in progress since
all changes would go to the differencing image.

@AenBleidd
Copy link
Member

@computezrmle, did you test this on Windows? Artifacts are available on the CI

@computezrmle
Copy link
Contributor Author

@AenBleidd No I did'nt. I don't have a Windows system where I can test it.

@computezrmle
Copy link
Contributor Author

Question to the workflow experts.
I'd like to add few lines to a file that is part of this PR but not yet merged.
What is the suggested way to do this?

@AenBleidd
Copy link
Member

Create a new branch from this branch

Output from "vboxmanage -q list hdds" contains paths that are compared with the path of a file.
Linux uses "/" as preferred directory separator while Windows uses "\".
This patch ensures the compare delivers the same result on both platforms.
@computezrmle computezrmle changed the title [vboxwrapper]Enable vboxwrapper to use multiattach mode disk images BOINC#4602 [vboxwrapper]Enable vboxwrapper to use multiattach mode disk images Jan 17, 2022
@computezrmle
Copy link
Contributor Author

Minor changes regarding the benchmark files were planned to be part of a separate PR.
They are now here by accident, sorry.

The changes avoid gcc compiler warnings caused by

  • uninitialized variables
  • use of C++17

client/dhrystone.cpp Outdated Show resolved Hide resolved
client/dhrystone.h Outdated Show resolved Hide resolved
client/whetstone.cpp Outdated Show resolved Hide resolved
@AenBleidd
Copy link
Member

Tested on Windows 10 with VBox 6.1.32 on Rosetta with anonymous platform and manually removed <copy_file/> flag from the tasks options.
@davidpanderson, @computezrmle, please don't forget to update the doc.

@davidpanderson
Copy link
Contributor

I'm preparing to test this feature. @computezrmle , can you please tell me how to convert our current minimal Linux VM image,
which is here:
https://boinc.berkeley.edu/dl/vmimage_x64.zip
to a multi-attach image? Oracle's docs are not clear.

@computezrmle
Copy link
Contributor Author

To see what happens I suggest to do the following steps via the VirtualBox GUI:

  1. Extract vmimage_x64.vdi from the zip
  2. Create a new VM (Linux guest as it looks like the vdi contains a Linux system)
  3. Attach vmimage_x64.vdi to the new VM (this sets the disk mode to "Normal" to stay compatible with VirtualBox 4.3)
  4. From the VirtualBox Manager open File -> Tools -> Virtual Media Manager
  5. Select the entry for vmimage_x64.vdi and click on the properties icon
  6. Change the attribute "Type" to "Multi-attach"

Done

When you start the VM for the first time VirtualBox will open vmimage_x64.vdi read-only (as "parent disk") and it will automatically create a writable differencing vdi file below the VM's standard directory.
That way other VMs can use the same parent disk as each VM gets it's own differencing image.
As long as a differencing image is registered as child of the parent disk the disk mode can't be set back to "Normal".
From the perspective of the guest OS the split into 2 vdi files is completely hidden.

The steps from above can also be executed via vboxmanage.
That's how it is implemented in vboxwrapper and used by ATLAS and CMS from LHC@home.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request][vboxwrapper]Enable vboxwrapper to use VirtualBox differencing images
3 participants