Trials and tribulations with Gnome-boxes

 So I installed the gnome-boxes package on my Linux laptop with the intention to run Windows 10.  It was said to be easy and straightforward, and I had actually run a very similar program on OS X to run Windows ARM on my M1 Mac.

 I selected 4GB or RAM and a 40GB disk to start, assuming that in this day and age it would be fairly easy to upgrade this later.

Windows 10 installed easily, and the performance was not bad, but I ran into three issues:

1. The Web cam didn't work, and the interface of gnome-boxes is, let's say *too* simple, in that there seems to be no easy way to connect USB devices, and no web cam specific option either.

2. Even after installing the Japanese IME, the physical keyboard layout seemed to still be set to a US keyboard layout.  This seems to be a recurring theme with Mac OS as well, and there is never any easy way to fix it.  I searched online to find out where to change the keyboard layout, but the referenced setting just doesn't exist at all in my Windows Settings.

3. Of course 40GB turned out to not be enough, as suddenly I had 0 bytes free.  I managed to run system disk cleanup and delete about 5GB of Windows update files, but that still left me with less free space than I would have liked.

For #3, I went into "Properties" and changed the size form 40gb to 80gb, and rebooted Windows.  I went into Disk Management, and nothing had changed. 

Okay then, I will shut down Windows completely and restart it.  Still 40gb.

I quit Boxes, and restarted it, and checked the size in the properties panel, it had gone back to 40gb.  I tried this several times, with no change - so apparently the disk size slider is only there as a placebo?  If it can't actually be changed, then why is it not grayed out?

Then I began by google searches.  The first post I found was about using virt-resize, but I needed to find where the virtual disk image actually lived.  The posts on the internet were wrong about this, presumably because my gnome-boxes was installed from flatpack instead of deb.  Once I did find the proper directory, I found that virt-resize didn't actually work, as it gave many strange errors.  

Next I found qemu-img.  I tried to use this tool, only to find that images with snapshots can't be resized.  Of course not, that would be too easy.  I ran the snapshot -l sub-command and discovered there were 3 snapshots, despite boxes saying there were none.  I tried to delete the first snapshot, but received an error message that snapshot "1" could not be found.

I ended up using the DD command to create a new QEMU image (which took quite come time and seemed to create a raw image), followed by the resize command to expand it, and editing the XML file in boxes to reference the new file and type.    

Here I have to note on the flawed philosophy of Gnome developers that seems not to have changed in 20 years.  Making something simple by crippling the interface is not actually simple, because as soon as you need to do something, it becomes impossible or very difficult.  Asking an end user to drop to the command line or edit XML files should not be standard procedure for something as common as resizing a disk.  I personally have no problem doing these things, but I certainly wouldn't recommend Boxes over VMWare workstation or Virtualbox for anyone who did.  

I remember a similar situation "back in the day" when options started disappearing from the gnome control panel, and you had to use the botched abortion of a registry editor instead, because, you know, that is "easier".  

Even in OS X, you can right click on a file in iTunes or similar and find out the location in the filesystem - but there is no option for that in Gnome-Boxes (though I did discover later on that you can find the file name in the XML file which is surprisingly the full path in the host file system even for flatpack installed boxes).  

Saving the XML was also buggy, as the changes I had made were summarily reverted, along with the display of an error message to the effect that a snapshot could not be created.  I didn't ask for a snapshot, but.. whatever.  I made the changed and saved again and this time it took.  Why reject on the first try and accept on the second try?  No idea.  

I tried to start the VM, but no luck... the spinning eye icon just displayed indefinitely.  

I assumed the file might be botched, and I read the qemu manual again.  This time I used the CONVERT command to create a new disk image with the same qcow2 format as the original, and once that was complete, I used the resize subcommand again to reside to 80gb.  

I feel that the biggest overall problem with Boxes is the same problem with the Gnome philosophy in general - they want to make it to simple and easy that they leave out options that users actually need.  Then, in order to actually use those options, you need to resort to hacking from the command-line which is involves more research and is more dangerous for the average end user.  

I remember this all the way back in the early 2000s.  Some option (sat.. the ability to set icon size in Nautilus)  would be removed from Gnome, and in order to re-enable it, I had to search on forums for the correct setting to change in the Gnome-settings-daemon or whatever it was called.  That's not what I call ease of use.  

---

Finally, with Boxes, I found out that host USB devices can be connected to the guest as a standard feature, as it is documented on the official Boxes site, but I had to search around random sites again to find out that this option isn't supported on FlatPack.  I can understand why that is, but it would be nice to have that be mentioned in the FlatHub decription so that users would know that beforethey install Boxes and go through the hassle of installing a VM only to find out that they need to manually migrate their VM to the package manager version of Boxes in order to use USB device mapping.  


Comments

Popular Posts