PDA

View Full Version : How to setup VBox and Run Linux on your Windows System



Al
06-30-15, 04:46 PM
Great link for the initial setup of VBox Linux. (http://www.everydaylinuxuser.com/2014/05/how-to-install-linux-mint-as-virtual.html) There are some particulars to Boinc that aren't covered but I'll be glad to help, as will Bryan (I love volunteering people,) just PM your questions. We'll be adding to this thread as questions arise.

A couple of things to start. After installing VBox and Extension Pack, but prior to installing your chosen Distro, go to SYSTEM --> PROCESSOR and enter the number of cores. 4 core 8 thread, enter 8, etc. The slider rarely works so enter it in the box on the right. Under Motherboard, give it half of your system memory. Under NETWORK --> attach to: BRIDGED ADAPTER. This assigns an IP address to the vm, NAT will not. Under GENERAL ---> ADVANCED select drag and drop and shared clipboard as BIDIRECTIONAL. Now you can install linux. When it asks about HHD to set up I personally like Fixed at about 40gb. Keep in mind, when it says it will delete anything on the drive, it's talking about the virtual 40gb Drive you just set up, not your windows install. Once installed go to Software Manager, type in BOINC as a search and install the boinc client-manager. Once installed you're ready to crunch under Linux.

I'll get to the cc_config and app_config files later, but this will get you going.

Bryan
06-30-15, 05:43 PM
Al and I both use Linux Mint. There are 4 different flavors of Mint; Xfce, Mate, Cinnamon, and KDE. Xfce's user interface (GUI) is the least robust (not needed for BOINC) and goes all the way to KDE which is the most Windows like. There are subtle differences between the interfaces and what can be done by the GUI. Al and I plan on doing a step-by-step tutorial (at some point) on how to get BOINC up and running. We use the Xfce version so if you want to tag along then that might be a good choice. Of course with Vbox you can install different versions and play around till you settle on one of them.

YOU DON'T HAVE TO KNOW MUCH TO CRUNCH BOINC IN LINUX!!!

We will give instructions on how to:

Install in VBox
Install onto USB stick
Dual boot your PC (run native Linux at will)

Bryan
06-30-15, 06:18 PM
So why should you be interested in running Linux? There are some projects that run more efficiently (more credits) in Linux vs Windows ie Edges, Sztaki, Denis, LHC .... There are some projects that are Linux only; WEP (Wanless), BealF. Projects like MindModeling will quite often have Linux work but nothing for Windows.

VBOX INSTALLATION:

There are couple of things that aren't covered by the tutorial link Al gave.

1. On the VBox download page shown there is the main program and down below that there are EXTENSIONS listed. You want to download both of those. After you have installed VBox then double click on the extensions executable and it will install those.

2. VBox will create its own "virtual" HDD. It is nothing more than a file on your REAL HDD so don't get your knickers in a knot when it says it is going to format the drive and all data will be lost.

I think the minimum size of virtual HDD that will work for today's Mint is 12G. That will get Linux up and running but you will be SEVERELY limited on usable disk space. Linux, like Windows, uses a swap space. This is an area of the drive for doing memory dumps if you hibernate or sleep your computer. Linux recommends 1.5X times your memory size for this storage area. You have no control over a VBox installation as to how much disk space is reserved for that. On a REAL Linux installation it can be controlled.

On a couple of my machines I did VBox installations of 20G size but with 24/48G of memory there were projects that I couldn't download enough WU for all threads because the usable disk space was too small. I typically make my virtual HDD for 30G (or more for the big RAM boxes).

WHERE TO STORE THE VIRTUAL HDD
By default VBox will install your virtual drive under: c:/user/your name/Virtual VMs. If you are like me and have a small SSD for your main drive but also have a 2nd drive with bunches of storage then you can have VBox use the 2nd drive for the VM HDD. Just create a folder on the 2nd drive (ie Virtual HDD) and when you are setting up the virtual HDD for a VM machine just point it at that location.

Now that you have Linux up and running, for a small fee Al will be glad to tell you how to get BOINC running .... he accepts all forms of payment (he's a ho) =))

Al
06-30-15, 06:38 PM
If you do actually get started, get linux installed and get crunching with BOINC, you'll probably first want to tweek the cc_configure file. This is where the limited linux you'll need to know comes in to play. Go to the bottom left corner and click, up comes a menu. Click on terminal or search for terminal depending on your Distro. At the command promp type: sudo gedit then enter your password.
this gives you Superuser rights to edit text files. Click OPEN --> FILE SYSTEM --> ETC --> BOINC-CLIENT

there you will find the cc_config. Click to open and delete what's there and replace with this basic cc_config and/or anything else you normally have in your cc_configs

<cc_config>
<options>
<report_results_immediately>1</report_results_immediately>
<allow_remote_gui_rpc>1</allow_remote_gui_rpc>
<skip_cpu_benchmarks>1</skip_cpu_benchmarks>
</options>
</cc_config>

SAVE the file. Rereading the config files may work, but more than likely you'll need to restart BOINC. Just shutting it down only closes the GUI, it doesn't stop the actual client. To do that you'll need the 2nd linux command you'll ever need. Open the terminal again (MENU --> TERMINAL) and type at the command prompt: sudo service boinc-client stop

When you get the command prompt back again, type: sudo service boinc-client start

Click the menu, search for "boinc" click on the program and back comes the GUI, already crunching.

Mumps
06-30-15, 09:35 PM
A couple of things to start. After installing VBox and Extension Pack

Don't forget that the Extension Pack is a Client/Server arrangement. Installing the Extension Pack on the Host is only half the install. You also need to follow that with installing them on the Guest. Without that, many of the Extension features don't work and both the Mouse and Video optimizations are not functional. If you're running the Guest from within a window, it's as easy as choosing the Devices->Insert Guest Additions CD Image option. If you're accessing it from another machine using Remote Display, it's a bit more convoluted. If the Host Extensions are installed, that should add an ISO to the available media you can "insert" into the Guest CD drive to get them installed. Find the path by using the File->Virtual Media Manager menu option within the VirtualBox Manager to review the "Optical Disks" available. Once you know the Location, which is shown after you click on the VBoxGuestAdditions.iso in the list and look at the bottom, you can go to VirtualBox Manager for your running Guest and choose the Settings->Storage option. Pick the "Empty" CDROM drive and click on the CD looking icon to the upper right to pick that ISO you just located. As long as you're logged in to the guest, it should autorun and prompt you if you want to Run what the guest just found on the CD you inserted.

Another note, you can enable Remote Display and access the guest just like it's another Windows machine. Under Settings->Display->Remote Display, check the box to "Enable Server." (You can even turn this on and off without restarting the Guest or Host.) Once that's done, from any Windows machine, you can use the "Remote Desktop Connection" tool found under the Accessories menu on your Windows Start Menu. Just enter in the IP Address of the Host machine to connect to your Linux Guest. So that should make it easier than installing something like TeamViewer. :)

FourOh
05-23-16, 05:28 PM
I'm seeing an issue on my machines that are running VMs I could use some help with. For instance on one T5500 workstation with 24 threads and a single GPU, I am running 6 threads of CPU in VM and 16 threads of CPU in windows along with SETI on the GPU. Also running Process Lasso. My GPU usage is very poor when doing this... when I stop CPU work in VM and increase concurrent units in Windows to 22, my GPU usage goes to 90%+. This seems to be happening on my other machines too.

Is it best not to run CPU work on VM and Windows at the same time? Should I disable Process Lasso when doing so?

scole of TSBT
05-23-16, 05:55 PM
There's overhead just to run the VM. Try backing off 1 core either in Windows or VM and see how it runs.

Bryan
05-23-16, 06:28 PM
There's overhead just to run the VM. Try backing off 1 core either in Windows or VM and see how it runs.

Yep!

FourOh
05-24-16, 09:44 AM
There's overhead just to run the VM. Try backing off 1 core either in Windows or VM and see how it runs.

I'm already leaving 2 threads for GPU... I should leave 2 more for VM? :(( How am I supposed to keep up with all the badge whores?!? :p

scole of TSBT
05-24-16, 10:24 AM
I'm already leaving 2 threads for GPU... I should leave 2 more for VM? :((
How are you allocating threads to the BoincClient running under windows? <ncpus> or % of processors in prefs?
How many cores/threads is the VM defined with and how is BoincClient in the VM allocating threads?

FourOh
05-24-16, 10:17 PM
How are you allocating threads to the BoincClient running under windows? <ncpus> or % of processors in prefs?
How many cores/threads is the VM defined with and how is BoincClient in the VM allocating threads?

In windows I use app_config with project max concurrent, along with an app_config to give GPU a thread. On VM I set the machine to however many threads of CPU I want it to use. So for the above example, I'm running WCG limited to 16 concurrent on Windows, with a 6 thread VM running WCG (BETA). Windows is also running SETI on GPU with 1 thread dedicated.

scole of TSBT
05-25-16, 08:46 AM
What kind of/percentage cpu use does the windows resource monitor show?

STMahlberg
02-01-17, 02:44 AM
I managed to install Virtual Box and extensions along with Linux 18.1 "Serena" Xfce with only a few problems; the biggest one being MSI in their infinite wisdom buried the vt-x feature which is turned off by default. I also installed Boinc and I'm currently running WEP-M+2 to see how it does.

So is it normal when you "Power off the machine" that you lose Boinc? I assumed it would install that application to the VM drive that it created on disc or must you use "Save the machine state"?

Also, I read that it was stated that there would be instructions for the following in the future...




We will give instructions on how to:

Install in VBox
Install onto USB stick
Dual boot your PC (run native Linux at will)

...seems like that future would be now. ;)

