Virtual Machine (VM) Setup

Step-by-Step Instruction

  1. Log in your Remote Desktop.

  2. If you see the Welcome to Brown message, click OK.

  3. Open your terminal and folder.

    • You should see six icons on the bottom. Your terminal is the 'black screen' icon, and your folder is the 'blank folder' icon.

  4. In your folder window, go to /depot/tdm-COMPANY/etc

    • Replace COMPANY with your company name.

  5. You should see two different folders, vm_scripts and my_images

    • If the vm_images folder doesn’t exist, make a new folder and go to Create Your Own Image.

    • If the vm_scripts folder doesn’t exist, go to Shortcut to Set Up VM.

  6. In your my_images folder, you should see a qcow2 file.

  7. In your vm_scripts folder, you should see three files.

    • 1_create_cluster_copy.sh

    • 2_grab_a_node.sh

    • 3_build_a_vm.sh

  8. Open 1_create_cluster_copy.sh to check if the path to the image is correct.

    • Example: /depot/tdm-COMPANY/etc/my_images/img1.qcow2
      with COMPANY being your company name

  9. Open 3_build_a_vm.sh to check two things.

    • The path to your qcow2 file is correct.

      • Example: /depot/tdm-COMPANY/etc/my_images/img1.qcow2
        with COMPANY being your company name

    • The path to mount is correct.

      • Example: /depot/tdm-COMPANY
        with COMPANY being your company name

  10. Run 2_grab_a_node.sh There are two ways to do it.

    • Run the command, '/depot/tdm-COMPANY/etc/vm_scripts/2_grab_a_node.sh'

      • with single quotation marks, COMPANY being your company name

    • Drag 2_grab_a_node.sh into your terminal and hit ENTER.

  11. Run 3_build_a_vm.sh There are two ways to do it.

    • Run the command, '/depot/tdm-COMPANY/etc/vm_scripts/3_build_a_vm.sh'

      • with single quotation marks, COMPANY being your company name

    • Drag 3_build_a_vm.sh into your terminal and hit ENTER.

  12. Once the mounting filesystem is selected, the Windows VM will automatically appear.

    • If the window is too large or small to view, go to view tab to modify.

    • If the VM window appears and then disappears, email The Data Mine. It’s likely be a permission issue that can be fixed.

  13. The Windows VM will have the associated depot location mounted. If you open File Explorer and select the qemu entry in the menu, you will see the depot loation.

    • This is the same depot location that your team use for the Juypter notebooks. If you have data from the VM in this location, it will be avaliable in the Jupyter notebooks for further analysis.

  14. Once you’re done with the VM, don’t click the exit [x] button.

    • Go to the start menu in the bottom right corner.

    • Click the power icon and select Shut Down. Leave Other (unplanned) entry.

    • Select Continue on the pop-up that appears.

  15. Close any remaining terminals in the Remote Desktop session and log out.

    • Type exit in the terminal windows and hit ENTER until they dispear.

    • Select Log Out in the upper-right corner.

Create Your Own Image

There are two approaches to build a qcow2 file. Important to note that it will take a while to copy the VM image. Expect about 10 minutes wait.

Approach 1: Change the Path

  1. Open 1_create_cluster_copy.sh

    • If 1_create_cluster_copy.sh doesn’t exist, jump to Approach 2.

  2. Change the path right after the cd command to
    /scratch/brown/kamstut/tdm/bin/vm_image/helmer_vm/windows-base.qcow2

  3. Save the file.

  4. Run 1_create_cluster_copy.sh There are two ways to do it.

    • Run the command, '/depot/tdm-COMPANY/etc/vm_scripts/1_create_cluster_copy.sh'

      • with single quotation marks, COMPANY being your company name

    • Drag 1_create_cluster_copy.sh into your terminal and hit ENTER.

  5. Congratulations, you just created a qcow2 file.

    • You can find it in /scratch/brown/USERNAME with USERNAME being your username

  6. Feel free to move it to /depot/tdm-COMPANY/etc/my_images and procceed to Step 7 in Step-by-Step Instruction.

    • If you want to leave it in your scratch, you need to update the PATH in 3_build_a_vm.sh. See Step 9 in Step-by-Step Instruction.

      • Use this path instead: /scratch/brown/$USERID/windows-base.qcow2

