Testing Software - Gnome Boxes to detect live USB

Hi there,

I would like to test some software on various operating systems for usability.
I have tested it on many Fedora and windows but I need to test it on Apple MacOSX.

I would like to run a VM with Gnome boxes and a live bootable USB with MacOSX Big Sur Image.

It does not list as a detected source however I thought perhaps I need to try to have the image on my hard drive instead of USB, unsure if thats the reason. I suspect Gnome Boxes wasnt designed to detect USB

So I figured creating a bootable disc with Discs would work.

Has anyone done this before ?

I have not tried it from a usb i usually save the iso to a file and install it in boxes from there.

1 Like

For Gnome boxes I beleive i need to run and install qemu which is now done:

Did you install using this method

No I have never needed anything special I just use boxes to check out different systems.I have not tried with mac.

Gnome boxes has limited customization and adjustment possibilities to be as easy as possible with the “usual home VMs”. I don’t know if it is intended to boot from USB sticks (or how to make it doing that) as I don’t use it. But an alternative would be to use virt-manager , which also can use QEMU and it can boot from bootable USB sticks. You can install it from the Fedora repos with sudo dnf install virt-manager.

In virt-manager, create a new VM, then choose the option “manual install” and then follow the wizard. In the end of the wizard, add the X to “customize configuration before install”. In the next window, you can adjust the hardware: Click “Add Hardware” → “USB Host Device”. Then, select the bootable USB stick and click “Finish” and then “Begin installation”.

1 Like

Thank you kindly. I tried to use QEMU to download the MacOS OS and shift the image files over to /home/solomon/.local/share/gnome-boxes/images.

Then I wrote the xml file and copied it to /home/solomon/.config/libvirt/qemu

But it wont run outside of qemu (i.e in gnome boxes). I did however get macos big sur running in qemu but I need to adjust system resource and wasn’t sure how to do that.

I will try your method so thank you.

So here in this stage do i need I would choose virtual network default ?

EDIT

Okay so I located the USB device add in area. Although my complete USB isn’t showing its a 16GB Toshiba but only a 2GB Toshiba is showing:

Then I check the drive to see if its partitioned to see if the filesystem perhaps is not recongnised but it looks okay.

is there another way to add USB ? maybe try another port I have 10 different USB ports

What exactly is the remaining problem?

If the name of the USB device is 2GB instead of 16GB, ignore it if you are sure that this is not another USB device. At the worst, remove all USB sticks and just add the one that is bootable - if that one remains, it is your bootable one. The names at this point are sometimes not very distinct.

Is your problem that it does not boot from the stick even if you added it to the hardware?

You may open your virtual machine window in virt-manager (so, click on the VM in the virt-manager), click on the second button from the left (the blue speech bubble; see my screenshot). Now you see the hardware. On one hand, you see now the USB stick, which you should have already added (e.g., USB 2008:2018 on the left menu, as in my screenshot). If you click on the USB device, you can verify that it is your stick (after clicking on it, you see the details of the USB device). So, if your stick is added, all is good. BUT: Be aware that USB may change its address (even if you use the same port). So, you may have to remove and add the USB stick again every time you plug it out/in.

After adding the stick, you have to make clear that the VM has to boot from that stick. So, go to “boot options” of the left menu and add the USB stick with a X and also, move it to the top of the options: See my screenshot. Then apply & boot.

yes correct it does not boot from disc. I cannot seem to detect the USB, I will try this method

I moved the USB to the top of the priority order, I’ll see how that goes

Edit:

Okay I added the USB to the boot order and I get this error now

According to your screenshot, it is still not in top of the list.

So, if there is anything on IDE Disk 1, it will try to use that (if there is any issue with IDE Disk 1, it might avoid the boot loader to just jump to the next option; so move it top to exclude this potential problem). Based upon your screenshot, use the arrows right of the “boot device order” twice to get USB 0930:1400 to the top, then click apply (this is important!), and then try again.

Don’t forget that any plug in / unplug of the USB stick is likely to change its address, which means that you have to remove it from the hardware list and then add it again.

If this still does not work, I would guess that the USB stick is not bootable? Can you boot on other machines from that USB stick?

Yep I tried that also earlier, I cannot test the medium as I dont have any apple devices, not sure how I could test if its bootable outside of an apple computer. I did create a bootable image with qemu and installed macos on qemu but didn’t know how to increase the resources (memory,GPU, etc)

I guess I would need to find an apple device to test this usb on. The bootable USB was made for me so I cannot verify it’s authenticity other that to say I have inspected it and it seems to have all the right files.

The other alternative I thought was to create a bootable image in “discs” as I mentioned at the top but I don’t think MacOS can run as a .img

Perhaps i need to change this to USB ?

I have no experience with apple. But their system is tailored to a limited set of hardware, unlike Fedora or Windows. I could also imagine that they implemented measures to avoid what you are doing. I still don’t understand which source you used for qemu-img (I guess this is what you have used):

You say you installed Mac on QEMU before, so why do you not use this image as it is?

If it is about tailoring the hardware of the VM: adjust the hardware / resources is easy. Go to the screen where you have the “boot options”, and on the left menu, you have “memory”, “CPUs”, and so on. Click on the respective field and customize, increase or decrease memory/cpu the way you want it.

That makes two of us, apple has never been my cup of tea, i’m just trying to test software for macos.

I had big sur running on qemu after many hours of configuration but it was very very slow. I couldn’t see any options to customise the hardware specs, it needed to add more RAM, CPU Cores and GPU acceleration but I couldn’t figure out how to do that.

I didn’t know about virtual machine program looks really cool thanks for showing me this but your right Apple does not make it easy.

I wan’t able to see those options. I guess VM’s work well with all OS’s except MacOS.

So you do not need an usb stick but just to move the image from gnome-boxes to virt-manager.

I assume you use the default user-based gnome-boxes of Fedora. If that is the case, you will find the virtual machine somewhere in

~/.local/share/libvirt
~/.config/libvirt

You have to move the VM to /var/lib/libvirt/

In the end, there should be a qcow2 file in /var/lib/libvirt/images. Then you have to sudo systemctl restart libvirt*.

If you cannot identify all VM files, it might be sufficient to just move the qcow2 file to /var/lib/libvirt/images (don’t forget sudo systemctl restart libvirt* after moving) and then, create a new VM with virt-manager.

When you configure the new VM in virt-manager, you do again “manual install”, and at the “storage” section, you do NOT “create a disk image” but instead, “select or create custom storage”. Then, you add the qcow2 file.

Changing/adjusting hardware: as elaborated above.

I have never worked with the user-based gnome-boxes, but we had some elaboration in an older thread where I gathered some insights:

Maybe some of that can help you, too.