Bryan
02-01-17, 02:49 AM
If you are running a "live disc" meaning you put in the cd or iso you can install BOINC but when you shut down you will lose it. In the upper left of the desktop there is an icon called "install". Did you actually click on that and do a real installation? If so then BOINC should be present on the VM's HDD when you reboot Linux.

STMahlberg
02-01-17, 02:58 AM
If you are running a "live disc" meaning you put in the cd or iso you can install BOINC but when you shut down you will lose it. In the upper left of the desktop there is an icon called "install". Did you actually click on that and do a real installation? If so then BOINC should be present on the VM's HDD when you reboot Linux.

I used the Software Manager to install BOINC. The only icons I have on the desktop are Home and Install Linux Mint.

Bryan
02-01-17, 03:07 AM
Okay, it sounds like you are running off of "live CD" and haven't actually installed Mint yet. Click on the Install Linux Mint icon and do the actual install. Once you do that it will ask you if you want to continue testing or reboot. Then you know that you've actually installed Mint. After the reboot you can install BOINC and it will be there from then on.

STMahlberg
02-01-17, 03:09 AM
Okay, it sounds like you are running off of "live CD" and haven't actually installed Mint yet. Click on the Install Linux Mint icon and do the actual install. Once you do that it will ask you if you want to continue testing or reboot. Then you know that you've actually installed Mint. After the reboot you can install BOINC and it will be there from then on.

