Menu

#102 spice client disconnect during migration

v.1.2.0_rc10
open-fixed
None
VM-Manager
9
2013-02-18
2012-06-29
No

Spice clients get disconnected when doing a migration.

Using the spicec spice client, one gets the following on our test installation:
Warning: cannot resolve host address foss-cloud-node-01.int.foss-cloud.org

Which illustrates the problem: when doing the migration libvirt sends the client the migration target as the new spice server but since the migration works over the internal network segment, the client can't handle that address since it only connects via the public network segment and fails.

Discussion

  • Tiziano Müller

    Tiziano Müller - 2012-06-29

    Libvirt would return an appropriate address if one would be specified in the XML.

    This is how the graphics element should look like:

    <graphics type='spice' port='5902' autoport='no' passwd='XXXXXXXXXX'>
    <listen type='network' address='public'/>
    </graphics>

    where public must be the network defined in libvirt. That way libvirt is supposed to lookup the destination IP/Address and return the proper address to the client during migration.

    Currently, it looks like this:

    <graphics type='spice' port='5902' autoport='no' listen='0.0.0.0' passwd='XXXXXXXXXX'>
    <listen type='address' address='0.0.0.0'/>
    </graphics>

    What we have to do:

    1) specify networks in libvirt
    2) change the XML listen spec for the graphics port

     
  • Beat Stebler

    Beat Stebler - 2013-01-29
    • milestone: --> v.1.2.0_rc10
    • component: --> Spice-Client
     
  • Beat Stebler

    Beat Stebler - 2013-02-14
    • priority: 5 --> 9
     
  • Tiziano Müller

    Tiziano Müller - 2013-02-15
    • assigned_to: Tiziano Müller --> Christian Wittkowski
    • component: Spice-Client --> VM-Manager
     
  • Tiziano Müller

    Tiziano Müller - 2013-02-15

    With the introduction of libvirt_migrate_to_uri2 we should be able to explicitly specify the interface/ip on which the spice server is listening.

    What's todo:

    1) Currently we are setting the wildcard address '0.0.0.0' to listen on all interfaces:

    <graphics type='spice' port='5913' autoport='no'>
        <listen type='address' address='0.0.0.0'/>
    </graphics>
    

    This should be changed: always use the IP of the public interface of the vm-node instead:

    <graphics type='spice' port='5913' listen='192.168.140.13' autoport='no'>
        <listen type='address' address='192.168.140.13'/>
    </graphics>
    

    Please be aware of the roadmap: with the introduction of libvirt-based netfilter (or openflow) rules, libvirt will have a notion of networks and we may want to change the listen-element to:

        <listen type='network' network='public'/>
    

    and have libvirt figure out the IP itself.
    But for now: use the address attribute.

    2) On a migration you should use migrate_to_uri2 with an update XML (based on the one from the currently running VM, not a re-generated from the LDAP) where the addresses and the port is adjusted.

    The same must be done in the daemon for the auto-balancing migration.

     
  • Christian Wittkowski

    Question to 2)
    At the moment only the port will be changed.
    Now also the listen attribute should be replaced.

    What's about the password attribute that is generated in the original XML at VM creation?

     
  • Tiziano Müller

    Tiziano Müller - 2013-02-15

    The password attribute must remain the same.

    In the future: We will probably switch to authentication via SASL to be able to provide proper session passwords. At that point there will be no password anymore in the XML.

     
  • Christian Wittkowski

    • status: open --> open-fixed
     

Log in to post a comment.