XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. benapetr
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 24
    • Groups 0

    benapetr

    @benapetr

    29
    Reputation
    2
    Profile views
    24
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    benapetr Unfollow Follow

    Best posts made by benapetr

    • New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      Hello,

      I know some people here will absolutely hate the idea of reviving that old-school thick client (yes I am talking about XenAdmin), but there are also some of us that just love it and can't get to like those web-based UIs 😄

      Despite running Xen Orchestra for many things almost everywhere (it's really handy) I just still prefer doing many things in the original thick client - especially setup of new pools and cluster, low level stuff like HA configuration, and so on (also - deploying that first VM with xen orchestra - hah).

      I already have experience with rewriting C# apps to Qt (I have many years of experience with both programming languages) and I had this idea in my head for a long time, but never felt like I could take such challenge on all by myself - since original XenAdmin is about 1715 files (files, not lines) of code, but then AI happened and it just seems it's really great at translating one language to another.

      But fret not, this is not some vibe coded AI slop, I was just using AI (for months) to help convert large pieces of code and then gave a manual review to everything and corrected most of stuff and I plan to do that until everything works completely.

      The project lives here for now: https://github.com/benapetr/XenAdminQt

      It's using exactly same license as original XenAdmin. I also took liberty of reusing the icons as I am terrible with graphics. If you have any problems with that (especially the rocket logo) let me know, I will have AI generate some slop logo instead, but I really would like to expand the xcp-ng open source world with this 🙂

      Here is a screenshot from Debian:

      13314316-bcce-4dcb-8bd3-209f6770395a-image.png

      (Now that I am looking at it, there are some visual artefacts in that bottom toolbar - but that's just because of that active dark mode, in light mode it looks fine :P)

      The client already works great on both macOS and linux (I use both platforms extensively - I don't do much Windows TBH) - if you don't have Windows and want to give it a try, you can compile it easily, assuming you have Qt installed you can just open the .pro file, compile it and run it. No tricks needed, it's very easy and straightforward - I purposefully decided to not add any 3rd party dependencies beside Qt itself to keep it very easy to port anywhere.

      In fact thanks to WASM this thing can probably even run in a browser, but networking stack would need some overhaul for that to work.

      Just keep in mind this is alpha - run at your own risk, I am myself only using it in my lab clusters, but it didn't break anything so far 🙂

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      I just released 0.0.4! Still an alpha, but it's becoming pretty usable - there was over 60 commits of code cleanup, polish and also limited testing of all visible features - pretty much everything that is now visible in the UI should be operational at this point, option pages, properties of hosts, pools, VDIs, configuration of NICs, even bonding and advanced stuff like pool password / secret rotation. All XAPI actions and commands were already ported over from C# variant, so my focus now is only on finishing it into a final usable product.

      We also have some features that original client doesn't have (such as XenCache explorer)!

      Next on my to-do is to add all features that are currently missing completely: HA, GPU, PCIe, VM import / export etc.

      Note: I will not be porting over any licensed or proprietary Citrix stuff. This tool may work with XenServer just fine, but I will not be porting over any of the proprietary features, because I will never use it and I have no way to test it either.

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      Here are some more screenshots from debian:

      df3b5fb0-c5e5-43cd-8b09-b3e78aa80b61-image.png
      255e428c-98a8-45ca-8d84-e4692e513a20-image.png
      347101c0-c303-4349-8b97-5d7ee922fbf8-image.png
      88000de7-bc1b-4137-9f5c-92960700b96e-image.png
      d822614e-603c-41a1-8bdc-ed4327bc6d35-image.png
      783a9005-c534-4c07-97c7-cefff3a59f89-image.png

      posted in News
      B
      benapetr
    • Native Ceph RBD SM driver for XCP-ng

      Hello,

      I am using CEPH for a very long time, I started back in the times of old Citrix Xen Server (I think version 6 maybe?)

      I was using RBD for a long time in a hacky way via LVM with a shared attribute, which had major issues in latest xcp-ng, then I migrated to CephFS (which is relatively stable, but has its own issues related to the nature of CephFS - reduced performance, dependency on the MDS etc.).

      I finally decided to move outside of my comfort zone and try and write my own SM driver for actual RBD and after some testing move it to my production cluster. I know there is already another github project wrote by another guy, that is unmaintained for many years and has various versions. I didn't want to bother trying to understand how that one is implemented - I already know how to use RBD with CEPH, I just needed to put it into a SM driver. So I made my own.

      I will see how it goes, there are drawbacks already to that "native" RBD over CephFS - while IO performance is superior, the "meta" performance (creating disks, snapshots, deleting disks, rescanning SR) is actually slower because it relies on native CEPH APIs and doesn't just use very fast low-level "file access" of CephFS. But I still think it could be a valuable addition to people who need raw IO performance.

      My driver is fully open source and available here - I currently target XCP-ng 8.2 and SMAPIv2, because that's what I use on my production cluster which I am primarily making this for. But eventually I will try to test this with XCP-ng 8.3 and when SMAPIv3 is finally ready, I might port it there as well.

      Here is the code: https://github.com/benapetr/CephRBDSR/blob/master/CephRBDSR.py

      There is also an installation script that makes the installation of the SM driver pretty simple, may need a tweak as I am not sure if manually adding SM modules to /etc/xapi.conf is really a good idea 🙂

      Please note it's a work in progress, it's unfinished, and some features probably don't work yet.

      What is already tested and works:

      • SR creation, unplug, plug, rescan, stat
      • Basic RBD / VDI manipulation - creating VDI, deleting VDI, openning VDI / mapping VDI, copying VDI

      It's really just managing RBD block devices for you and uses aio to map VDIs to them

      What is not tested yet

      • Snapshots
      • Cluster behaviour

      I only recommend for use on dev xcp-ng environments at this moment. I think within a month I might have a fully tested version 1.0

      Feedback and suggestions welcome!

      posted in Development
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      I just released 0.0.3 https://github.com/benapetr/XenAdminQt/releases/tag/v0.0.3-alpha it brings it even closer to the original client, with packages for macos, debian12, debian13, ubuntu 22, ubuntu 24, Fedora 43, windows

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      I just released 0.0.2 https://github.com/benapetr/XenAdminQt/releases/tag/v0.0.2-alpha

      The first version was really just a proof-of-concept demonstration, this second version is already pretty usable. It can handle all basic stuff, including provisioning of new VMs, VM control (start / stop / suspend / pause), force actions, parallel connections to multiple clusters etc. etc.

      Status of what is tested and works and what does:

      # Needs work
      * Menu items
      * Tree view - should show Virtual Disks, Networks in objects view
      * Pool HA tab missing
      * Actions and commands, see actions todo
      * Performance tab
      * Search tab has unfinished options panel
      * VM import / export
      * Folder and tag views
      * Network tab (host) - needs finish and test, especially wizards and properties
      * New pool wizard
      * New storage wizard
      * New VM wizard
      * VM deleting
      * HA tab
      * NIC tab - bonding
      * Clone VM
      * Create template from VM
      * Create VM from template
      
      # Needs polish
      * General tab - shows data, but access to data is weird (should use native XenObjects and their properties instead of scrapping QVarianMaps), overall layout is also not good
      * Memory tabs - they already work, but could look better
      * Console - it works most of the time, but there are random scaling issues during boot, RDP not supported
      * UI - menus and toolbar buttons sometime don't refresh on events (unpause -> still shows force shutdown)
      
      # Needs testing
      * VM disk resize
      * VM disk move
      * VM live migration
      * VM cross pool migration
      * Properties of Hosts, VMs and Pools
      * VM deleting
      * Options
      * Maintenance mode
      
      # Finished and tested
      * Add server
      * Connection to pool - redirect from slave to master
      * Connection persistence
      * Basic VM controls (start / reboot / shutdown)
      * Pause / Unpause
      * Suspend / Resume
      * Snapshots
      * VM disk management (create / delete / attach / detach)
      * SR attach / detach / repair stack
      * CD management
      * Grouping and search filtering (clicking hosts / VMs in tree view top level)
      * Tree view (infrastructure / objects)
      * Events history
      * Network tab (VM)
      * Host command -> Restart toolstack
      
      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      I made a first "demonstrator" preview release for macOS, will upload .deb and .rpm packages as well: https://github.com/benapetr/XenAdminQt/releases/tag/v0.0.1-alpha

      posted in News
      B
      benapetr
    • RE: Native Ceph RBD SM driver for XCP-ng

      Well, so I found it, the culprit is not even the SM framework itself, but rather the XAPI implementation, the problem is here:

      https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/xapi_vm_snapshot.ml#L250

      This logic is hard-coded into XAPI - when you revert to snapshot it:

      • First deletes the VDI image(s) of the VM (that is "root" for entire snapshot hierarchy - this is actually illegal in CEPH to delete such image)
      • Then it creates new VDIs from the snapshot
      • Then it modifies the VM and rewrites all VDI references to newly created clones from the snapshot

      This is fundamentally incompatible with the native CEPH snapshot logic because in CEPH:

      • You can create any amount of snapshots you want for an RBD image - but that makes it illegal to delete the RBD image as long as there is any snapshot. CEPH is using layered CoW for this, however snapshots are always read-only (which is actually fine in Xen world as it seems).
        • Creation of snapshot is very fast
        • Deletion of snapshot is also very fast
        • Rollback of snapshot is somehow also very fast (IDK how CEPH does this though)
      • You can create a clone (new RBD image) from a snapshot - that creates a parent reference to the snapshot - eg. snapshot can't be deleted until you make the new RBD independent of it via flatten operation (IO heavy and very slow).

      In simple words when:

      • You create image A
      • You create snapshot S (A -> S)

      You can very easily (cheap IO) drop S or revert A to S. However if you do what Xen does:

      • You create image A
      • You create snapshot S (A -> S)
      • You want to revert S - Xen clones S to B (A -> S -> B) and replaces VDI ref in VM from A to B

      Now it's really hard for CEPH to clean both A and S as long as B depends on both of them in the CoW hierarchy. Making B independent is IO heavy.

      What I can do as a nasty workaround is that I can hide VDI for A and when the user decides they want to delete S I would just hide S as well and schedule flatten of B as some background GC cleanup job (need to investigate what are my options here), which after finish would wipe S and subsequently A (if it was a last remaining snapshot for it).

      That would work, but still would be awfully inefficient software emulation of CoW, completely ignoring that we can get a real CoW from CEPH that is actually efficient and IO cheap (because it happens on storage-array level).

      Now I perfectly understand why nobody ever managed to deliver native RBD support to Xen - it's just that XAPI design makes it near-impossible. No wonder we ended up with weird (also inefficient) hacks like LVM pool on top of a single RBD, or CephFS.

      posted in Development
      B
      benapetr

    Latest posts made by benapetr

    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      I just released 0.0.4! Still an alpha, but it's becoming pretty usable - there was over 60 commits of code cleanup, polish and also limited testing of all visible features - pretty much everything that is now visible in the UI should be operational at this point, option pages, properties of hosts, pools, VDIs, configuration of NICs, even bonding and advanced stuff like pool password / secret rotation. All XAPI actions and commands were already ported over from C# variant, so my focus now is only on finishing it into a final usable product.

      We also have some features that original client doesn't have (such as XenCache explorer)!

      Next on my to-do is to add all features that are currently missing completely: HA, GPU, PCIe, VM import / export etc.

      Note: I will not be porting over any licensed or proprietary Citrix stuff. This tool may work with XenServer just fine, but I will not be porting over any of the proprietary features, because I will never use it and I have no way to test it either.

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      @olivierlambert ok that's great, I didn't even notice, thanks!

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      @TeddyAstie good idea, thanks, I will do it once I get close to releasing first non-alpha version, right now it's still too immature for production use (although latest master version is so good and stable I already use it to manage most of my own clusters)

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      @Tristis-Oris There are many features missing since it's alpha now, but you can open bug tracker request on github if you want to keep track of progress for this particular feature.

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      @Tristis-Oris just FYI I fixed all of those issues you had, also regarding portable stuff - I implemented CLI switch -c <path> where you can specify directory where you want to store config, so you can wrap the app in a .bat or .sh script that would start it to use local storage (like flash drive) for config files, that should achieve portability.

      If you expected something more sophisticated let me know

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      @Tristis-Oris the logic was directly ported over from C# version, so it does the same stuff what it filters there. It just toggles this search scope:

      QueryScope* TreeSearch::GetTreeSearchScope()
      {
          ObjectTypes types = Search::DefaultObjectTypes();
          types |= ObjectTypes::Pool;
      
          SettingsManager& settings = SettingsManager::instance();
      
          if (settings.getDefaultTemplatesVisible())
              types |= ObjectTypes::DefaultTemplate;
      
          if (settings.getUserTemplatesVisible()) // these are custom
              types |= ObjectTypes::UserTemplate;
      
          if (settings.getLocalSRsVisible())
              types |= ObjectTypes::LocalSR;
      
          return new QueryScope(types);
      }
      

      I assume it matches all user-defined templates, the defaults you see are "system defined" and part of xcp-ng .rpm packages. It's possible that this logic just wasn't ported correctly, I will look into it.

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      @Tristis-Oris hello, the app is already somewhat portable. On windows it doesn't require any installation it's just a single .exe file

      Regarding templates and sorting of tree view - that's being worked out but you can already hide the templates using View menu (just uncheck you want to display them, they will disappear).

      Not sure about the yellow template icons, they is a debug console, you can check logs from it for more details.

      Save and restore using encryption / master password isn't implemented in that version you have, it just always remembers all connections, but it's already ported over, see - https://github.com/benapetr/XenAdminQt/pull/15 this option will be available in next version (+ master password encryption)

      benapetr opened this pull request in benapetr/XenAdminQt

      closed Feature/mpw #15

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      I just released 0.0.3 https://github.com/benapetr/XenAdminQt/releases/tag/v0.0.3-alpha it brings it even closer to the original client, with packages for macos, debian12, debian13, ubuntu 22, ubuntu 24, Fedora 43, windows

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      I also added windows build so that people can help with testing also on windows. It's a static build, no need for installer, just single zipped .exe file. No dependencies.

      posted in News
      B
      benapetr
    • RE: New project - XenAdminQt - a cross-platform GNU/Linux, macOS, Windows native thick client

      I just released 0.0.2 https://github.com/benapetr/XenAdminQt/releases/tag/v0.0.2-alpha

      The first version was really just a proof-of-concept demonstration, this second version is already pretty usable. It can handle all basic stuff, including provisioning of new VMs, VM control (start / stop / suspend / pause), force actions, parallel connections to multiple clusters etc. etc.

      Status of what is tested and works and what does:

      # Needs work
      * Menu items
      * Tree view - should show Virtual Disks, Networks in objects view
      * Pool HA tab missing
      * Actions and commands, see actions todo
      * Performance tab
      * Search tab has unfinished options panel
      * VM import / export
      * Folder and tag views
      * Network tab (host) - needs finish and test, especially wizards and properties
      * New pool wizard
      * New storage wizard
      * New VM wizard
      * VM deleting
      * HA tab
      * NIC tab - bonding
      * Clone VM
      * Create template from VM
      * Create VM from template
      
      # Needs polish
      * General tab - shows data, but access to data is weird (should use native XenObjects and their properties instead of scrapping QVarianMaps), overall layout is also not good
      * Memory tabs - they already work, but could look better
      * Console - it works most of the time, but there are random scaling issues during boot, RDP not supported
      * UI - menus and toolbar buttons sometime don't refresh on events (unpause -> still shows force shutdown)
      
      # Needs testing
      * VM disk resize
      * VM disk move
      * VM live migration
      * VM cross pool migration
      * Properties of Hosts, VMs and Pools
      * VM deleting
      * Options
      * Maintenance mode
      
      # Finished and tested
      * Add server
      * Connection to pool - redirect from slave to master
      * Connection persistence
      * Basic VM controls (start / reboot / shutdown)
      * Pause / Unpause
      * Suspend / Resume
      * Snapshots
      * VM disk management (create / delete / attach / detach)
      * SR attach / detach / repair stack
      * CD management
      * Grouping and search filtering (clicking hosts / VMs in tree view top level)
      * Tree view (infrastructure / objects)
      * Events history
      * Network tab (VM)
      * Host command -> Restart toolstack
      
      posted in News
      B
      benapetr