I'll do that. Thank you.

Bryan
02-01-17, 03:12 AM
Oh when you tell it to reboot it will give you a message to remove the installation CD or whatever. If you used a CD then just take it out. If you used an ISO file then you have 2 options:

1. Go onto the HDD and rename the ISO file.
-or-

2. The better way is when it asks if you want to continue testing then tell it yes. The click on the shutdown X in the upper right corner. It then gives you some choices and you want to select "Power down".

Then in the VBox control panel highlight the VM, hit SETTINGS, and under the SYSTEM TAB, you'll see a box with the boot order. Move the HDD to the top of the list. Then it won't try to reload the ISO file :D

MindCrime
02-04-17, 02:35 PM
Sorry if I haven't read all the details but I do this stuff quite frequently. For instance I have my t5500 with 4 boinc instances, 1 windows (host) 3 linux vms.


When you are in vbox manager and tell it where your linux iso is and begin the install/setup you're essentially starting a live disc. Depending on the ISO, you'll need to "install" that live disc. (I use virtual dynamic disk btw with about 16gb preset to be safe). Once you've "installed" your linux it'll probably ask you to reboot and remove the media. You don't have to remove the "media" from the vbox disc, it knows what you're doing. Now you can treat it like another computer and just shut it down within linux, or if you'd like you can use vbox to shut it down with it's various options.

