Step-By-Step Guide to Install Alpine Linux in Hyper-V (Part 3)

Posted by Erika Tynn on March 08, 2020 · Updated on May 02, 2020 · 3 mins read

Part 3: Step-By-Step Guide to Install Alpine Linux in Hyper-V (Part 3)

Part 2: Step-By-Step Guide to Install Alpine Linux in Hyper-V (Part 2)

Part 1: Step-By-Step Guide to Install Alpine Linux in Hyper-V (Part 1)

Configure Virtual Machine Settings

  1. Move Network Adapter to bottom of list.
  2. Remove the ISO from the DVD Drive.
  3. Reduce the Memory to 256MB.
  4. Start the Virtual Machine.

Automatic Method

  1. Login using root and your previously specified password.
    myalpine login: root
    Password:
    
  2. Download and execute automatic script. If you want to inspect the script before running it, view it here.
    myalpine:~# wget -O - https://github.com/qinnovate/alpinelinux/raw/master/config.sh | sh
    
  3. Logoff
    myalpine:~# exit
    

Manual Method

Configure Hyper-V Integration Tools and Services

  1. Login using root and your previously specified password.
    myalpine login: root
    Password:
    
  2. Run apk update.
    myalpine:~# apk update
    
  3. Run apk add hvtools.
    myalpine:~# apk add hvtools
    
  4. Run rc-service hv_fcopy_daemon start.
    myalpine:~# rc-service hv_fcopy_daemon start
    
  5. Run rc-service hv_kvp_daemon start.
    myalpine:~# rc-service hv_kvp_daemon start
    
  6. Run rc-service hv_vss_daemon start.
    myalpine:~# rc-service hv_vss_daemon start
    
  7. Run rc-update add hv_fcopy_daemon.
    myalpine:~# rc-update add hv_fcopy_daemon
    
  8. Run rc-update add hv_kvp_daemon.
    myalpine:~# rc-update add hv_kvp_daemon
    
  9. Run rc-update add hv_vss_daemon.
    myalpine:~# rc-update add hv_vss_daemon
    

Set up SSH Daemon for Remote Access

For simplicity, I allowed password login for root. You can also easily set up key-based login, but I am not covering this here.

  1. Update the /etc/ssh/sshd_config file to add the following.
    PermitRootLogin yes
    
  2. Restart the sshd service.
    rc-service sshd restart
    
  3. Logoff
    myalpine:~# exit
    
  4. You can now remote login into your Alpine Linux Virtual Machine using any SSH client. For example, if you use Command Prompt, enter the following, assuming your Virtual Machine has the IP address 192.168.1.101.
    ssh root@192.168.1.101
    
  5. You can also use other SSH-based tools like sftp.