Approach 2: Through Application

  1. Select Application on the top-right.

  2. Select Cluster Software and then Windows 10.

  3. Select New Base Windows 2016 Server and then click OK.

  4. You can use your scratch path for your VM image or any path you want to implement your image.

    • scratch is not persistent storage. If you want to keep your image for a longer term, be sure to save it in a different location.

  5. Select OK. At this point, your VM image will be generated.

  6. Select /depot/tdm-COMPANY when Mount Selection screen appears.

  7. The VM window will appear.

Shortcut to Set Up VM

This assumes that you already have a qcow2 file. If not, please see Approach 2.

  1. Select Application on the top-right.

  2. Select Cluster Software and then Windows 10.

  3. Select Saved Image in Image Selection window and then click OK.

  4. Select the qcow2 file location you want to use and then click OK.

  5. Select /depot/tdm-COMPANY when Mount Selection screen appears.

  6. The VM window will appear.

Tableau Installation

A Tableau account allows 2 people to log in at the same time, so one Purdue email address can be used for 2 people. These 2 people can use the same qcow2 file. You are more than welcome to use your own Purdue email address for yourself. This is an approach to 'sacrifice' less Purdue emails to set up free Tableau accounts.

Tableau will be upset if 3 or more people try to use the same account.

Suppose four people (MaryAnne, DavKev) want to use Tableau at the same time. Here’s a way to get around.

  1. Duplicate the qcow2 file in /depot/tdm-COMPANY/etc/my_images

    • Now, you should have two different files. For example,

      • /depot/tdm-COMPANY/etc/my_images/img1.qcow2

      • /depot/tdm-COMPANY/etc/my_images/img2.qcow2

  2. Duplicate 3_build_a_vm.sh

    • Now, you should have two different files. For example,

      • /depot/tdm-COMPANY/etc/my_images/run_image_MaryAnne.sh

      • /depot/tdm-COMPANY/etc/my_images/run_image_DavKev.sh

  3. Modify the PATHs in each file above to use right qcow2 and mount /depot/tdm-COMPANY

    • run_image_MaryAnne.sh should load img1.qcow2 and mount /depot/tdm-COMPANY

    • run_image_DavKev.sh should load img2.qcow2 and mount /depot/tdm-COMPANY

  4. MaryAnne run 2_grab_a_node.sh and then run_image_MaryAnne.sh

  5. Either Mary or Anne uses their Tableau credentials. The image will remember the Tableau account information.

  6. Repeat (4,5) but use DavKev’s

  7. No need to re-login. A qcow2 file will remember and be ready to use for the next user.

    • If MaryAnne get on run_image_DavKev, they are techincally logged in as DavKev.

    • Suppose six people want to use Tableau at the same time, three different qcow2 files need to be created and repeat this procedure thrice.

Power BI Installation

This section will provide an overview of how to install Power BI on a Windows VM. The instruction assumes that the VM is already set up.

Install

  1. Open a browser and navigate to the Microsoft Power BI downloads website

    • Google "Microsoft Power BI download"

    • Select the second link for "Downloads | Microsoft Power BI"

    • Select "Advanced download options"

  2. Select "Download" and choose the PBIDesktopSetup_x64.exe option. Select "Next".

  3. If prompted, choose the "Save File" option on the download screen.

  4. Once the file has completed downloading, navigate to "Downloads" and run the PBIDesktopSetup_x64.exe file.

    • Run the file with the default settings.

Access Data

Note: You need some of the information that makes up the DB connection string from your company. Otherwise, you won’t be able to connect.

Once Power BI is installed, you can connect it to any data source. Microsoft has many built-in data connectors. Everything from standard CSVs to Hadoop!

Just for a demo, "SQL" is used.

  1. Open a Power BI session and navigate to "Get data" and then "More…​"

  2. In the search bar, type "SQL" and select the entry for "SQL Server database". Select "Connect".

  3. Fill in the "Server" and "Database" names based on the information provided by your company. Click OK.

    • You can leave the setting to "Import" and no "Advanced options" are required.

  4. In the authentication options, select "Microsoft accout" and then sign in with your Purdue account.

  5. Once the authentication is completed, select "Connect". If the connection is succesful, the tables from the DB will appear.

    • You only need to do this set up once for each data source. Once you have successfully connected, you can reconnect using the "Recent Sources" option in "Home" in Power BI. It will log in to the same source with the same credentials.