Questions and Answers :
Unix/Linux :
How is virtualization support determined?
Message board moderation
Author | Message |
---|---|
Send message Joined: 7 Apr 10 Posts: 8 Credit: 665,435 RAC: 0 |
What is LHC@home looking for on a host to determine if its CPU supports virtualization? I'm running FreeBSD on an AMD Phenom II X6 with SVM enabled in the BIOS. I noticed in BOINC that the capabilities list is short and the features list is empty. SVM didn't show up anywhere until I modified the client code to recognize SVM and add it to the capabilities. Fri May 15 15:43:41 2020 | | Processor: 6 amd64 AMD Phenom(tm) II X6 1035T ProcessorAMD Phenom(tm) II X6 1035T Processor [] [sse sse2 pni 3dnow 3dnowext mmx popcnt svm] Fri May 15 15:43:41 2020 | | Processor features: Fri May 15 15:43:41 2020 | | OS: FreeBSD: 11.3-RELEASE-p7 Fri May 15 15:43:41 2020 | | Memory: 31.94 GB physical, 0 bytes virtual Fri May 15 15:43:41 2020 | | Disk: 1.67 TB total, 1.66 TB free Fri May 15 15:43:41 2020 | | Local time is UTC -7 hours Fri May 15 15:43:41 2020 | | VirtualBox version: 5.2.34r133883 After restarting and updating to the LHC project, the machine details still show: Virtualization Virtualbox (5.2.34r133883) installed, CPU does not have hardware virtualization support Does this condition prevent the machine from receiving any VirtualBox tasks? I appreciate any help getting the machine to pick up VirtualBox tasks. |
Send message Joined: 15 Jun 08 Posts: 2541 Credit: 254,608,838 RAC: 28,391 |
The reporting chain regarding CPU features looks like this: CPU -> BIOS -> OS (FreeBSD in this case) -> BOINC client LHC@home relies on this chain. Your CPU is capable of AMD-V/SVM. BOINC client (on linux) reads the CPU features from /proc/cpuinfo. This might be different on FreeBSD. See: https://github.com/BOINC/boinc/blob/65d94b7bfcc015e6544cfde2e19fcfd81e45f806/client/hostinfo_unix.cpp 2 possible reasons why it doesn't work: 1. AMD-V/SVM might be switched OFF in your BIOS or disabled in your OS settings. 2. You run another hypervisor that fight against VirtualBox and locks the resources. |
Send message Joined: 7 Apr 10 Posts: 8 Credit: 665,435 RAC: 0 |
Thanks for that, computezrmle. What I was looking for was to understand how the LHC app/website determines what to put on that line in the computer details webpage describing virtualization support. There must be some value or combination of values indicating level of virtualization support. I found this in samples/vboxwrapper/vbox_vboxmanage.cpp if (!strstr(aid.host_info.p_features, "vmx") && !strstr(aid.host_info.p_features, "svm")) { vboxlog_msg("Hardware acceleration CPU extensions not detected. Disabling VirtualBox hardware acceleration support."); disable_acceleration = true; } The value 'svm' or 'vmx' must be in the 'Processor features' line as determined by BOINC. The processor features are, as you indicated, determined by the client/hostinfo_unix.cpp file. The problem is that the code in hostinfo_unix.cpp isn't sufficient to determine svm support for AMD CPUs, or at least my CPU under FreeBSD. I was able to patch the file somewhat so that I get 'svm' on the 'Processor features' line, and now LHC picks that up and reports virtualization is supported. |
Send message Joined: 15 Jun 08 Posts: 2541 Credit: 254,608,838 RAC: 28,391 |
Is it your problem that you don't get vbox tasks although virtualization support shows up at your computer details page? It may be due to the fact that the project doesn't offer a vbox app running on FreeBSD. https://lhcathome.cern.ch/lhcathome/apps.php |
Send message Joined: 7 Apr 10 Posts: 8 Credit: 665,435 RAC: 0 |
Yes, that's correct, I want to be able to run vbox tasks. Funny you say that because I just took a look at the list of applications this morning and noticed none of the vbox apps are for FreeBSD. Really, that shouldn't be a problem because these are VM images, right? As long as VirtualBox is available, I expected to receive tasks. Even if these were native apps, FreeBSD can run Linux apps, and I'm set up for that. World Community Grid sends me native Linux tasks and they get processed successfully. |
Send message Joined: 15 Jun 08 Posts: 2541 Credit: 254,608,838 RAC: 28,391 |
You may send Laurence a PM and offer your computer as FreeBSD beta tester. https://lhcathome.cern.ch/lhcathome/show_user.php?userid=419350 |
Send message Joined: 7 Apr 10 Posts: 8 Credit: 665,435 RAC: 0 |
Okay, thank-you for your help |
Send message Joined: 20 Jun 14 Posts: 380 Credit: 238,712 RAC: 0 |
From the host details page, is looks like virtualization is detected. I think the issue is how it reports the platform. x86_64-pc-freebsd vs x86_64-pc-linux-gnu I have added a new platform for the Theory app. Please let me know if that works for you. |
Send message Joined: 7 Apr 10 Posts: 8 Credit: 665,435 RAC: 0 |
Laurence, I did get a bunch of tasks but they're all in a state of "Postponed: Communication with VM Hypervisor failed." I've fixed several things including permissions for /dev/vbox* files, DBus errors, and missing guest additions .iso file because the VBoxSvc.log file provided some hints. Now, after resolving those issues, there are no more hints - just ACCESSDENIED. Here is the latest output from VBoxSvc.log. VirtualBox XPCOM Server 5.2.34 r133883 freebsd.amd64 (May 27 2020 01:12:11) release log |
Send message Joined: 7 Apr 10 Posts: 8 Credit: 665,435 RAC: 0 |
Found this trace output in one of the VBox slots: 2020-05-25 09:29:42 (493): VBoxManage had been looking in the wrong path: it should be /var/db/boinc/.config/VirtualBox. I created a soft link to the root directory and that got rid of the VM Hypervisor communication issue. All tasks ran for about 15 s then exited with computation error. Output from that seems to indicate storage-related issues. That may just be due to the previous path issue and hopefully new tasks will work as expected. 00:00:02.321764 nspr-2 VirtualBox: object created |
Send message Joined: 15 Jun 08 Posts: 2541 Credit: 254,608,838 RAC: 28,391 |
You may at first sort out problems that are caused by the interface FreeBSD <-> VirtualBox. Hence you may create your own VM and run linux as guest. Check if internet access is possible from that guest. It makes no sense to run a VM from LHC as long as basic problems are not sorted out. |
Send message Joined: 7 Apr 10 Posts: 8 Credit: 665,435 RAC: 0 |
You're right, and I think it's ready now. There was a kernel module (vmm.ko) loaded for the Bhyve hypervisor, which was causing the VirtualBox VMs to abort. I then tested with a local Linux VM and verified Internet connectivity from within it. |
Send message Joined: 15 Jun 08 Posts: 2541 Credit: 254,608,838 RAC: 28,391 |
Looks like Theory vbox runs fine. Congrats! Just one minor hint. Your logfiles show that you throttled your CPU usage: 2020-05-28 23:50:02 (66501): Setting CPU throttle for VM. (75%) This works fine if you run native apps. If you run vbox apps a couple of processes rely on each other. In addition longrunners might hit the runtime limit. To avoid timeout problems CPU throttle should be set to 100%. |
Send message Joined: 7 Apr 10 Posts: 8 Credit: 665,435 RAC: 0 |
Yes, success! Thanks to you and Laurence for the help. |
Send message Joined: 5 Feb 12 Posts: 19 Credit: 700,079 RAC: 0 |
Thanks to your hints I was able to patch the boinc-client to show processor features and now I can run the Theory app on FreeBSD as well. But I noticed the wrapper is a Linux app? I just wanted to clarify that there isn't a native FreeBSD wrapper. I understand it's pretty moot anyway, since the VM is a Linux OS. |
©2024 CERN