Page 1 of 2

[SOLVED] Gnome Box - Box setup failed

Posted: Sat Dec 21, 2019 1:01 pm
by Buck Fankers
=============================
SOLUTION: install also qemu-utils
=============================
MX19, 64

I installed:

Code: Select all

gnome-boxes
qemu-kvm
spice-webdavd
spice-vdagent was already installed
I added user to kvm. Gnome-boxses runs, but I can't install any iso/image. Even tried to install it by downloading through gnome-boxes, image got downloaded but then I got the same error: "Box setup failed"

gnome-boxes --checks returns:

Code: Select all

(gnome-boxes:5230): Boxes-WARNING **: 09:40:23.406: util-app.vala:270: Failed to execute child process ?virsh? (No such file or directory)
(gnome-boxes:5230): Boxes-WARNING **: 09:40:23.407: util-app.vala:250: Failed to execute child process ?restorecon? (No such file or directory)

• The CPU is capable of virtualization: yes
• The KVM module is loaded: yes
• Libvirt KVM guest available: no
• Boxes storage pool available: no
Anyone happens to know, what library I may be missing or what else I could do?

Before Gnome-boxes install I did check BIOS (newer, 2017)
- Intel Virtualization Tech was enabled
- Intel VT-D tech was disabled, I enabled this one also.

I didn't find any other virtual related stuff such as "vm-d" or "iommu". CPU and bios are not too old, I would guess this computer should be able to support virtualization stuff.

Edit: restarted computer, switched kernel from 5.4.0-1.1-liquorix to 4.19, didn't help

Inxi:

Code: Select all

System:    Host: mx Kernel: 5.4.0-1.1-liquorix-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0 
           parameters: audit=0 BOOT_IMAGE=/boot/vmlinuz-5.4.0-1.1-liquorix-amd64 
           root=UUID=1f47aad0-5e59-4f43-873b-ec60649ef805 ro 
           Desktop: Xfce 4.14.1 tk: Gtk 3.24.5 info: xfce4-panel wm: xfwm4 dm: LightDM 1.26.0 
           Distro: MX-19_x64 patito feo October 21  2019 base: Debian GNU/Linux 10 (buster) 
Machine:   Type: Desktop System: MSI product: MS-7A70 v: 1.0 serial: <filter> 
           Mobo: MSI model: B250M BAZOOKA (MS-7A70) v: 1.0 serial: <filter> 
           UEFI: American Megatrends v: 1.70 date: 07/03/2018 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse B330/M330/M331 
           serial: <filter> charge: 55% (should be ignored) rechargeable: yes 
           status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i5-7400 bits: 64 type: MCP arch: Kaby Lake 
           family: 6 model-id: 9E (158) stepping: 9 microcode: CA L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 24000 
           Speed: 3314 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 3343 2: 3394 3: 3388 
           4: 3432 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           Type: mds mitigation: Clear CPU buffers; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, 
           STIBP: disabled, RSB filling 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel HD Graphics 630 vendor: Micro-Star MSI driver: i915 v: kernel 
           bus ID: 00:02.0 chip ID: 8086:5912 
           Display: x11 server: X.Org 1.20.4 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2) v: 4.5 Mesa 18.3.6 
           compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel 200 Series PCH HD Audio vendor: Micro-Star MSI driver: snd_hda_intel 
           v: kernel bus ID: 00:1f.3 chip ID: 8086:a2f0 
           Sound Server: ALSA v: k5.4.0-1.1-liquorix-amd64 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
           vendor: Micro-Star MSI driver: r8169 v: kernel port: e000 bus ID: 01:00.0 
           chip ID: 10ec:8168 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 2.96 TiB used: 1.27 TiB (42.9%) 
           ID-1: /dev/sda vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB block size: 
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 023 scheme: GPT 
           ID-2: /dev/sdb vendor: Western Digital model: WD20EZRZ-00Z5HB0 size: 1.82 TiB 
           block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm 
           serial: <filter> rev: 0A80 scheme: MBR 
           ID-3: /dev/sdc vendor: Seagate model: ST500DM002-1BD142 size: 465.76 GiB block size: 
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> 
           rev: HP73 scheme: MBR 
           ID-4: /dev/sdd vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB block size: 
           physical: 512 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 2B6Q scheme: MBR 