In my experience the most troubles I've had are with the setup and storage part. I'll just make this little list incase it helps at all
Vbox > new name/os
memory size > you can change this but think about 1gb per crunching thread you can adjust later
virtual disk> Create virtual disk > VDI > Dynamic > then something bigger than 16gb should be good
Now it should be in VBOX list and "powered off" > right click it go to settings
System > set cpu/memory you want
Storage > click the disc in "storage tree" then click the disc on attributes "optical drive" this is where you locate the .iso

Vbox is gonna treat that .iso like a bootable disk, it should boot up and be "operational" but you'll need to "install" the OS before you install anything else or else it won't be saved. I think a lot of us run Linux Mint and when I luanch it for the first time from vbox i'll have an icon on the desktop that says "Install Mint" or something. Do that and you should be good to go from now on. And once you get it the way you like it you can "export" that vdi and have it all setup for other VMs.

I remember Duke used to run completely live, so every time his computer shut down he would have to reinstall on boot up. I can't remember who but someone sent him a bootable linux dvd and he ran that for a couple years. If it were on a USB 3.0 drive I imagine it could be very fast, you'd just have to install boinc every time, unless your live .iso already had boinc installed, which I think his did.

STMahlberg
02-05-17, 06:56 AM
For instance I have my t5500 with 4 boinc instances, 1 windows (host) 3 linux vms.

Why 4 instances of Boinc?

When I was playing around with Linux, I had paused Boinc on Windows while I installed Boinc on Linux and ran some WEP wu's. When the instance of Boinc on Windows resumed from it's timeout, it locked up my rig or rather slowed it down that it became unresponsive.

scole of TSBT
02-05-17, 07:17 AM
Why 4 instances of Boinc?Typically you never run a VM along with boinc on windows unless you are running a GPU app under windows and other app under linux but you must make sure the % processor usage is allocated correctly between the 2. There are reasons for having multiple VMs. The biggest being some projects have a hard limit to the number of WUs it will allow you to have in progress. If you are bunkering, you fill up one VM, then the others. If the project doesn't require linux or pay any better under linux, then it's much easier to setup additional boinc clients under windows. If you have dedicated cruncher and want the option to run projects under linux, you should consider setting up a dual boot system. It's not that much more work than setting up a VM.

MindCrime
02-05-17, 02:40 PM
Why 4 instances of Boinc?

When I was playing around with Linux, I had paused Boinc on Windows while I installed Boinc on Linux and ran some WEP wu's. When the instance of Boinc on Windows resumed from it's timeout, it locked up my rig or rather slowed it down that it became unresponsive.

The multiple instances of Linux, one it's so I can diversify what I'm running more easily if I'm running mulitple apps/projects. Also it's to dabble with different distributions. I'd like to get a mac os going some day. But mostly it's a simple and cheasy way to get goofygrid credit/hours, or for when WU limits are hit like Scole said. My setup on the 12c/24t t5500 is 3 linux vms all that use 4 threads each. So max threads they can use is half my total. It's my opinion that a lot of WCG projects pay slightly better on linux so what I would do is load up the linux vms first and then added windows threads of wcg until I felt I had the right overall load considering hyperthreading.

It seems that virtual threads are a bit more forgiving than the host's when it comes to CPU time. Like you said locking up. If you had a 4c/8t machine and setup a VM to use 5 threads and then you turned off your hyperthreading and launched the VM i bet it would work totally fine until you overloaded it and it would just bog but probably not crash the host.

In fact 3 of my windows hosts all have linux vms running on them. Right now since I think cosmology CAMB runs better on windows I have them all idled out just running nci. but when things change I'll often run 3threads on the Linux VM while the host runs a gpu.

