Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux/Mono Prototype #23

Closed
necouchman opened this issue Apr 11, 2018 · 66 comments
Closed

Linux/Mono Prototype #23

necouchman opened this issue Apr 11, 2018 · 66 comments
Assignees
Labels
crossplattform support enhancement New feature or request help wanted Extra attention is needed

Comments

@necouchman
Copy link

This is kind of a wish-list sort of item, and would probably take considerable effort, but it would be really nice to make XenCenter cross-platform capable. I'm not sure if the DotNet components that it relies upon are available in the DotNet Core released for Linux and MacOS, which might make it easier. If not, those components could be swapped out with something else, use a cross-platform GUI framework (QT comes to mind), etc., so that it can be compiled and run on Windows, Mac, and Linux.

Of course, none of this is to take away from the great work @olivierlambert is doing on XenOrchestra - having a Web UI is definitely preferable to a thick client like XenCenter, but sometimes for initial configuration of a cluster from scratch and some of the other one-time items it is nice to have the XenCenter GUI. I just don't like to be tied to Windows for that.

@necouchman necouchman added the enhancement New feature or request label Apr 11, 2018
@borzel
Copy link
Member

borzel commented Apr 11, 2018

I just don't like to be tied to Windows for that.

Me too!

But this is a BIG item and for long term.

@necouchman
Copy link
Author

But this is a BIG item and for long term.

Yes, definitely - I just wanted to go ahead and get it on the list. Maybe someone out there will see it, fork the repo, and start working on it :-).

@gangsterrapper22
Copy link
Collaborator

An Java XenCenter would be nice, because Java runs on the most platform and then you have only to compile one release and not per platform, but I thnk then we have to from scratch to make this possible.

@olivierlambert
Copy link
Member

BTW @necouchman you can install Xen Orchestra on your computer, Windows/Mac or Linux. XOA is in a VM for the sake of easy deploy, but you can install it whenever you need 😉

@necouchman
Copy link
Author

BTW @necouchman you can install Xen Orchestra on your computer, Windows/Mac or Linux.

Good to know, thanks!

@borzel
Copy link
Member

borzel commented Apr 11, 2018

Some reading material: xenserver#3 Make XenCenter compile / run with mono

@borzel borzel added this to the Cross Platform Support milestone Apr 11, 2018
@zemzema
Copy link

zemzema commented Apr 19, 2018

There is also openxenmanager, there is Linux and Windows version.

@borzel
Copy link
Member

borzel commented May 3, 2018

I did some tests on Ubuntu 16.04 with MonoDelevop. I got it to the state where i can compile an exe.
But it throws exceptions after the first couple of initialisations.

grafik

@borzel
Copy link
Member

borzel commented May 3, 2018

First I had to convert all png files in folder /XenAdmin/Images

find -name "*.png" | xargs -I{} pngcrush -ow -c 6 {}
(https://stackoverflow.com/questions/22745076/libpng-warning-iccp-known-incorrect-srgb-profile)

Now the ressource file generation went trough and i could see the first paintings of the main "window" :-)

grafik

@borzel
Copy link
Member

borzel commented May 3, 2018

It's not pretty and not stable, but first connection is made ;-)

grafik

grafik

@johnbester
Copy link

johnbester commented May 4, 2018

I have not had a look at this for quite some time, but maybe I can give some input on how to proceed. If you search for DllImport throughout the project, you'll find that dll's are imported in 10 or more files. What you need to do is to identify the various calls, abstract them to a "NativeCalls" abstract class or interface and then subclass it as NativeCallsWindows and NativeCallsLinux. Move the various DllImports into NativeCallsWindows and use it in stead of the DllImported methods scattered all over the place by accessing a static method such as NativeCalls.getInstance().doSomeCall(...). In the NativeCallsLinux class you can start off by having dummy implementations of the various functions and work your way through implementing them. NativeCalls.getInstance() initializes the proper delegate (if it was not done before) by checking the current OS. If you can get this refactoring into the master branch, you are set for a multi-operating system solution.

@borzel borzel changed the title Cross-Platform XenCenter [CrossPlatform] XenCenter May 4, 2018
@eangulus
Copy link

eangulus commented May 7, 2018

I would also like a cross-platform XenCenter, but (and I know that this crosses over with XenOrchestra) but how about a XenCenter that will work remotely where I only have to forward some ports thru the router firewall. Citrix version never allowed XenCenter unless on the same network.

@olivierlambert
Copy link
Member

The difference is Xen Orchestra can run inside the same network of your XS/XCP-ng hosts, while you can access it from outside (unlike XenCenter).

@borzel
Copy link
Member

borzel commented May 7, 2018

We should collect all infos here: https://github.com/xcp-ng/xenadmin/wiki/Cross-Platform-Vision