Partition: ID-1: / raw size: 32.23 GiB size: 31.47 GiB (97.65%) used: 18.49 GiB (58.8%) fs: ext4 
           dev: /dev/sda3 
           ID-2: swap-1 size: 2.05 GiB used: 0 KiB (0.0%) fs: swap swappiness: 15 (default 60) 
           cache pressure: 100 (default) dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 33.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/antix.list 
           1: deb http://la.mxrepo.com/antix/buster/ buster main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian buster-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian buster main contrib non-free
           2: deb http://deb.debian.org/debian-security buster/updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mxrepo.com/mx/repo/ buster main non-free
           No active apt repos in: /etc/apt/sources.list.d/sublime-text.list 
           No active apt repos in: /etc/apt/sources.list.d/various.list 
           Active apt repos in: /etc/apt/sources.list.d/vivaldi.list 
           1: deb http://repo.vivaldi.com/stable/deb/ stable main
           No active apt repos in: /etc/apt/sources.list.d/vscodium.list 
Info:      Processes: 236 Uptime: 1h 27m Memory: 15.54 GiB used: 2.41 GiB (15.5%) Init: SysVinit 
           v: 2.93 runlevel: 5 default: 5 Compilers: gcc: 8.3.0 alt: 8 Shell: bash v: 5.0.3 
           running in: quick-system-in inxi: 3.0.36 

Re: Gnome Box - Box setup failed

Posted: Sat Dec 21, 2019 1:12 pm
by Head_on_a_Stick
Perhaps you're missing some recommended packages, try

Code: Select all

sudo apt reinstall --install-recommends gnome-boxes qemu-kvm
The SPICE packages are only needed in the guest btw.

I only needed to install the gnome-boxes package but I use Debian stable (with Recommends enabled) with the GNOME desktop and QEMU/KVM was already setup for command-line use.

Re: Gnome Box - Box setup failed

Posted: Sat Dec 21, 2019 1:31 pm
by Buck Fankers
Head_on_a_Stick wrote: Sat Dec 21, 2019 1:12 pm Perhaps you're missing some recommended packages, try

Code: Select all

sudo apt reinstall --install-recommends gnome-boxes qemu-kvm
I installed them (thank you!) but unfortunately didn't make a difference. I even tried with systemd :eek: same thing

Next I'm planning to install MX19 on another partition and without any tweaking or installing anything else I will install gnome-box first. Let's see if that works.

Re: Gnome Box - Box setup failed

Posted: Sat Dec 21, 2019 10:11 pm
by Buck Fankers
Fresh install MX19_64. Didn't do any changes, I only updated the system. Then I installed:

gnome-boxes
qemu-kvm

I ran gnome-boxes and as before, it runs but when I try to load iso (used same original MX19_64) I get the same error: "Box setup failed"

Did anyone managed to get gnome-boxes working on MX19?

Re: Gnome Box - Box setup failed

Posted: Sun Dec 22, 2019 1:54 am
by JayM
Run gnome-boxes in a terminal. The output should give you a clue as to what else might be needed. (hint: qemu, qemu-kvn, qemu-utils then reboot.)

Re: Gnome Box - Box setup failed

Posted: Sun Dec 22, 2019 8:24 am
by Buck Fankers
JayM wrote: Sun Dec 22, 2019 1:54 am Run gnome-boxes in a terminal. The output should give you a clue as to what else might be needed. (hint: qemu, qemu-kvn, qemu-utils then reboot.)
Thank you! I don't know why I didn't think of the terminal. Probably, because gnome-boxes does starts and run. Error did help, missing was qemu-img. I didn't find it in MXPI but I tried with qemu-utils and it worked. Thanks for the help!