STMahlberg
02-05-17, 03:04 PM
In fact 3 of my windows hosts all have linux vms running on them. Right now since I think cosmology CAMB runs better on windows I have them all idled out just running nci. but when things change I'll often run 3threads on the Linux VM while the host runs a gpu.

Some very cool whiz-bang abilities running separate VM's; I am intrigued.


If you have dedicated cruncher and want the option to run projects under linux, you should consider setting up a dual boot system. It's not that much more work than setting up a VM.

I've considered doing a dual boot system in the past but never followed through; I will have to revisit this.


Currently, I'm waiting for Linux to completely install on my Server. It seems that this has been an all morning process... once again more Windows issues than anything else. Once that's done, I'll come back to my main rig and finish what I started a few days ago.

Bryan
02-05-17, 04:05 PM
There is a performance penalty for running VMs versus native Linux. On my I7-3930s it is about 12%. On the dual Xeon X5675 machines it is about 28%. VBox doesn't handle multiple processors all that well. On the dual Xeon machines if you run 2 VMs with each using 12 threads it will produce more credits than running a single VM with 24 threads. It will produce much more running native.

The maximum number of threads VBox allows in a single VM is 32.

The VM is its own environment. If you are gunning for a new badge on WCG that is based on "hours" you can over commit the VMs and double or triple your hours. When we did the WCG time challenge there were several of us running 3 VMs of 21 threads on our 24 thread X5650 machines. We didn't get more credits than normal but we tripled our hours. Each VM was only getting 1/3 of the available "real" CPU time but inside the VM, BOINC and WuProp only see that the WU are utilizing 100% of the of the available resources of the VM.

If you go the route of dual boot then that is optimum since there is no penalty for using a VM. For most things having multiple instances of BOINC available is better than having VMs because they don't take the performance hit. But on all my machines I have 3-6 VMs on both Win and Linux because there are times they just come in handy :D

BTW, I also have Win7 VMs on most machines too. Now that I know how to do multiple instances of BOINC those will probably never be used again.

STMahlberg
02-06-17, 09:47 AM
I have a new problem. My server locked up installing Linux and I had to reboot it. Now when the VM starts up, it won't run Linux at all. Can I just delete the Virtual Box VM directory that contains the .vdi files or do I have to delete the machine and start a new one?

On a side note, my server is a 64 bit system; however when I run the VM it won't let me install the Linux 64 bit iso it will only let me install the 32 bit iso. What's that about?

Al
02-06-17, 12:00 PM
I have a new problem. My server locked up installing Linux and I had to reboot it. Now when the VM starts up, it won't run Linux at all. Can I just delete the Virtual Box VM directory that contains the .vdi files or do I have to delete the machine and start a new one?

On a side note, my server is a 64 bit system; however when I run the VM it won't let me install the Linux 64 bit iso it will only let me install the 32 bit iso. What's that about?
Sounds like you selected the wrong os install. I always select "other 64bit" and have never had an issue.

Al
02-06-17, 12:03 PM
Oh, I would delete the machine. An install working correctly should take about 5 minutes.

scole of TSBT
02-06-17, 12:05 PM
I have a new problem. My server locked up installing Linux and I had to reboot it. Now when the VM starts up, it won't run Linux at all. Can I just delete the Virtual Box VM directory that contains the .vdi files or do I have to delete the machine and start a new one?

On a side note, my server is a 64 bit system; however when I run the VM it won't let me install the Linux 64 bit iso it will only let me install the 32 bit iso. What's that about?
It's best to delete the machine (including all files, it will ask you this) and start fresh. As for only 32 bit version available, boot into BIOS and make sure you have virtualization enabled.

STMahlberg
02-06-17, 02:47 PM
Sounds like you selected the wrong os install. I always select "other 64bit" and have never had an issue.

32 bit is the only options it showed.


It's best to delete the machine (including all files, it will ask you this) and start fresh. As for only 32 bit version available, boot into BIOS and make sure you have virtualization enabled.

