# Setting Up Hortonworks Sandbox on Apple Silicon Mac with UTM This guide will help you run Hortonworks Sandbox HDP an Apple Silicon Mac (M1/M2/M3) using UTM. Since HDP doesn't natively support ARM architecture, we'll use UTM to emulate an x86_64 environment. ## Step-by-Step Instructions ### 1. Download the Hortonworks Sandbox OVA File ``` https://archive.cloudera.com/hwx-sandbox/hdp/hdp-2.5.0/HDP_2.5_virtualbox.ova ``` ### 2. Install UTM Download and install UTM from https://mac.getutm.app/ or from the Mac App Store. ### 3. Extract the OVA File Open Terminal and navigate to the directory containing the downloaded OVA file, then extract it: ```bash tar -xvf HDP_2.5_virtualbox.ova ``` Verify the extracted files: ```bash ls -la ``` You should see a .vmdk file and an .ovf file. ### 4. Install QEMU Install QEMU using Homebrew to convert the virtual disk format: ```bash brew install qemu ``` ### 5. Convert VMDK to QCOW2 Format Convert the extracted VMDK file to QCOW2 format that UTM can use: ```bash qemu-img convert -f vmdk "Hortonworks Docker Sandbox-disk1.vmdk" -O qcow2 hdp_sandbox.qcow2 ``` ### 6. Create a New Virtual Machine in UTM 1. Open UTM, click "Create VM" and choose "Emulate" 2. Select "Other" and then "x86_64" architecture 3. Select "None" for Boot Device and have "Legacy Hadrware" checked 4. Configure the virtual machine: - Architecture: x86_64 - System: Standard PC (Q35 + ICH9, 2009) (pc-q35-9.1) - Memory: At least 8GB (12GB or more recommended) - CPU: At least 4 cores - Skip creating a new drive ![image](https://hackmd.io/_uploads/BJLAL9Oo1g.png) ### 7. Import the Converted Disk 1. In the virtual machine settings, go to "Drives" 2. Delete the default drive 3. Click "New Drive" → "Import" and select your hdp_sandbox.qcow2 file ### 8. Configure Network Settings 1. In the virtual machine settings, go to "Network" 2. Set Network Mode to "Bridged" 3. Enable "Advanced Settings" and check "Isolated from host" 4. Save the settings ### 9. Start the Virtual Machine 1. Start the virtual machine 2. Log in with: - Username: `root` - Password: `hadoop` ### 10. Start Ambari & Linux Shell Web Client Service Once logged in, first start and go into the container: ```bash docker start sandbox docker exec -it sandbox bash ``` ![image](https://hackmd.io/_uploads/Bkezlzas1g.png) The warning can be ignored. just make sure you location is changed from "~" to "/". Then start the services: ```bash ambari-server start service shellinaboxd start exit ``` Troubleshooting: If Ambari service cannot start, check the logs: ```bash ambari-server status cat /var/log/ambari-server/ambari-server.log ``` ### 11. Get the Virtual Machine IP Address Find the IP address of your virtual machine: ```bash hostname -I ``` Use the first one. (10.48.x.x) (It should be different based on different network you use) ![image](https://hackmd.io/_uploads/B1YQhcdjJl.png) ### 12. Access Ambari Web Interface Open a browser on your Mac and navigate to: ``` http://your.VM.IP.address:8080 ```