Xen-Manager list generation

  • Piergiorgio Andreani

    Maybe I've discovered another interesting issue in


    On line 222 I see:

    222   // skip Name and dom0 entry
    223                                   $loop++;
    224                                   if ($loop > 2) {

    This is (teorically) to avoid dom0 entry appear in list. But that's not always true: if I'm not wrong, "xm list" returns the VMs list in alphabetical order. That means that script jumps always the first entry in alphabetical order (which is not necessarily the dom0 entry).

    In my use case a VM with name starting with C was jumped. I've solved changing 224 line like this:

    224                                   if ($loop > 1) {

    Now generated list is complete. dom0 appears too, but it doesn't matter for me. Hope it well help!

    • Matt

      Matt - 2009-01-29

      Hi Piergiorgio,

      oh, yes, good one. Opened a bug about it at :


      Many thanks for great debugging + reporting !

      have a nice day,


    • Matt

      Matt - 2009-01-29

      Hi Piergiorgio, Matt again,

      just commited a fix for that. It looks like :

                      $xen_name = substr($xen_name, 0, strpos($xen_name, " "));
                      $xen_name = trim($xen_name);
                      // skip Name and dom0 entry
                      if ($loop > 1 && strcmp($xen_name, "Dom0") {
                          $active_vms[] = "$xen_name";
                          // check if on- or offline

      You can get the updated xen-manager.php from :


      Would you please apply and test it ?
      Currently do not have a working xen setup available here so it would be great to hear if this fixes it. btw closed the bug. if it is not working please re-open ;)

      many thanks + have a great day,


    • Piergiorgio Andreani

      Hi Matt, some troubles happened to my servers (not related with openQRM) so I temporarily cannot try this file. I'll tell you in the future.

      • Matt

        Matt - 2009-02-03

        Ciao Piergiorgio,

        no prob, take your time. Thanks in advance for your testing !

        greetz + best,



Log in to post a comment.