Anvil Windows VM

Build the Windows VM

  1. Connect to Purdue’s Brown HPC homepage and select Remote Desktop.

    The picture shows 3 icons with different options to interact with the Brown HPC. The first is Gateway. The second is Remote Desktop. The third is Jupyter Hub. Each option has a smaller button under it titled Launch
    Figure 1. Brown HPC Website at Purdue.
  2. Log-in with multi-factor authentication (Duo).

    1. Note: If you’re not able to log in, it’s probably because you don’t have a Brown account. Please email us (datamine-help@purdue.edu) with your Purdue username (not ACCESS username), and then we will add you to our TDM allocation in Brown.

  3. Once the Remote Desktop session is loaded click the Terminal Emulator icon at the bottom of the screen.

    The image shows a trey of different options when logged in to the Remote Desktop session. The second option from the left is a small grey and black square that looks similar to a traditional shell or command line interface.
    Figure 2. Terminal Emulator.
  4. In the terminal run the command cd /scratch/brown/<user ID>.

    • Be sure to replace the <user ID> with your ID.

    • For example, I would type cd /scratch/brown/dglass.

  5. In this new directory run the command cp /scratch/brown/dglass/windows-gis.qcow2 ..

    • Be sure to include the period at the end of the command.

    • This is a large file so it will take 5 to 10 minutes to copy.

  6. Now we have our base Windows VM. In order to use it to connect to data on Anvil we have to set up SSH keys.

SSH Key Configuration

  1. Navigate back to your Remote Desktop session (not the Windows VM).

  2. In your Remote Desktop session open a new Terminal Emulator.

    • If you still have your terminal open you can also run cd to go back to your home directory.

  3. In the Terminal Emulator run cd .ssh.

    • If this errors, run mkdir .ssh`to create your `.ssh directory.

    • After that you can run cd .ssh again.

  4. Once you are in the .ssh directory run ssh-keygen –a 100 –t ed25519 –f ~/.ssh/id_ed25519 –C “anvil_key”

    SSH Key Settings

    After you run the ssh-keygen command above you can hit enter through all of the prompts.

    You don’t need to set a password for the SSH key.

    This command will create the SSH keys that we will use to connect to Anvil.

  5. After the ssh-keygen command is finished run cat id_ed25519.pub and copy the output.

    • We have the SSH key created! Now we need to add it to Anvil.

  6. In the Remote Desktop session select the earth icon to open a web browser.

    The image shows a trey of different options when logged in to the Remote Desktop session. The second option from the right is a small blue and grey image of the earth with a white mouse curor over it.
    Figure 3. Web Browser.
  7. In the browser navigate to ondemand.anvil.rcac.purdue.edu.

    • If the browser warns you of a potential security risk select Advanced…​ and then click Accept the Risk and Continue.

  8. Log-in to Anvil with your ACCESS ID and password.

  9. Inside Anvil open a terminal by selecting Clusters and then _Anvil Shell Access.

    The image shows a dark grey bar at the top of a web page with many options. The 4th option from the left reads "Clusters" and when hovered over shows and option for Anvil Shell Access.
    Figure 4. Web Browser.
  10. In the terminal session run cd .ssh.

    • If the .ssh directory does not exist run the mkdir .ssh command and then run cd .ssh again.

  11. Inside the .ssh directory run vi authorized_keys.

  12. This will open up a text editor that requires specific commands to make changes:

    1. In the open file type i to go into insert mode. This will allow you to add new text.

    2. Use cntrl+v to paste the SSH key that you copied from the id_ed25519.pub file on Brown.

    3. Be sure that the key is copied into a new line within the file.

    4. Hit the escape key to leave insert mode then type :wq to write and quite the file.

      • You can now close the browser session on Brown.

Connect to Anvil with the Windows VM

Changing VM Settings

If you’re having trouble viewing items in the Windows VM it can be helpful to change the resolution.

To do this, right-click on the desktop of the Windows VM and choose Display Settings.

Inside the Display Settings screen you can scroll down and select Advanced Display Settings to change the resolution.

  • Now we are on to the last step. Connecting our Windows VM on Brown to our data on Anvil.

    1. In the Remote Desktop session on Brown select Applications in the upper-left, followed by Cluster Software, and then Windows 10.

      The image shows a nested menu on the Brown Remote Desktop session. The options Application
      Figure 5. Launching a Cluster.
    2. Once the Windows VM launched in the Image Selection screen select the Saved Image option.

      The image shows a menu with 3 options. Two are Windows server versions and the third is Saved Image which is highlighted.
      Figure 6. Saved Image Selection.
    3. On the following selection screen choose your saved .qcow2 image and click OK.

      The image shows a menu with 2 options. They are both files with the qcow2 extension. The file titled windows-gis.qcow2 is highlighted.
      Figure 7. Specific Image.
    4. When the Mount Selection window appears, select the path /home/<user ID> and select OK.

      The square menu shows a list of potential file paths with the title mount select. The path that contains home and the user’s ID is highlighted for selection.
      Figure 8. Path Mount.
  • After the path is selected the Windows VM will open.

  • The Windows VM already had the SSHFS-Win Manager application installed.

  • This is the application that we will use for our last step to connect to our data on Anvil.

SSHFS on the Windows VM

  1. Open the SSHFS-Win Manager application by selecting the app in the task bar. The app has a blue cloud over a blue drive shaped rectangle.

    The task bar of the Windows server is displayed. The second icon from the left is selected. The icon is a blue cloud above a blue rectangle and displays SSHFS-Win when the cursor is over it.
    Figure 9. SSHFS-Win.
  2. In the SSHFS-Win application select the Add Connection icon.

    The SSHFS-Win application is open. Displaying any existing connections and a list of options along the right side of the window. The first option in the menu is highlighted titled add connection.
    Figure 10. Add a New Connection.
  3. In the new connection information add the fields below:

    1. NAME: anvil_mount

    2. IP/HOST: anvil.rcac.purdue.edu

    3. USER: ACCESS ID

      Finding your ACCESS ID

      If you don’t know your ACCESS ID log-in to ondemand.anvil.rcac.purdue.edu and check the user icon in the upper-right corner.

      The ACCESS ID will start with an x-.

    4. AUTHENTICATION METHOD: Private Key (file)

    5. KEY FILE:

      1. Click on the browse icon.

      2. In the file explorer click Desktop then My Cluster Scratch.

      3. Click the explorer bar next to`qemu` and add \.ssh to the path. Hit enter after it has been added.

        The image shows the file explorer window with a file path across the top and a listing of available files in the main section of the screen. The cursor is editing the file path at the top of the window to navigate to the .ssh folder on Brown.
        Figure 11. Update File Path.
      4. After you hit enter you should now see the id_ed25519 SSH files that we created earlier.

      5. Be sure to select the file that does not have the .pub extension.

    6. PATH: /anvil/projects/tdm/corporate

  4. Click Save

  5. Once the connection information has been saved, click the disconnected plug icon to connect.

    The image shows the new connection added to the SSHFS application. To the right of the connection name there is a grey circle with a disconnected plug logo. The user’s cursor is highlighting the plug to connect.
    Figure 12. Check SSH Connection.
  6. If the connection icon turns green and the logo shows as connected then you are successful!

    • Once it’s connected Windows will act like the SSH connection is a local drive.

    • This means that you can install programs like PowerBI, Tableau, or ArcGIS Pro on the Windows VM and connect them to the SSH drive.

Submitting and Issue

If you have any issues please submit a ticket to The Data Mine team by emailing datamine-help@purdue.edu.