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 732761 - VM import from system needs to update network
VM import from system needs to update network
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: wizard
3.12.x
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-05 10:33 UTC by Michael Monreal
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Config dump of original VM (3.55 KB, text/xml)
2014-07-05 10:33 UTC, Michael Monreal
Details
Config dump of imported VM (3.81 KB, text/xml)
2014-07-05 10:33 UTC, Michael Monreal
Details

Description Michael Monreal 2014-07-05 10:33:00 UTC
I tried to import a VM created on the system connection to Boxes by using the import option from Boxes' wizard. The import seems to work, the VM is listed and the file system image is copied. However, when trying to start the box I get this: 

---
Connection to "nc-centos7" failed
---

I connected to the session bus with virt-manager, the VM is listed there now, too. Trying to start it from here brings a better error message:

---
Error starting domain: Network not found: no network with matching name 'default'

Traceback (most recent call last):
  • File "/usr/share/virt-manager/virtManager/asyncjob.py", line 91 in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  • File "/usr/share/virt-manager/virtManager/asyncjob.py", line 127 in tmpcb
    callback(*args, **kwargs)
  • File "/usr/share/virt-manager/virtManager/domain.py", line 1355 in startup
    self._backend.create()
  • File "/usr/lib64/python2.7/site-packages/libvirt.py", line 708 in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Network not found: no network with matching name 'default'
---

I checked and there is not "default" network listed for the session connection. Also, the network of the imported VM was of NAT type which I guess is not supported by session connection?
Comment 1 Michael Monreal 2014-07-05 10:33:36 UTC
Created attachment 279943 [details]
Config dump of original VM
Comment 2 Michael Monreal 2014-07-05 10:33:58 UTC
Created attachment 279944 [details]
Config dump of imported VM
Comment 3 Zeeshan Ali 2014-07-08 18:45:48 UTC
Hmm.. I think we need to change the network to something session libvirt can do as part of the import.
Comment 4 Zeeshan Ali 2014-07-08 18:47:24 UTC
(In reply to comment #0)
>
> I connected to the session bus with virt-manager, the VM is listed there now,
> too. Trying to start it from here brings a better error message:

Better for you and me, not most users. :) If you don't see any errors on console either, thats a bug though.
Comment 5 Zeeshan Ali 2015-02-02 20:50:05 UTC
Fixed in master now:

commit: 367b7e3255c11ffede5537cda86f3a3bc5ed1c6e
Date:   Mon Feb 2 20:13:43 2015 +0000

    vm-configurator: Replace 'network' interface also
    
    When updating domain configs, along with replacing the user interface
    with bridge interface, also replace interface of 'network' type. This
    interface is used by system libvirt VMs and seems to be not available to
    session libvirt.
    
commit: f2e7aa8a9060ad1aed714ad9a7e21efc244d0d1d
Date:   Mon Feb 2 20:16:41 2015 +0000

    vm-creator: Private 'connection' prop now protected
    
commit: 251e2094df15dd79a1b9f0e919ee1ea448e481d9
Date:   Mon Feb 2 20:17:36 2015 +0000

    libvirt-system-vm-importer: Update domain config on import
    
    Lets ensure that box looks as much like other normal local boxes as
    possible after import from system broker.
    
    At least this fixes the issue of imported boxes not starting up due to
    domain using a network interface not available to session libvirt.