@borzel borzel changed the title [CrossPlatform] XenCenter [CrossPlatform] XenCenter - Prototyping May 9, 2018
@borzel
Copy link
Member

borzel commented May 9, 2018

First Prototype here: https://github.com/borzel/xenadmin/releases/tag/v7.4.0-Linux-alpha

Please test and report!

@borzel borzel changed the title [CrossPlatform] XenCenter - Prototyping Linux/Mono Prototyp May 14, 2018
@borzel borzel changed the title Linux/Mono Prototyp Linux/Mono Prototype May 14, 2018
@borzel
Copy link
Member

borzel commented May 22, 2018

I did a PR against upstream for building dotnet-packages on mono/linux: xenserver/dotnet-packages#69

@borzel
Copy link
Member

borzel commented May 26, 2018

Here are the nightly builds of the linux/mono prototype: https://builds.schulzalex.de/xcp-ng_linux-prototype

@gangsterrapper22
Copy link
Collaborator

gangsterrapper22 commented May 26, 2018

I tried to run this on OS X with mono but there it doesn't work. Maybe I can try to compile your source code on OS X with mono. Maybe it works then. I also attached an Error Log. Maybe we can also create an own Issue to make it also work on OS X.
error_xcp_mono.txt

@borzel
Copy link
Member

borzel commented May 30, 2018

To run it on OS X it need's additional work, which I can not do. I don't own an apple device :-)

@borzel
Copy link
Member

borzel commented Jul 1, 2018

After several problems with gui elements from winforms I try to run XCP-ng Center against a debug build of mono... maybe I find something...

@olivierlambert
Copy link
Member

@kallisti5 No worries, I know it's not about discrediting. I just feel there is probably a lack of understanding on XO project :)

Xen Orchestra (on XAPI) exists since... 2013! There is a dedicated team working on it (6 ppl, full time). And it's fully Open Source - aGPLv3- (all issues are on GitHub, unlike XenCenter, which is only developed by Citrix) with a reasonably sized community (forum, users, community scripts etc.)

Just check the pulse/stats on the repo: https://github.com/vatesfr/xen-orchestra/pulse/monthly

Also, XO has a far more broader scope: it's not "just" an admin tool, but it's able to do auto patching, streaming VMs on any pool, backup, incremental delta backup, ACLs, self service with quotas, advanced stats and much more. There is also an API, and a CLI! It could also act as a proxy to only expose one XO and not all the XAPI behind a firewall.

That's why I'm convinced there is already a de facto cross platform solution, and contributing to it directly seems to be less a dead-end than tinkering/bending an app to make it work on Linux despite there is no effort from the Citrix core-contributors to make it real (and on a far more limited features scope).

What I meant in the end: your time could be used instead to create tickets on XO tracker about a feature you'd like to have in XO that you like in XenCenter (or you'd like to have in XenCenter in the first place). A simple real recent example? In this ticket someone asked for pause/unpause feature exposed in XCP-ng Center. One week later, it was available in the next XO release. I think it speaks for itself about what you can expect for it.

At least it should answer the "there is no HTML5 admin console for XCP-ng and it's a BIG blocker", right?

@borzel
Copy link
Member

borzel commented Dec 5, 2018

please continue the XO discussion in a separate thread elsewhere...

Here I want just content for linux xenadmin :-)

@derrickmehaffy
Copy link

@borzel I agree with you, this thread should remain only about linu xenadmin. @olivierlambert not basing you or anything, XO is a great tool. Many of us just like the layout of xenadmin better. The structure is a bit more "admin focused".

@olivierlambert
Copy link
Member

@derrickmehaffy I'd like to have your input about "more admin focused", because I'm an admin myself and I'm not sure to get it. We'd be happy to improve XO to go in the way you like.

@sammcj
Copy link

sammcj commented Feb 4, 2019

Really keen to see this work out, if anyone needs someone to test a build against a cluster let me know and I'll see what I can do.

@borzel borzel assigned ghost Feb 8, 2019
@borzel
Copy link
Member

borzel commented Feb 8, 2019

@BlackCentipede @cocoon here is the new branch where we sum up all linux/mono-releated results

https://github.com/xcp-ng/xenadmin/tree/feature-linux-8.0

How do we start? Should I put all my current code into it?

@ghost
Copy link

ghost commented Feb 8, 2019

Yep, put all code you have so far into it and we can figure out the milestones together on what each of us need to do from this point on.

@borzel
Copy link
Member

borzel commented Feb 8, 2019

ok, sounds good. I try to do this ASAP, but I'm on vacation from Feb 10 (Sunday) till Feb 13 (Wednesday)

@cocoon
Copy link
Collaborator

cocoon commented Feb 9, 2019

I have seen you removed the "feature-linux-8.0" again (oh and you did many! other changes and additions ^^) but I have seen these:

