ubenmackin / ACVM

GUI frontend for qemu for Apple Silicon based Macs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not enough space to install ubuntu

sachaarbonel opened this issue · comments

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

commented

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:

ACVM/ACVM/MainWC.swift

Lines 300 to 309 in 7c68b13

if virtMachine.config.mainImageUseVirtIO {
arguments += [
"-drive", "file=\(mainImage.path),if=virtio,id=boot,cache=\(useCace)",
]
}
else {
arguments += [
"-drive", "file=\(mainImage.path),if=none,id=boot,cache=\(useCace)",
"-device", "nvme,drive=boot,serial=boot"
]

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:

self.diskLocationTextField.stringValue = savePanel.url!.path

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

diskLocationTextField.stringValue,

commented

@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.