Last active
May 21, 2020 13:57
-
-
Save pldmgg/9fc22a059efeeac1bd192ca3c26d9288 to your computer and use it in GitHub Desktop.
UnRaid_HassOS_VM_Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### What You'll Need (assuming your workstation is Windows) ##### | |
- Qemu For Windows: https://qemu.weilnetz.de/w64/ | |
- WinSCP: https://winscp.net/eng/download.php | |
- 7zip: https://www.7-zip.org/download.html | |
- The VMDK virtual disk from the Home Assistant website: https://www.home-assistant.io/hassio/installation/ | |
- Access to your UnRaid WebGUI from your Windows workstation | |
#### Installing Qemu On Your Windows Workstation #### | |
- Why? Because the virtual disk images provided by the Home Assistant website are not in a format that UnRaid can understand. | |
Qemu will convert the disk image to a .img file so that UnRaid can handle it. | |
- Navigate to the Qemu For Windows URL (see above), and click on the latest .exe to download it. Right now, the latest is qemu-w64-setup-20200201.exe | |
- Double-click qemu-w64-setup-20200201.exe and step through the installer leaving all defaults. (The .exe should be in your | |
Downloads folder, i.e. C:\Users\<your_username>\Downloads\qemu-w64-setup-20200201.exe) | |
#### Installing WinSCP On Your Windows Workstation #### | |
- Why? Because we need to upload the converted disk image to your UnRaid server so that UnRaid can access it when creating a new VM. | |
- Navigate to the WinSCP URL (see above), and click the "Download WinSCP" button. | |
- Double click WinSCP-5.17.5-Setup.exe (or whatever the version is when you do this), and step through the installer leaving all defaults. | |
#### Installing 7zip On Your Windows Workstation #### | |
- Why? Because we need to extract the .vmdk file from the .gz archive we download from the Home Assistant website | |
- Navigate to the 7zip URL (see above), click on the download link for: 7-Zip for 64-bit Windows x64 (Intel 64 or AMD64) (should be the second link from the top) | |
- Double click 7z1900-x64.exe (or whatever version is when you do this) and step through the installer leaving all defaults. | |
#### Download the Home Assistant VMDK From the HA Website #### | |
- Navigate to the Home Assistant website (see above) and click the "VMDK" link in order to download the latest VMDK (right now, it's hassos_ova-3.13.vmdk.gz) | |
- Assuming hassos_ova-3.13.vmdk.gz was downloaded to your Downloads folder, navigate to your Downloads folder. | |
- Right-click hassos_ova-3.13.vmdk.gz, hover over "7zip" and then select "Extract Here". This will create another file called hassos_ova-3.13.vmdk | |
#### Convert the VMDK File to IMG #### | |
- Click the Windows Start button and use the search function to search for Windows PowerShell. Once found, right-click and select "Run As Administrator" | |
- NOTE: If you can't find PowerShell via Start button search, just open up File Explorer, navigate to: | |
C:\Windows\system32\WindowsPowerShell\v1.0 | Then right-click powershell.exe and select "Run As Administrator" | |
- In PowerShell, run the following commands. These commands will convert the .vmdk file to a .img file (it leaves the original | |
.vmdk intact, so in the end, you'll have both a .vmdk and a .img file) | |
IMPORTANT NOTE: Make sure the path to the .vmdk file in the below command is correct (FYI, $HOME is short for C:\Users\<your_username> in PowerShell) | |
cd "$env:ProgramFiles\qemu" | |
.\qemu-img convert -p -f vmdk -O raw "$HOME\Downloads\hassos_ova-3.13.vmdk" "$HOME\Downloads\hassos_ova-3.13.img" | |
- Feel free to close PowerShell now | |
#### Upload the .img File To Your UnRaid Server #### | |
- Run WinSCP on your Windows Workstation | |
- In the Session dialog window, in the "File Protocol" dropdown, select "SCP" | |
- In the "HostName" field, type in the IP address of your UnRaid server | |
- In the "User name" field type in a username with appropriate permissions. | |
If you haven't taken the initiative to create users and passwords other than the default for your UnRaid Server, then | |
'root' with a blank password should work | |
- On the right-hand pane, click the folder icon with a "/" inside. Then, navigate to /mnt/user/isos | |
- On the left-hand pane, navigate to C:\Users\<your_username>\Downloads and select the .img file | |
- On the left-hand pane towards the top, click the upload button (it will probably take ~15min to upload since it's big) | |
#### Create a New Linux VM in UnRaid #### | |
- From the UnRaid WebGUI, click VMs -> Add VM -> Click on the Linux Penguin | |
- Use the "Name" field to give your HassOS VM an appropriate name | |
- Use the "Max Memory" dropdown and select "2048" (recommended, but not strictly necessary) | |
- Use the "Primary vDisk Location" dropdown and select "Manual". In the field to the right, type in: /mnt/user/isos/hassos_ova-3.13.img | |
(make sure the file name matches whatever you uploaded earlier) | |
- Click the "Create" button at the bottom | |
- You'll be brought back in the VMs dashboard in UnRaid. Click the Linux Penguin next to your new VM to VNC into your VMs console. | |
- You'll see HassOS booting up (this will all be command line stuff, don't expect to see any GUI) | |
- Give HassOS a couple minutes to boot, and then press Enter on your keyboard to get the login prompt. | |
- Type: root | |
- Press Enter | |
- Type: login | |
- Press Enter | |
- Run the following command and take note of the IP Address next to the word "inet" in the resulting output: | |
ip addr | grep enp | |
- Close the VNC window | |
#### Navigate to Your New Home Assistant Instance and Complete Onboarding #### | |
- Let's say the IP Address you found above was 192.168.2.35. | |
- On your Windows workstation, open a web browser and navigate to 192.168.2.35:8123 | |
- Complete Home Assistant onboarding. | |
- Follow my instructions here to restore a snapshot you made previously in order to complete the Home Assistant migration: | |
https://gist.github.com/pldmgg/4735b5502b11c6fb867ac87b17bf3ed9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment