utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.42k stars 1.32k forks source link

Offer pre-configured Gallery VMs with more virtual hard-drive memory (or simplified instructions on how to download a linux distribution and use it to create a new VM for novices) #2731

Open SugarRayLua opened 3 years ago

SugarRayLua commented 3 years ago

I’m finding that I’m running out of room quickly on the pre-configured Debian XFCE VM I downloaded from the gallery and understand from online conversations that it is not a straightforward task to expand a VM hard-drive after the VM is configured. Could someone offer pre-configured VMs with more virtual hard-drive memory? Alternatively, could someone provide some simplified step-by-step instructions for novices on how to download a linux distribution iso image and use it to set up a custom VM on UTM? I tried following online guidance on how to download a Debian iso and tried to mount it and use it to create a virtual machine (similar to what worked and how UTM suggests downloading a Windows iso image to set up Windows UTM), but it didn’t work (didn’t seem to get proper installer screen to install). Thanks for considering!

krishjainx commented 3 years ago

@SugarRayLua I can. Let me do this by tomorrow.

SugarRayLua commented 3 years ago

Thanks so much, @Krish-sysadmin! As a linux novice, I did finally figure out how to download iso from linux distribution websites and create virtual machines with more memory, but I think having some in the UTM gallery will help other users and make it more convenient when the user wants to have in the gallery when a user wants to switch to a new VM. Even in Linux, 10GB seems to get filled up quickly.

krishjainx commented 3 years ago

Also @SugarRayLua you know you can expand the hard drive space from UTM, then expand the partition space in Linux by booting a live ISO and then expanding the filesystem like ext4 to fill the space?

SugarRayLua commented 3 years ago

Hi, @Krish-sysadmin. I knew I could expand the hard drive space from UTM when I create a new custom VM but didn’t think I could do so once the VM was build (e.g. after I built my VM or used a pre-built VM from the UTM gallery). I did read that in Linux one can possibly expand a VM file system storage space once built, but it was my impression one needed to do so from having some sort of host (e.g. a Linux host of a VM on a desktop) run the command to expand the VM’s virtual hard drive space. I tried to read up how to do that but couldn’t figure it out as a novice Linux and Qemu user. If you had the time in the future, could you point me to a link with some instructions for beginners on how to expand a build VM virtual hard drive space or perhaps put basic instructions on a UTM wiki for other novice users? If it was something most users could easily do themselves then probably don’t need additional pre-configured UTM Gallery VMs with more hard drive space. Thanks again for your help :-)

krishjainx commented 3 years ago

https://github.com/utmapp/UTM/wiki/How-to-expand-an-already-created-Linux-VM's-space%3F @SugarRayLua

SugarRayLua commented 3 years ago

Thanks, @Krish-sysadmin! Two clarifications questions on the excerpt from your instructions below:

“ 1. You already have a VM created (or having used the prebuilt images). You must shut the VM down. Resize the hard disk from the settings. And save the changes.

  1. You must now boot from a live Linux ISO (set it to be the first in the boot order)”

I don’t understand how to “resize the hard disk from the settings”. I presume you are talking about the settings in UTM that you can use to manage a VM once the VM is shut down. However, when I go to “drives” I can’t find where I can resize the drives. When I create a new VM from scratch the drives settings gives me the option to modify the drive size but I don’t see that option available once I’ve created the VM.

“Live Linux ISO”: I’ve seen advertised on the Linux Distribution websites that one can use a “live” Linux ISO to “try” out the Linux distribution before installing it. Is that the type of “Live Linux ISO” that you are talking about? If so, I’ll go ahead and try that out this week (download a “live” Linux ISO) and attach it to a test VM I created and follow your instructions using the Live Linux ISO to expand the already created VM virtual drive space. If that is not what you mean by a “Live Linux ISO” please let explain more how I install I live Linux ISO.

Thanks again for providing the additional instructions.

krishjainx commented 3 years ago

Yes, that is the type of Live Linux ISO. Like an Ubuntu Live ISO would do. As for resizing I was not aware of the lack of easy way to do it via UTM - so I suggest shut the vm, locate the .qcow2 file.

qemu-img resize image.qcow2 +SIZE (where SIZE is the size (e.g. 10G for 10 gibibytes).)

And then follow my instructions in the wiki https://github.com/utmapp/UTM/wiki/How-to-expand-an-already-created-Linux-VM's-space%3F

SugarRayLua commented 3 years ago

Thanks! I’ll try out those instructions this week.