I will delete the machine and try again. Virtualization was the first thing I changed in the bios before I started; after rebooting I even went back to the bios to make sure it took.

I'll give it all another try.

Edit: Now it's giving my a 64 bit choice... I hate it when a computer makes me look stupid. lol

scole of TSBT
02-06-17, 02:55 PM
Do you have 32 bit or 64 bit boinc installed?

STMahlberg
02-06-17, 03:02 PM
Do you have 32 bit or 64 bit boinc installed?

I haven't gotten that far yet.

scole of TSBT
02-06-17, 03:13 PM
I mean under windows. I assume you installed the boinc w/vbox. If you installed the 32 bit version of boinc, I assume it will also be the 32 bit version of vbox

STMahlberg
02-06-17, 03:18 PM
I mean under windows. I assume you installed the boinc w/vbox. If you installed the 32 bit version of boinc, I assume it will also be the 32 bit version of vbox

Sorry. :"> I'm running 64 bit on Windows on my server.

When I tested Linux on my main rig, I installed the Boinc I found when I searched under the Install Manager if that's the correct term. I assume that it was 64 bit as well.

MindCrime
02-06-17, 04:07 PM
On a side note, my server is a 64 bit system; however when I run the VM it won't let me install the Linux 64 bit iso it will only let me install the 32 bit iso. What's that about?

To clarify: when you're setting up a new VM the OS options are all 32bit, no 64bit options in the drop-down list?

I believe this is one of a few things, make sure all the virtualization stuff is turned on in your BIOS. Upon reboot if your problem still exists I think you'll need to turn off the windows hypervisor. But I'm pretty sure it'll be a virtualization setting.

https://forums.virtualbox.org/viewtopic.php?f=1&t=62339 FAQ: I have a 64bit host, but can't install 64bit guests

STMahlberg
02-06-17, 04:59 PM
Success! :D Finally got it all installed and Boinc as well. I'll configure Boinc once I'm done with the Cosmology challenge.

Al
02-06-17, 05:38 PM
Success! :D Finally got it all installed and Boinc as well. I'll configure Boinc once I'm done with the Cosmology challenge.
Sweet! Glad you got it working.

STMahlberg
02-15-17, 08:34 PM
I have run into a bit of a snafu... I once again forgot to suspend the core projects on the Windows host when I had Linux running trying to report work for WEP that I had done. I also didn't set NNT in WEP and must have gotten work because this rig locked up. So I had to do a cold boot and when it restarted Linux would not start at all. It says that my disk imagine is no longer accessible and to add insult to injury I think I deleted the optical drive because I don't know what I'm doing.

It now goes to a command prompt that says, >Init... blah blah something something. I was just going to delete the machine and reinstall Linux again; however, I don't want to loose the WEP wu's that I got. So what do I have to do to save those Boinc files?

Al
02-15-17, 10:39 PM
Go find your vm data files. Mine are under F:/programs/your vm

Copy the folder to your desktop. Reinstall the vm with the same name. Once created copy the original files back to the correct location. It worked for me in the past. No guarantee.

Mumps
02-15-17, 10:54 PM
Like Sphynx said. That folder should contain the disk image for your guest. Depending on what you picked during install something with an extension like vdi, vmdk, or vhd. That's just the storage used for the VM. Hopefully you haven't deleted or moved that. But that init> prompt is suggesting the boot loader can't find the bits necessary to boot the O/S, but at least that it found the boot sector. Another option you have is to boot a Linux distro from the "CDROM" drive and see if you can't repair the boot information. Or possibly copy just the BOINC files off of that "disk" if you can get access to it using that booted CD. But that's unclear due to your comment about thinking you may have deleted the optical drive. Although, even that's easy to recreate.

Another chance is to build a new VM under a different name, then attach the original VM's disk as a secondary drive to that one. Then you can copy the BOINC files directly to the new Guest when you're ready. Plenty of options, none of which are super easy to talk through without a little more time. :)

STMahlberg
02-16-17, 04:36 PM
Thanks. I'll give that a try.