πŸ“˜ Guide For UTM to Import a Virtual Machine

A comprehensive guide for Mac users to import virtual machines into UTM

πŸ–₯️

UTM Installation Steps

  1. Visit the official UTM website: https://mac.getutm.app
  2. Download the UTM app.
  3. Install UTM by dragging it to your Applications folder.
πŸ”„

Converting OVA File to VMDK File

  1. Download the OVA file
  2. It will typically be saved in your Downloads folder.
  3. Create a folder in Downloads and move the downloaded file to the newly created folder
  4. Open the Terminal from your Applications
  5. Use the command tar -xvf <filename>.ova β†’ basically extracting OVA format
    tar -xvf <filename>.ova
  6. After extraction you should get these 3 files with extensions of <filename>.ovf, <filename>-disk01.vmdk & <filename>.mf β†’ Note .vmdk file is important
    Terminal extraction command reference
    Terminal extraction command reference
Note: Sometimes this VMDK version is not working, then please try to convert VMDK to qcow2 format
πŸ”§

Converting OVA to qcow2 File

  1. Download the File OVA file
  2. It will typically be saved in your Downloads folder.
  3. Create a Folder in Downloads and Move the Downloaded file to Newly created folder
  4. Open the Terminal from your applications
  5. Use the cmd tar -xvf <filename>.ova β†’ basically extracting ova format
    tar -xvf <filename>.ova
  6. After Extraction you should get these 3 files with extensions of <filename>.ovf, <filename>-disk01.vmdk & <filename>.mf β†’ Note .vmdk File is important
    Terminal extraction for qcow2 Terminal extraction for qcow2
  7. Use this command qemu-img convert -f vmdk -O qcow2 ubuntu-noble-24.04-cloudimg.vmdk ubuntu-noble.qcow2
    qemu-img convert -f vmdk -O qcow2 ubuntu-noble-24.04-cloudimg.vmdk ubuntu-noble.qcow2
    Note: Before trying this command, make sure you have installed Brew on your base machine. If Brew is not installed, follow Brew installation steps
  8. Replace ubuntu-noble-24.04-cloudimg.vmdk with your actual file name, and ubuntu-noble.qcow2 with your output filename.
    - In my case, the input file was ubuntu-noble-24.04-cloudimg.vmdk and I named the output ubuntu-noble.qcow2. You can choose different names as you wishβ€”just be consistent in commands.
    qemu-img conversion command qemu-img conversion command
β˜•

Steps to Install Brew

  1. Open https://brew.sh in your browser.
  2. Copy and paste the following command into Terminal:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    Homebrew installation command Homebrew installation command
  3. Press Enter, then enter your Mac password if prompted.
    ⚠️ If Brew is not found after installation, run:
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/your_username/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
  4. brew install qemu
    This installs qemu, which is needed for converting VMDK to qcow2 format.
    Installing qemu via brew Installing qemu via brew
πŸ“₯

Importing VMDK or qcow2 to UTM Software

  1. Now open the UTM Software
  2. Click on Create a New Virtual Machine
    UTM create new VM UTM create new VM
  3. Select Emulate option
    Select emulate option Select emulate option
  4. Select Other option
    Select emulate option Select other option
  5. Under the Hardware option for machine, select (Intel ICH9 based PC). After that, specify how much memory (RAM) you need to assign for that virtual machine. Note: You need to mention in MB (1GB = 1024MB). After memory, select the Core (let it be default).
    Select emulate option Hardware configuration
  6. In other options, under boot device select NONE, disable UEFI Boot, and click on Next.
    Select emulate option Boot device configuration
  7. In storage, just specify 2GB
    Select emulate option Storage configuration
  8. In shared directory, just click on Continue
    Select emulate option Shared directory option
  9. Now in summary, name the machine as you wish and click on Save
    Select emulate option VM summary and save
  10. Now select that machine you have created β†’ right-click β†’ click on Edit
    Select emulate option Edit VM settings
  11. Now scroll down under Devices section. Remove the existing IDE Drive. After removing the existing IDE drive β†’ click on New option β†’ select the Import option β†’ select the extracted VMDK file.
    Import VMDK file Import VMDK file
  12. Once all the steps are done properly, close the settings tab & start the machine. You are good to go!
🧹

Clean Up (Optional)

  1. After the conversion is complete
  2. Delete the original .ova and .ovf, .mf files.
  3. βœ… Keep the .vmdk & .qcow2 file.
βœ…

Conclusion

You have successfully learned how to import OVA (Open Virtual Appliance) files and prebuilt virtual machines into UTM on Mac. By following these steps, you can now:

  • βœ“ Extract .ova files to get .vmdk disk images
  • βœ“ Convert VMDK to qcow2 format using qemu-img
  • βœ“ Configure and import virtual machines into UTM effortlessly
  • βœ“ Run any prebuilt virtual machine on your Mac without compatibility issues
⚠️ Important Note: These steps are specifically designed for OVA files and prebuilt virtual machines. For ISO installation, please do not follow these steps as a separate comprehensive guide will be provided soon. ISO installation requires a different approach and will be updated with detailed instructions.
πŸ’‘ Tip: If you encounter any issues during the import process, refer back to the relevant section or try the alternative conversion method (VMDK to qcow2) for better compatibility.