master-linux-dev-borzel
master-linux-dev
master-linux

So I will wait until you have the startable prototype branch ready and give a go?

I reactivated and updated my Ubuntu 16 + Mono Development VM (MonoDevelop v7.6 build 711).

Just some thoughts:

Do we want to have the same environment?
Then you could tell the used environment and needed packages and version numbers to document it.

And maybe I can then create a wiki entry about it and later automate building an development VM/Appliance with packer, that could make it easier for others to jump in and try to fix something.

@ghost
Copy link

ghost commented Feb 9, 2019

We also need a mode of communication to actively discuss on this, do we need to discuss it here or do we move it to chat program like Slack, Discordapp, or anything?

@borzel
Copy link
Member

borzel commented Feb 9, 2019

@cocoon @BlackCentipede

I would prefer IRC for communication, I've already set up a quassel server. That works very well.

You can just join #xcp-ng-dev on irc.freenode.net - my quassel server is always online and I read every day through the chat. There we can discuss the future and open a separate channel... do you know how to do that on IRC? :-) name should be something like xcp-ng-xenadmin-dev

yes, I did some tidy up to get started. Now we have a real master branch with all current changes in it as a base. My plan is to fill master-linux-dev-borzel with my current state of the port which is here: https://github.com/borzel/xenadmin/tree/linux-7.4

That should happen till next weekend... maybe ;-) You can also create your own branch and play around... thats always my best source of ideas.

Environment:

  • Ubuntu 18.04 (optional)
  • latest mono-dev you can get
  • latest monodevelop you can get

I documented the steps to get it running: https://github.com/xcp-ng/xenadmin/wiki/Cross-Platform-Vision#first-hack-by-borzel
You can start there and try to follow it and add up as you do it.

See you in the IRC!

@borzel
Copy link
Member

borzel commented Feb 10, 2019

Some more info from my dev system:

# mono -V
Mono JIT compiler version 5.16.0.220 (tarball Mon Nov 26 17:17:59 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	Interpreter:   yes
	LLVM:          yes(3.6.0svn-mono-/)
	GC:            sgen (concurrent by default)

@ghost
Copy link

ghost commented Feb 14, 2019

Yep, I'll come on this weekend to talk more on what we should do from here.

@borzel
Copy link
Member

borzel commented Mar 3, 2019

For all who just want to run XCP-ng Center on Linux:
xenserver#3 (comment)

@carragom
Copy link

Hi @borzel, I was wondering if with the arrival of WindowsForms in .netcore 3.1 it would make more sense to try and port the project to .netcore instead of mono.

@olivierlambert
Copy link
Member

@carragom FYI:

  • XO 6 will bring a UI more similar to XCP-ng Center
  • we have some plans for a basic/simple XO directly embed in XCP-ng

So if there's a reason left for using XCP-ng Center, let me know. Ideally, I'd like to get completely rid of it to reduce number of XAPI clients to maintain.

@carragom
Copy link

@olivierlambert
I stated the reasons why I prefer XCP-ng Center here. IMO I would love to see XO as an electron app that I could carry around in my laptop where all I have to do to connect to a new pool is add a server.

Having XO embedded into XCP is a really good step forward. But still use cases remain. For example cross pool VM movement. How would I go about moving a VM across different pools in this embedded scenario?

@borzel
Copy link
Member

borzel commented Dec 15, 2019

@carragom Hey! So good it sounds, xenadmin / XenCenter / XCP-ng Center don't use only Winforms, most of the UI elements are drawn from scratch.

Big pain. Not worth it :-(

@carragom
Copy link

@borzel I see. But do you still think it would be easier to port all that to mono instead .netcore ? If you say yes I believe you. Just wanted your opinion on the matter.

@borzel
Copy link
Member

borzel commented Dec 15, 2019

actually I don't have any opinion ... no real spare time to do anything :-(

@carragom
Copy link

don't worry and thanks for the great work

@olivierlambert
Copy link
Member

@carragom no problem to add other pool as the app will run in your browser. However, it will be likely not saved (or we need to store some info in your browser itself). I think this is doable :)

@carragom
Copy link

@olivierlambert great to know, I'll keep an eye on the project and give a try when available

@borzel borzel removed this from the Cross Platform Support milestone Jan 26, 2020
@mimi89999
Copy link

I have an issue with XCP 8.0.0. It is crashing on the splash screen. Would it be possible to add an option to disable splash?

@cocoon
Copy link
Collaborator

cocoon commented Feb 22, 2020

You could run XenCenterMain.exe instead, that would avoid the splash?

@borzel
Copy link
Member

borzel commented Jun 24, 2020

As I have no spare time I close this :-(

@borzel borzel closed this as completed Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crossplattform support enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests