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 677691 - Ability to export and import boxes
Ability to export and import boxes
Status: RESOLVED OBSOLETE
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
: 677692 (view as bug list)
Depends on: 723008
Blocks: 696727
 
 
Reported: 2012-06-08 10:32 UTC by Christophe Fergeau
Modified: 2018-07-11 19:37 UTC
See Also:
GNOME target: ---
GNOME version: 3.13/3.14



Description Christophe Fergeau 2012-06-08 10:32:38 UTC
After creating a Box, it would be nice to be able to export it so that it can be shared with others, reused on another computer, ...
Comment 1 Marc-Andre Lureau 2012-06-08 12:45:16 UTC
We have a SoC working on this. I am not sure that bug is the best way to track the feature progress.
Comment 2 Zeeshan Ali 2012-06-08 13:45:58 UTC
(In reply to comment #1)
> We have a SoC working on this. I am not sure that bug is the best way to track
> the feature progress.

1. We still don't have the UI design for it.
2. The SoC student in question can use this bug to submit her patches.
Comment 3 Zeeshan Ali 2012-06-20 23:43:56 UTC
*** Bug 677692 has been marked as a duplicate of this bug. ***
Comment 4 Jakub Steiner 2012-06-25 16:31:39 UTC
I've set up a design stub for this at https://live.gnome.org/Design/Apps/Boxes/ImportExport
Comment 5 Jovanka 2012-06-29 01:11:47 UTC
Here is what I think we can do now:
https://www.dropbox.com/s/z6me8rcds55yzxr/design.png
and then add import/export to the menu. (sorry for the bad lighting)
Basically it's the same design, but as we develop the features we can add more options to this button.
Comment 6 Christophe Fergeau 2012-06-29 07:55:55 UTC
The 'import' part seems different in jimmac's mockups (you double click on a file with the right mime type in Nautilus, or click on a link with the same mime type in Web and it automatically gets imported), but a simple load/save menu works for me, once this is working the UI can be refined as you suggest.
Comment 7 Zeeshan Ali 2012-06-29 15:38:22 UTC
(In reply to comment #5)
> Here is what I think we can do now:
> https://www.dropbox.com/s/z6me8rcds55yzxr/design.png
> and then add import/export to the menu. (sorry for the bad lighting)
> Basically it's the same design, but as we develop the features we can add more
> options to this button.

One big difference is that you are thinking of using 'dialog' for notification. You want to use the internal notificationbar instead. Also I don't think we need step 4: message dialog. The reason for failure will most probably be some lower-level details that user must not be exposed to. Instead we should try our best to ensure things just work (TM) and simply inform the user about success or failure using the notificationbar. Other than that, looks good as starting-point.
Comment 8 Zeeshan Ali 2012-06-29 15:39:56 UTC
Oh but we still want to spit the details of the error to the console as a critical/warning so when things go wrong, we can ask bug reporters for console log and be able to figure whats going on..
Comment 9 kxra 2013-04-02 04:45:27 UTC
Does this also cover importing virtual machines from Virtual Machine Manager?
Comment 10 Zeeshan Ali 2013-04-02 14:07:19 UTC
(In reply to comment #9)
> Does this also cover importing virtual machines from Virtual Machine Manager?

That just uses a different location/connection of libvirt so that needs a different kind of handling: https://bugzilla.gnome.org/show_bug.cgi?id=677691
Comment 11 kxra 2013-04-02 14:13:31 UTC
Did you mean to link to a different bug?
Comment 12 Zeeshan Ali 2013-04-02 15:04:36 UTC
(In reply to comment #11)
> Did you mean to link to a different bug?

Yeah. :) bug#666185
Comment 13 Zeeshan Ali 2013-05-06 14:30:46 UTC
Should have updated this bug with some conclusions we (Me and Jovanka) came-up with last year after discussion with libvirt folks:

http://www.redhat.com/archives/libvir-list/2012-July/msg00127.html

* Ditch the idea of saving/restoring state (at least for the first implementation).
* Create a file format where we can store both storage and (host-agnostic) parts of the domain configuration. One idea would be to have a tar file with custom extension (e.g .boxes).
* The 'import' process would then involve Boxes creating a new VM (like we currently do in wizard) but base the configuration on the host-agnostic configuration in .boxes file.
* We can copy the contents to a new disk *after* creating the VM and show an 'Importing..' message under the VM during the copying (later we can add a progressbar like the one shown in mockups for installing[1]).
* We also probably want to ditch the special 'import' button as we can simply reuse wizard here. That way, user can even modify the props of the VM before creation/launch.

[1] https://github.com/gnome-design-team/gnome-mockups/raw/master/boxes/boxes-install6.png
Comment 14 Atul Jangra 2013-05-15 08:58:44 UTC
Thanks for the update Zeeshan. It is really useful. I'm researching on the new model.
Comment 15 Matthias Clasen 2013-10-16 16:34:19 UTC
We've discussed this some more at the Montreal summit.

Conclusions:
- should support ovf file format
- import is mostly ok
- export: put a button on the selection toolbar, probably pop up a file chooser to select location
   maybe interesting:
   - write directly to a usb stick (?)
   - upload directly to cloud
Comment 16 Allan Day 2014-02-25 17:50:28 UTC
Seems like comment 15 provides a design for the near future. Removing the ui-review keyword.
Comment 17 Federico Bruni 2015-09-22 12:01:37 UTC
ATM 'git grep import help/C' returns only this stub page:
https://git.gnome.org/browse/gnome-boxes/tree/help/C/import-images.page.stub

Until this feature is missing, it would be nice to have some instructions on how to "manually import" an existing box into a new, clean installation.

I've just been helped on IRC and I found out that copying ~/.local/share/gnome-boxes/images is not enough. You must copy also ~/.config/libvirt/qemu/*.xml file(s).
Comment 18 Christophe Fergeau 2015-09-22 12:12:47 UTC
(In reply to Federico Bruni from comment #17)
> You must copy also ~/.config/libvirt/qemu/*.xml file(s).

No you must not, you should use virsh dumpxml/virsh define. I pointed you at ~/.config/libvirt/qemu/*.xml as you only had a backup for your home, but you should have used virsh define on the new machine.
Comment 19 Zeeshan Ali 2015-09-22 12:36:43 UTC
(In reply to Federico Bruni from comment #17)
> ATM 'git grep import help/C' returns only this stub page:
> https://git.gnome.org/browse/gnome-boxes/tree/help/C/import-images.page.stub
> 
> Until this feature is missing, it would be nice to have some instructions on
> how to "manually import" an existing box into a new, clean installation.

That would involve exposing users to commandlines etc. Those instructions are for import of images shared by other people, as just disk images. Supporting that is as far as I'm willing to go, until we have this feature implemented.
Comment 20 Zeeshan Ali 2016-01-20 19:12:36 UTC
*** Bug 760890 has been marked as a duplicate of this bug. ***
Comment 21 GNOME Infrastructure Team 2018-01-11 09:53:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-boxes/issues/7.