Skip to content

Newsletter

Help Center

Categories
< All Topics
Print

HyperV Virtual Machine Creation

This article covers only the Hyper-V portion of creating a Virtual Machine. The entire process is described in a ClickUp template called ‘VM Install’, in the Servers List. It populates a checklist of all that needs to be done for installing a VM.

Creating the Virtual Machine

  1. Click button to create new VM ‘New’, choose VM
  1. Give a name the VM using the naming convention (Cosmos-<User>)
  2. Choose Generation 2
  3. Change VM location to a volume with plenty of free space.
  4. For the Virtual Hard disks
    1. Leave the name as is
    2. Edit storage location to one of the large remote storage containers (typically, FastStorage, or cosmos-X depending on the host machine)
    3. Assign the max size you want it to be. Default is ~500G+
  5. Assign specified amount of memory, or set it to dynamic. Default is ~10G
  6. For connection, choose ‘External’ from the drop down
  7. Choose the option for ‘Install an operating system from a bootable image file’.
    1. You can then pick from one of the local images, or any ISOs found here: \\144.167.34.241\PC-Backups\AAASoftware. If the latter, make sure to copy to a local folder first as you may encounter permission issues if trying to boot from a shared network file.
  8. Create
  9. Once the VM is created, right click on the VM and go to Settings
    1. On this page, configure the Number of CPU cores (typically 4-8) and any other settings needed
    2. Navigate to Network Adapter > Advanced Features and switch the MAC from dynamic to static. Record the MAC address in the Networking Reservations sheet. (It is recommended to do this after starting the VM once so the MAC matches others instead of starting at 00-00-00-00).
  10. Do not start the machine – first connect and then start, then immediately hit a key. This ensures that the VM boots from its virtual CD drive and installs an OS. Otherwise, you will the error screen below. Described in detail in this bug report

Notes

Ubuntu Installation

  1. Follow instructions above
  2. Turn off secure boot. If you don’t do this it won’t start (VM needs to be off).
  1. Connect to VM through Hyper V and start
  2. Follow the instructions for setting up Ubuntu
    1. Make sure to follow the COSMOS VM naming convention
    2. Make sure you REQUIRE password at login (don’t use auto login)
  3. Once you have finished the setup, install any updates and restart the VM as necessary. 

RDP on Linux

If you are using Linux desktop OS, we can setup RDP

  1. Run ‘sudo apt install xrdp’
  2. Start the service using ‘sudo systemctl start xrdp’
  3. Now you can connect to the VM using RDP and it’s IP address
    1. To find the IP address, use ‘ip a’

Nested Virtualization

Some VMs will need nested virtualization to run VMs themselves. This is needed to install and run Docker, for example. To enable this:

  1. Turn off VM
  2. Run ‘Set-VMProcessor -VMName ‘<NAME OF THE VM>‘ -ExposeVirtualizationExtensions $True’
  3. Turn VM back on.

More information here.

Table of Contents

© 2024 Collaboratorium for Social Media and Online Behavioral Studies