Edit: well yeah, no wonder since "aptitude show qemu-utils" outputs:

This package provides QEMU related utilities:
* qemu-img: QEMU disk image utility
* qemu-io: QEMU disk exerciser
* qemu-nbd: QEMU disk network block device server

I need to start learning and using these aptitude tools!

Re: Gnome Box - Box setup failed

Posted: Sun Dec 22, 2019 9:03 am
by Head_on_a_Stick
Buck Fankers wrote: Sun Dec 22, 2019 8:24 am I tried with qemu-utils and it worked.

Code: Select all

empty@E485:~ $ aptitude why qemu-utils                                               
i   qemu-system-x86 Recommends qemu-utils
empty@E485:~ $
It wasn't installed because MX disables Recommends by default (unlike Debian). Change that behaviour by editing /etc/apt/apt.conf and change the second line to

Code: Select all

APT::Install-Recommends "1";
But be aware that this will result in some extra packages being installed at the next upgrade.

EDIT: actually just deleting the Install-Recommends line should do the trick because it is enabled by default.

EDIT2: or just delete the whole file because it also disables Suggests but they are already disabled by default...

Re: Gnome Box - Box setup failed

Posted: Sun Dec 22, 2019 9:46 am
by Buck Fankers
Head_on_a_Stick wrote: Sun Dec 22, 2019 9:03 am
It wasn't installed because MX disables Recommends by default (unlike Debian).

EDIT: actually just deleting the Install-Recommends line should do the trick because it is enabled by default.
EDIT2: or just delete the whole file because it also disables Suggests but they are already disabled by default...
Ahh, I see, will do, thank you!

I will ask you one more Q, since you are using gnome-boxes. Default place for installed images is:

Code: Select all

 ~/.local/share/gnome-boxes/images/
Can this be changed and if so, how? (my home is not that big)

I only found two gnome-boxes files:

Code: Select all

~/.config/gnome-boxes/QEMU Session
~/.config/gnome-boxes/unattended/setup-data.conf
Neither of the two looks like good config candidate. Well maybe a first one?
Do you happen to know which file I need to edit and what to enter to have installed images stored into different partition if this is possible?

Re: Gnome Box - Box setup failed

Posted: Sun Dec 22, 2019 10:00 am
by Head_on_a_Stick
Buck Fankers wrote: Sun Dec 22, 2019 9:46 am Default place for installed images is:

Code: Select all

 ~/.local/share/gnome-boxes/images/
Can this be changed and if so, how?
Either mount ~/.local/share/gnome-boxes/images on another partition (using /etc/fstab) or start gnome-boxes like this:

Code: Select all

XDG_DATA_HOME='/data' gnome-boxes
^ That example will cause it to save them to /data/gnome-boxes/images/, adjust the path to match your storage device.

To change the menu launch command copy the desktop file to $HOME then edit it:

Code: Select all

mkdir -p ~/.local/share/applications
cp /usr/share/applications/org.gnome.Boxes.desktop ~/.local/share/applications/
editor ~/.local/share/applications/org.gnome.Boxes.desktop
Change the "Exec=" line to this:

Code: Select all

Exec=sh -c "XDG_DATA_HOME='data' gnome-boxes"
Then move your disk images to the new location and log out & back in again.

Re: Gnome Box - Box setup failed

Posted: Sun Dec 22, 2019 11:10 am
by Buck Fankers
Head_on_a_Stick wrote: Sun Dec 22, 2019 10:00 am
Buck Fankers wrote: Sun Dec 22, 2019 9:46 am Default place for installed images is:

Code: Select all

 ~/.local/share/gnome-boxes/images/
Can this be changed and if so, how?
Either mount ~/.local/share/gnome-boxes/images on another partition (using /etc/fstab) or start gnome-boxes like this:

Code: Select all

XDG_DATA_HOME='/data' gnome-boxes
^ That example will cause it to save them to /data/gnome-boxes/images/, adjust the path to match your storage device.
...
Cool, will give it a try, thank you very much!!!