After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668536 - Hangs at Analyzing installer media: "storage pool is not active"
Hangs at Analyzing installer media: "storage pool is not active"
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-01-23 21:24 UTC by Thomas Andersen
Modified: 2016-03-31 14:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make sure VM image dir exists (1.04 KB, patch)
2012-02-01 14:24 UTC, Christophe Fergeau
committed Details | Review
vm-configurator: Don't create pool directory (1.11 KB, patch)
2015-07-15 12:15 UTC, Zeeshan Ali
none Details | Review

Description Thomas Andersen 2012-01-23 21:24:53 UTC
When I start boxes I get this warning:
Boxes-WARNING **: app.vala:164: Unable to refresh storage pool: Requested operation is not valid: storage pool is not active

Later when selecting an F16 live iso (I tried both i686 and x86_64) it hangs at "Analyzing installer media" with these:
GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed
Boxes-WARNING **: wizard.vala:136: Failed to create volume: Requested operation is not valid: storage pool is not active
Comment 1 Zeeshan Ali 2012-01-24 05:04:21 UTC
(In reply to comment #0)
> When I start boxes I get this warning:
> Boxes-WARNING **: app.vala:164: Unable to refresh storage pool: Requested
> operation is not valid: storage pool is not active

Weird, I just undefined the default pool here to be able to reproduce this issue but no luck. :(
Comment 2 Zeeshan Ali 2012-01-24 05:05:01 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > When I start boxes I get this warning:
> > Boxes-WARNING **: app.vala:164: Unable to refresh storage pool: Requested
> > operation is not valid: storage pool is not active
> 
> Weird, I just undefined the default pool here to be able to reproduce this
> issue but no luck. :(

Just to be clear: default pool == gnome-boxes pool that boxes create.
Comment 3 Thomas Andersen 2012-01-24 18:57:06 UTC
Just let me know if there is anything you want me to test here. Or I could just hand you the computer at fosdem :)

The computer is a x86_64 F16. I have previously attempted to compile boxes and deps with jhbuild but I never got boxes to function then either.

I am of course not testing the packaged version from a jhbuild shell or anything like that.
Comment 4 Christophe Fergeau 2012-01-25 14:07:48 UTC
What does "virsh -c qemu:///session pool-list" return?
Comment 5 Thomas Andersen 2012-01-25 16:43:41 UTC
[thomas@mosegris ~]$ virsh -c qemu:///session pool-list
Name                 State      Autostart 
-----------------------------------------
Comment 6 Christophe Fergeau 2012-01-25 16:44:52 UTC
Even after running gnome-boxes and getting this error?
Comment 7 Thomas Andersen 2012-01-25 16:50:52 UTC
yes.

Full output:
[thomas@mosegris ~]$ gnome-boxes&
[1] 2205
[thomas@mosegris ~]$ Gtk-Message: Failed to load module "pk-gtk-module"

Boxes-WARNING **: app.vala:164: Unable to refresh storage pool: Requested operation is not valid: storage pool is not active

Clutter-WARNING **: The actor 'ClutterBox' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended

Gtk-WARNING **: GtkClutterEmbed 0x1e54850 is mapped but visible child GtkClutterOffscreen 0x1e84ca0 is not mapped

Gtk-WARNING **: GtkClutterEmbed 0x1e54850 is mapped but visible child GtkClutterOffscreen 0x1e84bc0 is not mapped

Clutter-WARNING **: The actor 'ClutterBox' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended

Clutter-WARNING **: The actor 'ClutterBox' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended

GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

Boxes-WARNING **: wizard.vala:136: Failed to create volume: Requested operation is not valid: storage pool is not active
virsh -c qemu:///session pool-list
Name                 State      Autostart 
-----------------------------------------
Comment 8 Christophe Fergeau 2012-01-25 17:37:33 UTC
Hmm this would indicate that Boxes fails to create the storage pool for some reason...
If you run libvirtd by hand, are there any hints as to what's going on?
killall libvirtd; libvirtd --verbose
then start gnome-boxes and see if there's anything relevant in the log
Comment 9 Thomas Andersen 2012-01-25 19:07:16 UTC
[thomas@mosegris ~]$ which libvirtd 
/usr/sbin/libvirtd
[thomas@mosegris ~]$ libvirtd --version
libvirtd (libvirt) 0.9.9
[thomas@mosegris ~]$ libvirtd --verbose


That is all I get. I started boxes in another terminal and still get the same output. No output from libvirtd what so ever.
Comment 10 Christophe Fergeau 2012-01-25 19:36:43 UTC
export LIBVIRT_DEBUG=1
export LIBVIRT_LOG_OUTPUTS="1:file:virsh.log"
(see http://libvirt.org/logging.html )
before running libvirtd should provide an awful lot of debug in virsh,log. Hopefully there will be something useful in there
Comment 11 Andreas Proschofsky 2012-02-01 10:09:16 UTC
I get the same problem here, so I thought I'd try the debugging stuff and here's the output:

2012-02-01 09:58:23.982+0000: 29939: info : libvirt version: 0.9.8
2012-02-01 09:58:23.982+0000: 29939: warning : virGetHostname:1995 : getaddrinfo failed for 'boing': Name or service not known
2012-02-01 09:58:23.982+0000: 29939: info : libvirt version: 0.9.8
2012-02-01 09:58:23.982+0000: 29939: warning : virGetHostname:1995 : getaddrinfo failed for 'boing': Name or service not known
2012-02-01 09:58:24.026+0000: 29950: info : libvirt version: 0.9.8
2012-02-01 09:58:24.026+0000: 29950: info : qemudStartup:561 : Unable to create cgroup for driver: Permission denied
2012-02-01 09:58:24.026+0000: 29950: info : qemudLoadDriverConfig:125 : Could not read qemu config file /home/xyz/.libvirt/qemu.conf
2012-02-01 09:58:24.375+0000: 29950: info : virDomainLoadAllConfigs:11884 : Scanning for configs in /home/xyz/.libvirt/qemu/run
2012-02-01 09:58:24.375+0000: 29950: info : virDomainLoadAllConfigs:11884 : Scanning for configs in /home/xyz/.libvirt/qemu
2012-02-01 09:58:24.375+0000: 29950: info : lxcStartup:2423 : Not running privileged, disabling driver
2012-02-01 09:58:27.127+0000: 29940: debug : storagePoolRefresh:892 : Requested operation is not valid: storage pool is not active
2012-02-01 09:58:39.841+0000: 29941: debug : storageVolumeCreateXML:1309 : Requested operation is not valid: storage pool is not active
2012-02-01 09:58:43.719+0000: 29939: error : virNetSocketReadWire:996 : End of file while reading data: Input/output error


btw, when running gnome-boxes as root I get a different error message (but image creation still doesn't work)

Boxes-WARNING **: wizard.vala:136: Failed to create storage pool: invalid connection pointer in virStoragePoolDefineXML
Comment 12 Christophe Fergeau 2012-02-01 12:56:38 UTC
What is the output of "virsh pool-list --all" (forgot the "--all" argument initally :-/ )
If it contains a pool for gnome-boxes, can you try virsh pool-start POOLNAME and virsh pool-refresh POOLNAME and put the output here?
Comment 13 Andreas Proschofsky 2012-02-01 13:10:32 UTC
I guess that nails the problem:

virsh pool-start gnome-boxes
error: Failed to start pool gnome-boxes
error: cannot open path '/home/xyz/.config/gnome-boxes/images': No such file or directory

After manually creating that dir gnome-boxes works just fine.
Comment 14 Zeeshan Ali 2012-02-01 14:11:08 UTC
(In reply to comment #13)
> I guess that nails the problem:
> 
> virsh pool-start gnome-boxes
> error: Failed to start pool gnome-boxes
> error: cannot open path '/home/xyz/.config/gnome-boxes/images': No such file or
> directory
> 
> After manually creating that dir gnome-boxes works just fine.

That is weird. Could you try deleting '/home/xyz/.config/gnome-boxes' and trying again? If that still works, you didn't have a '.config' dir in your home dir and that would mean an unusual (non-freedesktop-compliant) and therefore unsupported environment. Otherwise, for some reason boxes failed to create the 'images' dir.
Comment 15 Christophe Fergeau 2012-02-01 14:24:22 UTC
Created attachment 206573 [details] [review]
Make sure VM image dir exists

When moving the VM image directory to XDG_CONFIG_DIR, I removed an
ensure_directory() call that should have been kept. This results in
the 'images' subdirectory of XDG_CONFIG_DIR/gnome-boxes not being
created, which then causes VM creation failures on "new" systems.
This should fix bug #668536.
Comment 16 Marc-Andre Lureau 2012-02-01 14:32:42 UTC
Review of attachment 206573 [details] [review]:

ack
Comment 17 Christophe Fergeau 2012-02-01 14:57:47 UTC
Attachment 206573 [details] pushed as c2a77d2 - Make sure VM image dir exists
Comment 18 Christian Stadelmann 2012-08-24 11:04:54 UTC
I am not sure this problem is really fixed. I got some errors "storage pool is not active" with gnome-boxes 3.4.3 (from Fedora 17, fedora-updates repository) today. I manually created '/home/xyz/.config/gnome-boxes/images', which did possibly fix the problem, but not reproductible. After starting gnome-boxes multiple times and trying to create a new box from an image it suddenly worked.

After deleting gnome-boxes data from by
rm -r /home/xyz/.config/gnome-boxes
rm -r /home/xyz/.local/share/gnome-boxes/
the problem is there again. Output from gnome-boxes:
==================
gnome-boxes

(gnome-boxes:12093): Boxes-WARNING **: app.vala:184: Unable to refresh storage pool: Requested operation is not valid: storage pool is not active

(gnome-boxes:12093): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(gnome-boxes:12093): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(gnome-boxes:12093): Boxes-WARNING **: wizard.vala:154: Failed to create volume: Requested operation is not valid: storage pool is not active

(gnome-boxes:12093): Clutter-WARNING **: The actor 'ClutterBox' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended

==========
I can not reproduce gnome-boxes working atm. Can anyone check that please?
Comment 19 Zeeshan Ali 2012-08-24 11:11:56 UTC
(In reply to comment #18)
> I am not sure this problem is really fixed. I got some errors "storage pool is
> not active" with gnome-boxes 3.4.3 (from Fedora 17, fedora-updates repository)
> today. I manually created '/home/xyz/.config/gnome-boxes/images', which did
> possibly fix the problem, but not reproductible. After starting gnome-boxes
> multiple times and trying to create a new box from an image it suddenly worked.
> 
> After deleting gnome-boxes data from by
> rm -r /home/xyz/.config/gnome-boxes
> rm -r /home/xyz/.local/share/gnome-boxes/

Why exactly would you need to do that in the first place?
Comment 20 Christian Stadelmann 2012-08-24 11:20:25 UTC
I wanted to restore the initial state (by deleting all gnome-boxes data) to try how to reproduce it.
Comment 21 Zeeshan Ali 2012-08-24 11:39:32 UTC
(In reply to comment #20)
> I wanted to restore the initial state (by deleting all gnome-boxes data) to try
> how to reproduce it.

In that case you should also do `virsh pool-destroy gnome-boxes && virsh pool-undefine gnome-boxes`.
Comment 22 Zeeshan Ali 2015-07-15 12:15:00 UTC
Seems this bug is back again, this time for the opposite reason: libvirt bails out on building the pool if underlying directory already exists. :(
Comment 23 Zeeshan Ali 2015-07-15 12:15:18 UTC
Created attachment 307471 [details] [review]
vm-configurator: Don't create pool directory

Seems latest libvirt errors out on building the storage pool building if
underlying directory already exists. This patch basically reverts commit
c2a77d21, which we shouldn't need anymore any way since we have code that
handles the situation of user moving or removing the directory in
VMCreator.get_storage_pool().
Comment 24 Zeeshan Ali 2015-07-15 12:20:49 UTC
Nm, symptoms are different so created another bug for this new issue: bug#752417.