Ransom users group
FAQ
Notes for joule.eecs administrators
Previous section  |  This section  |  Next section
Previous question  |  This question  |  Next question

Virtual Machines on Joule
Christopher Brooks, 15 Mar 2011
Last updated: 2 Jun 2017

Joule has Hyper-V installed, so we can run virtual machines

See Mac VM for Mac.

Obtaining Red Hat

  1. See UCB Red Hat Linux
  2. See Microsoft TechNote: Create Virtual Machines.

Obtaining Centos

  1. I installed a BitTorrent client to download CentOS

Obtaining ArchLinux

  1. See website.

Legacy Network Adapter

Step By Step Buid to Install CentOS Linux Virtual Machine in Windows Hyper-V Server suggests
  1. Create the virtual machine
  2. Create the Legacy Network Adapter
  3. Install Centos
  4. Install Linux Service Integration Component
However, it is best to set up the Virtual Network first

Configure Hyper-V to use a Virtual Network

  1. Start up Hyper-V Manager with:
    Start -> Administrative Tools -> Hyper-V Manager
  2. In the left hand tree, under "Hyper-V Manager", select your host.
  3. Action -> Virtual Network Manager
  4. Under "Create Virtual Network", be sure "External" is selected. -> Add
  5. Enter a name such as Virtual Network Adapter #N where N corresponds with the active network adapter of the host.
    Don't know which adapter is active, use Start -> Control Panel -> Network
    Note If you already have a virtual machine, then the host machine will be listed on a different adapter than the physical adapter. One thing to do is to go look at the machine. For Joule, the physical adapter is #3.
  6. Be sure that "Allow management operating system to share this network adapter" is checked.
  7. Hit "Apply"
    Note your host machine will temporarily go off the net while the configuration occurs. Merely reconnect after a minute or so.
One way to test the Virtual Network Adapter is to do the above step, create a virtual machine without an OS and turn it out. The default configuration seems to be to get an IP address via DHCP, so this is a good test.

Create the virtual machine

See Step by Step Guide to Create Windows Hyper-V Virtual Machine.
  1. I did not "Change the default Hyper-V folders"
  2. Start up Hyper-V Manager with:
    Start -> Administrative Tools -> Hyper-V Manager
  3. New -> Virtual Machine
    1. Name: joulecentos -> Next
    2. Memory: 4096Mb -> Next
    3. Configure Networking: select "Local Area Connection 4 Virtual Network" -> Next
    4. Connect Virtual Disk: Use the default -> Next
    5. Installation Options: Install an operating system later -> Next

Create the Legacy Network Adapter

The virtual machine needs to be registered with the department so that it can get an IP address.
  1. Register the virtual machine via the EECS dept. Register a Device page.
    1. Enter the make and model of the host machine
    2. Make the serial number unique by adding something like "virtual 1" to the serial number of the host machine
    3. In the comments, note that the new device is a Hyper-V virtual device on the host machine.
    4. The MAC Address is tricky. The IRIS form will not let you enter the MAC address of the host, the form helps prevent duplicate addresses. I believe that while adding the legacy network adapter, the MAC Address is checked. Other Hyper-V machines have mac addresses that start with 00:15:5D. Vendor/Ethernet/Bluetooth MAC Address Lookup and Search says that addresses that start with 00:15:5D belong to Microsoft, so that is probably a good choice.

Debugging a Legacy Network Adapter

If, after installing an OS, your virtual machine is failing to get an IP address via DHCP, then install Microsoft Network Monitor and scan the different adapters while running dhclient while logged in to the virtual machine.

Unfortunately, I have not found a way to cause the virtual machine to use a different legacy adapter.

Install Centos

See Step By Step Guide To Install CentOS Linux Virtual Machine in Windows Hyper-V Server

Install Linux Service Integration Component

  1. Download "Linux Integration Components for Windows Server 2008 Hyper-V"
  2. Click on the .exe, which will create LinuxIC v2.iso
  3. Using the Hyper-V Manager, mount LinuxIC v2.iso
    1. In Hyper-V Manager, click on the virtual machine and select Action -> Settings.
    2. Under "IDE Controller 1", click on "DVD Drive", browse to LinuxIC v2.iso and mount it
  4. See Step By Step Guide To Install CentOS Linux Virtual Machine in Windows Hyper-V Server

Installing RedHat

  1. Obtain a .iso as above.
  2. In Hyper-V Manager, mount it by clicking on the virtual machine, selecting Settings -> IDE Controller 1 -> DVD Drive ~> Media and then browse to the location of the .iso
  3. Reboot and install. Note that you may need to select the legacy network adapter. If there are two adapters, try eth0 and be sure that it is set to automatically connect

Install Linux Service Integration Component

  1. RedHat 6.0 and 6.1 and Centos 6 require Linux Integration Services Version 3.1 for Hyper-V
  2. Download and mount via Hyper-V Manager
  3. See the pdf for details, but I did:
    mount /dev/cdrom /media
    cd /media/x86_64
    rpm -ivh kmod*
    rpm -ivh microsoft-*.x86_64.rpm
    reboot
    
    It may be necessary to do
    yum update
    yum install redhat-rpm-config rpm-build gcc gnu-pg unifdef
    

Getting the mouse to work

See http://www.jules.fm/Logbook/files/category-hyper-v.html

Notes about Redhat 6.1

See UCB RHEL

Installing ArchLinux

  1. Obtain a .iso as above.
  2. In Hyper-V Manager, mount it by clicking on the virtual machine, selecting Settings -> IDE Controller 1 -> DVD Drive ~> Media and then browse to the location of the .iso
  3. Start up the VM.
Arch does not provide a wizard that will guide you through the installation process. First, load the necessary modules:
modprobe hv_utils hv_netvsc hv_storvsc
Second, make sure networking is up. Manually run the DHCP Client Deamon:
dhcpcd
Verify the connection using the ping-command. If no IP is obtained, review the networking configuration of your VM in the Hyper-V management tool. Consult the Installation Guide to be guided through the process of installing Arch Linux.

Notes

  1. When using the EXT4 filesystem, the hv_storvsc module attempts to zero out bytes in the image (for security reasons), assuming that the host system has a routine for that, but server 2008 doesn't implement that function. This results in a flood of errors in dmesg. For that reason, it's recommended to use another filesystem, e.g. EXT3.
  2. Make sure to load the hv_* modules at start-up by editing /etc/mkinitcpio.conf
  3. Install additional software using Pacman, also see Yaourt
  4. Automatically start dhcp at boot:
    systemctl enable dhcpcd@
    
    (in my installation the network device appeared as enp0s10f0)
  5. To install packages, use sudo pacman -S emacs(see: https://wiki.archlinux.org/index.php/Pacman). We also have yaourt installed, which provides access to the user repositories (see: https://wiki.archlinux.org/index.php/Yaourt). Note that yaourt should not be run as root.
  6. The ufw firewall is installed to pass traffic on ports 22 and 8078
  7. ptango.eecs.berkeley.edu is a CNAME to joulecentos.eecs.berkeley.edu.
  8. See Ptango->wiki->Sandbox for information about the Sandbox.

Previous section  |  This section  |  Next section
Previous question  |  This question  |  Next question
You are not logged in 
Contact 
©2002-2017 U.C. Regents