ubenmackin / ACVM

GUI frontend for qemu for Apple Silicon based Macs
GNU General Public License v2.0
150 stars 17 forks source link

Not enough space to install ubuntu #15

Closed sachaarbonel closed 3 years ago

sachaarbonel commented 3 years ago

Hi @ubenmackin, thank's a lot of for this fork. I've create a new disk using the gui but the vm doesn't seem to use it as I'm getting this error "You need at least 8.6 DB of available space to install Ubuntu. This computer only has 2.2 GB". Fyi using the terminal I enter this command with the patched qemu:

./qemu-system-aarch64 \
    -accel hvf \
    -m 2048 \
    -cpu cortex-a57 -M virt,highmem=off  \
    -drive file=/usr/local/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on \
    -drive file=ovmf_vars.fd,if=pflash,format=raw \
    -serial telnet::4444,server,nowait \
    -drive if=none,file=disk.qcow2,format=qcow2,id=hd0 \
    -device virtio-blk-device,drive=hd0,serial="dummyserial" \
    -device virtio-net-device,netdev=net0 \
    -netdev user,id=net0 \
    -vga none -device ramfb \
    -cdrom ~/Downloads/focal-desktop-arm64.iso \
    -device usb-ehci -device usb-kbd -device usb-mouse -usb \
    -monitor stdio

I've read the code a bit and I can't seem to find a line that looks like this -drive if=none,file=NewDisk.qcow2,format=qcow2,id=hd0 \. Also I'm not a swift expert but I don't see you reuse this variable "diskLocationTextField" in the controller. Am I missing something?

Also there is a bug when deleting a vm it only gets deleted after the app is being restart

ubenmackin commented 3 years ago

It sounds like your disk image is not large enough for the install of Ubuntu. I think I would try creating a larger disk image for the installer. How large of a disk image did you make?

Also, after you created the disk image, did you load it into the VM Configuration? The program doesn't auto load the image that you create, you still need to drag it onto the image well.

In the running of qemu-system-aarch64, here is where the disk image is referenced:

https://github.com/ubenmackin/ACVM/blob/7c68b1310b56b71aa0942dfd444c1a5be54d90d9/ACVM/MainWC.swift#L300-L309

mainImage.path is the path to the Main Image that is setup in the VM Configuration. So it is reading in the path that you have specified, and then passing that onto the arguments for qemu.

As for diskLocationTextField, it is set here:

https://github.com/ubenmackin/ACVM/blob/7c68b1310b56b71aa0942dfd444c1a5be54d90d9/ACVM/DiskCreationVC.swift#L39

And then it is used in the output routine of the qemu-img process here:

https://github.com/ubenmackin/ACVM/blob/7c68b1310b56b71aa0942dfd444c1a5be54d90d9/ACVM/DiskCreationVC.swift#L57

ubenmackin commented 3 years ago

@sachaarbonel if you try creating a larger drive, and it still doesn't work, please go ahead an open a new issue. But I am going to close this one for now.