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

Make scripts work in WSL 2 #1949

Closed
JonCStout opened this issue May 9, 2021 · 29 comments
Closed

Make scripts work in WSL 2 #1949

JonCStout opened this issue May 9, 2021 · 29 comments

Comments

@JonCStout
Copy link

Steps to reproduce

  1. Install Windows Subsystem for Linux (and Virtual Machine Platform if you want WSL 2, which is much faster, though you have to manually enable v2 to take advantage)
  2. Install Ubuntu 20.04 LTS or plain Ubuntu; launch and create login, apt update, apt upgrade
  3. wget and then run the "raw" version of the install script from https://github.com/nextcloud/vm/raw/master/nextcloud_install_production.sh
  4. My answer to the questions are yes or no for LVM snapshots (doesn't seem to matter), yes to create user, DNS doesn't seem to matter, and no to the data disk because I don't have a secondary one to format in the WSL VM.

Expected behavior

Finish install

Actual behavior

Errors shortly after installing the Apache server, and told me to report it, so here I am.

Server configuration

Nextcloud server version: n/a

Server OS Ubuntu 20.04

PHP Version n/a

How did you install the VM? install script, as described

Network

Do you use DHCP? Yes, multiple layers of NAT, including whatever WSL uses

Is port 80 and/or 443 open? Probably available ports, in that fresh install

Logs / Screenshots

Log file (/var/log/nextcloud/nextcloud.log)

doesn't exist

Installation log (command output)

Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Enabling module socache_shmcb.
Enabling module ssl.
See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
To activate the new configuration, you need to run:
  service apache2 restart
Module mpm_prefork already disabled
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Sorry but something went wrong. Please report this issue to https://github.com/nextcloud/vm/issues and include the output of the error message. Thank you!
systemctl restart apache2.service failed
sudo: php: command not found

For what it's worth, this command appears to work afterward:

:/home/ncadmin# service apache2 restart
 * Restarting Apache httpd web server apache2

Also, PHP didn't appear to have been installed yet by the script, so that last line in the console output is odd.

It may also be worth mentioning that snap isn't usable in Ubuntu 20.04 LTS for WSL, though it might be in plain Ubuntu (non-LTS?)

And the script doesn't work in Debian 10 at all, just says it only works in Ubuntu 20.04, which is a shame.

Screenshots

Can be created if really needed

@szaimen
Copy link
Collaborator

szaimen commented May 9, 2021

Hi, I've investigated a bit and it seems like systemd isn't installed by default in WSL. To make our install script work, you need to make sure to install systemd first before running the script. I've found those options for you: https://superuser.com/a/1601950

@szaimen szaimen added Support Please visit https://help.nextcloud.com or https://shop.hanssonit.se/product-category/support/ Won't fix labels May 9, 2021
@szaimen
Copy link
Collaborator

szaimen commented May 9, 2021

But obviously this isn't the recommended way to install the VM. Much better would be to use Hyper-V or VMPlayer to run the Nextcloud VM.

@JonCStout
Copy link
Author

JonCStout commented May 9, 2021

For what it's worth, I found a YouTube tutorial on how to do it more manually, and it worked! It is for an older version of Ubuntu, but it still worked on 20.04, and it didn't require me to jump through the systemd workarounds from that superuser article: https://www.youtube.com/watch?v=vAWe8LjSUNk

As for a "full" VM, that uses way more system resources than WSL, particularly RAM. It can also be tricky to get it to share access to alternate storage locations on the host system, whereas WSL can just immediately go to /mnt/d for example. I think that tutorial ended up being faster to set up than installing Ubuntu in a VM, too. It's only a <9 minute video, and the fast forwarded parts where installs happened only took a couple minutes extra for me (thanks to WSL 2).

This all suggests to me that a scripted solution for WSL should be possible that maybe doesn't depend on systemd, though I understand if it's a lot of work to make that happen.

@szaimen

This comment has been minimized.

@hobbsecky
Copy link

hobbsecky commented May 10, 2021

For me NextcloudVM is WAY faster and reliable with VMware when you start adding subdomains, CertBot for HTTPS, high performance back end for Talk, Office, Webmin, etc and VMWare is much improved both performance and stability wise and their Player is free.

WSL is the new kid on the block and it's Microsoft so you can expect compatibility problems out of the box. Seriously Microsoft never does anything great and conspiracy theories aside they do have nefarious intent...hehehehehehe. Isn't that why Nextcloud exists? Truth!

Like most admins there are a lot of things I can do quickly with CLI but Webmin is great when I need to move things around and it has low overhead. It words effortlessly with NextcloudVM and VMware Player.

VMware workstation is nice if you want automated snapshots to save backup space and CPU overhead but if it's a small cloud you can just copy your whole VM to another folder or drive once a day and use the free Player and all is good.

If you want compatibilty with Docker, maximum compatibilty with everything Linux, want to run your Linux with a desktop, 3D anything in your guest, multiple guests, ease of backups, VMware trumps WSL 1 and 2 in my opinion. VMware's latest version 16 has major performance gains especially with 3D graphics if you use a desktop.

Another note: since NextcloudVM is sitting on Ubuntu if you want lean and mean with better compatibilty and speed then WSL you should look into Ubuntu's Multipass. https://multipass.run/

My NextcloudVM:
Desktop Screenshot 2021 05 09 - 19 23 50 58

FYI...I do NOT work for NextcloudVM. Just a happy end user. After weighing all the options to me NextcloudVM on VMware
offers the most pluses with the least headaches and the performance has been excellent.

@hobbsecky
Copy link

hobbsecky commented May 10, 2021

I made a quick video of my NextcloudVM in real time on VMware. Enjoy!

https://www.youtube.com/embed/N6GiXGCb5Ys?rel=0&amp;vq=hd1080

@JonCStout
Copy link
Author

I didn't know there was an SMB mount script thing, which shouldn't surprise anybody since I'm installing for the first time. Thanks for that info.

As for WSL, I've played with it enough in node.js development vs native Windows node.js vs VM Linux node.js that I've come to actually like WSL the most out of the three. And WSL is semi-new, yes, but already surprisingly good for cli stuff and great for Visual Studio Code (Remote-WSL) development. (Try deleting a node_modules folder with 30,000 files in it and be amazed at how Windows takes minutes and WSL 2 takes a second or two - it's basically really close to as fast as native Linux, now.) They have native X server support coming, available in preview release right now, and maybe better systemd support and/or snapd will come with that? The main reason I went this route is I didn't want to pay for a pre-made VM. I really didn't need enterprise level support when I'm just tinkering. I didn't originally see a free route to getting one, so thanks for that info, too.

That video was pretty awesome, with lots more interesting things to explore than I was expecting. Thanks for that, too!

But having said all that, I found yet another option for Windows without any VM at all:
http://www.ampps.com/apps/files/Nextcloud
It could be as simple as installing ampps, then installing NextCloud inside ampps, and done. I probably won't have the time to tinker with this for a few days now, though.

I may give ampps a try and see which I like better. Maybe that should be mentioned in the install guide as an option for Windows. I imagine I'm not the only person that has been wanting first class support for Windows - easy, free, more readily available to the ~90% of the world that isn't using Linux or Mac... It's like, if a big project like LibreOffice can do cross-platform open source and not go bankrupt, why not this one? (Maybe that's not a fair comparison.)

I understand some of the reasoning for isolating in a VM, but that mainly doesn't apply when I don't intend to make my install Internet accessible. I mean, the whole point to me is to break away from public clouds like Google and MS. So if Internet exposure isn't such an issue, then OS isolation is moot, for me. On the other hand, I'd rather not permanently decrease my available RAM by however many gigs the VM needs to run, when I have other things I want to do (mostly Windows apps/services) with that same box. I may still go the VM route if I don't like the ampps or WSL routes. We'll see. But I guess this is veering toward philosophical arguments that only vaguely address the "why" of the original issue.

So... if someone other than a core developer (the "we" that is definitely not willing, presumably) were to submit a pull request for a script that would make it better for Windows, would that be accepted?

P.S. node.js has a pretty slick scripted install that works in multiple distribution flavors of WSL, in case anybody wants to see how another project does it: https://github.com/nodesource/distributions/blob/master/README.md#debinstall
I think they use .deb package management, which I think I saw somewhere NextCloud developers were trying to avoid. It does make it easier to keep everything (in the Linux environment) updated with a single "apt update && apt upgrade", though.

P.P.S. I don't need graphical Linux anything at the moment. I tried going native Linux development for a while, but kept running into so many headaches with laptop trackpads, wifi, Spotify stability, etc., that it just wasn't worth the hassle in the end. If you notice at the end of that video I shared before, he's logged into his NextCloud instance through a web interface, using a browser running in Windows (not WSL) - no GUI Linux X server support required for a web GUI experience.

@szaimen
Copy link
Collaborator

szaimen commented May 10, 2021

But having said all that, I found yet another option for Windows without any VM at all:
http://www.ampps.com/apps/files/Nextcloud
It could be as simple as installing ampps, then installing NextCloud inside ampps, and done.

I've had a quick look but it looks prett unmaintained for me, unfortunately: https://www.softaculous.com/board/index.php?tid=16906&title=add_php_7.2_to_ampps

Edit: Sry for closing. Clicked the wrong button.

@szaimen szaimen closed this as completed May 10, 2021
@szaimen szaimen reopened this May 10, 2021
@szaimen
Copy link
Collaborator

szaimen commented May 10, 2021

So... if someone were to submit a pull request for a script that would make it better for Windows, would that be accepted?

Pinging @enoch85 for this.

@enoch85
Copy link
Member

enoch85 commented May 10, 2021

@JonCStout it's open source, you're free to contribute. 👍

@enoch85 enoch85 removed the Won't fix label May 10, 2021
@JonCStout
Copy link
Author

JonCStout commented May 10, 2021

I might be willing to work on this somewhere way done the road, probably months from now after getting to know the project way better, and deciding if it is even a priority for me, compared to other things that catch my interest. But if anybody else sees this, don't hold your breath waiting for me to do it. PHP and bash scripting weren't even part of the "full stack" curriculum section at my local trade school software development program. (HTML 5, CSS, Javascript, node.js, React, and mongodb were the main focuses, with git, VMs, Linux, and mysql getting brief coverage.)

However, it is nice to know in advance that if I did decide to put in the effort, it stands a chance of being accepted. That won't fix tag and "definitely unwilling" talk were rather off-puting.

@szaimen
Copy link
Collaborator

szaimen commented May 10, 2021

That won't fix tag and "definitely unwilling" talk were rather off-puting.

I am sorry. It wasn't my intention to make you feel bad. I just saw the big effort to support a platform that is currently limited in many points in comparison to "normal" VMs. Additionally, this enhancement isn't really done by adjusting only one script: many scripts need to be adjusted to make them work in WSL.

@szaimen szaimen added enhancement and removed Support Please visit https://help.nextcloud.com or https://shop.hanssonit.se/product-category/support/ labels May 10, 2021
@szaimen szaimen changed the title won't install from script in WSL 1 or 2 Make scripts work in WSL 2 May 10, 2021
@hobbsecky
Copy link

hobbsecky commented May 10, 2021

@JonCStout
I'm going to go out on a limb here and speculate that you have missed one key problem with WSL 2.
A lack of persistent services.

How are you going to run a cloud server without it?

WSL 2 won't let you run Nextcloud in the background.

There are some "hacks" that attempt to make it happen but the net result is that you are hording RAM not unlike any other VM.

So if the one benefit of WSL 2 is going to be removed when you have to hack it to run your Nextcloud I don't see any advantage to using it over VMWare 16. VMWare 16 runs great in the background, small footprint, zero issues with compatibility, has 3D hardware support, much greater networking support, etc.

Right now VMWare 16 checks all the boxes for me. If you haven't looked at it recently it's worth a revisit. They made some big improvements in performance since 15 especially if you want to run a desktop like KDE Plasma or games inside a VM.

WSL 2 could possibly be a stepping stone for Microsoft's future OS to be based on a full fledged Linux core.

(note: heavily edited from first version since I didn't have my morning cup of Joe..hehehehe)

@JonCStout
Copy link
Author

JonCStout commented May 10, 2021

https://superuser.com/questions/1112007/how-to-run-ubuntu-service-on-windows-at-startup

They may be hackish at the moment, but sound doable. Even without that site's advice, I had it running by simply not closing my terminal window. And the amount of RAM it harbors is way less, no more than the processes themselves need, leaving the unused RAM to be shared by both systems. This is easy to verify with Task Manager. I'd also argue the performance loss may be less than a full VM, typically. Compatability is pretty high, running every cli thing I "apt install" and throw at it, except aparrently systemd things. GPU support is irrelevant for cli processes, but probably coming soon anyway. Have you actually tried WSL 2 for sure? (Installing support isn't enough. You also have to enable it and transition old installs to it, or you're still using the slower WSL 1.) I see this as no worse, and in fact possibly better, than leaving a full VM running in the background to provide service.

I'm not sure if full VMs can run alongside WSL, maybe there's a way. But the whole point of me using WSL is to avoid full VMs anyway. I may still check out a full VM later, after ampps. This project will take weeks for me, with occasional tinkering all I have to spare for it right now.

@hobbsecky
Copy link

hobbsecky commented May 10, 2021

The link in your last post prefaced with the fact that you would flush your system security down the toilet if you have a internet facing application. WSL 2 is not ready for web security at the moment. That in itself makes WSL 2 a non option. The whole purpose of Nextcloud is to access my stuff from the web.

How much RAM do you have? 3GB's? Come on man! Hahahaha!

Seriously I run my Nextcloud instance with 4GB and if you have 16GB or more available it's not going to impact your host.

For me stability, compatibility, isolation, security and less headache give the win to VMWare. WSL 2 is still beta. I'd rather focus my energy on improving Nextcloud then trying to get WSL 2 to work.

My gut tells me WSL 2 is Microsoft testing the waters and looking at a Linux core for future OS's. Long term it would probably save them a ton on payroll and we know the bigwigs are greedy bastards right?

@JonCStout
Copy link
Author

JonCStout commented May 10, 2021

I currently have 8 gigs in that box (7-7.5 gigs usable due to sharing with APU), and no plans on spending money on upgrading it unless I have no choice. 4 gigs for a VM would be a deal breaker right now considering all the other stuff I'm running and for which I don't want swapping to happen. 2 gigs for a VM may be an option, but still less ideal than a few hundred megs for processes alone with no unused waste.

I don't consider WSL 2 to be beta: it is production ready as far as my node/React development has been. And MS's supposedly nefarious and speculative plans for it are irrelevant to my present needs.

@hobbsecky
Copy link

hobbsecky commented May 10, 2021

Nefarious indeed!

I'm a proponent of more facts as well as healthy debates.

Since I chose the lazy option of using VMWare 16 and Nextcloud VM I reap the reward of also being able to reconfigure the whole thing in about 30 seconds.

I set it to 2GB's RAM and 4GB virtual RAM. Live and learn. I was honestly very surprised to find that with just me using my Nextcloud there was NO difference in performance that I could feel. I also should note that I am running it as heavy as it can be ran at the moment because I have the high performance backends up....Talk, OnlyOffice, Push, Bitwarden(Response time is priority for me and I use the video chat daily with the Talk backend to connect to Asia from the USA with no issues). You may not use all of those features which means you'll have a smaller footprint.

2GB pics at ya' >>>>>>
Desktop Screenshot 2021 05 10 - 17 39 37 95
Desktop Screenshot 2021 05 10 - 17 40 23 13

Firefox is the RAM hog.

I need to run updates. No worries for me that the updates might break something. Sometimes they do.

VMWare Snapshot! Update Ubuntu in VM. Test. Everything OK? If not I just revert to the prior snapshot and wait for the worthless bums at Nextcloud VM(hehehehe) to fix it. Typically takes less than a day.

Profit.

Even better is the fact that I could give you full admin access to my Webmin and Nextcloud admin if you wanted to see for yourself. Sounds dumb except for the fact that it's a VM. Feel free to destroy everything and hack away. I just power off the sandbox when you're done. Literally takes one minute. Do that with WSL 2.

I don't work for VMware or Nextcloud VM even though it sounds like I do. I just have spent a hell of a lot of time experimenting with barebones, vbox, blah blah blah and after I found this setup there is no way in hell at this point in time I would ever consider anything else. This setup is easy, fast, reliable, secure.....all the check marks and the guys working on the VM take pride in their work and are super fast to fix things.

I recommend you grab a copy of the free 40 GB VM and VMware Player 16 and hollah back with some honest feedback.

Take care.

@JonCStout
Copy link
Author

JonCStout commented May 10, 2021

Those are all good points - mostly irrelevant to me right this second, but could sway me in the future. I presently have it working in WSL 2 just fine, so far, almost. I need to play with it more before deciding if it's not good enough in the end.

Full disclosure: I did run into one issue so far. I can't access it from other computers, yet. I expect that's due to port forwarding (which full VMs have to deal with, too), or maybe Apache permissions, or maybe firewall rules. I'm confident I'll figure that out quickly, later, though.

@hobbsecky
Copy link

hobbsecky commented May 10, 2021

I have minimal exposure to WSL 2 because I became aware of the limited networking capabilities in comparison to VMware and I punted.

That was last year.

This conversation has been beneficial to me because I had to research the current state of WSL 2. They have made some progress but it's still lacking on the networking side(among other things).

With VMware setting up a bridge, NAT whatever is just too easy and it works.

@JonCStout
Copy link
Author

JonCStout commented Jun 15, 2021

This post is just an update of things I've figured out lately, for those who may be interested.

First issue: make it persistent

... and fix the lack of systemd in WSL. In a nutshell: install systemd-genie and its prerequisites of transdebian and dotnet-runtime-5.0 (not SDK or ASPNET). Read their whole document to fix the timeout issues... (I had to learn more about how systemd worked than I knew before.)

transdebian: https://arkane-systems.github.io/wsl-transdebian/
dotnet: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
genie: https://github.com/arkane-systems/genie

And to make the system run after Windows reboots, just launch WSL and genie with something like this: wsl -d Ubuntu -u ncadmin -e genie -s

That command starts your Linux instance with systemd-genie running and leaves you in a command shell. Once it finishes loading, you can even close your terminal and your WSL instance stays running in the background. The -d selects your distribution, which you can maybe omit if you only have one, or it's the default. The -u selects your login username, which you can maybe omit if that's your default for the instance, too. The -e executes a command, namely genie, and genie's -s says to start a shell. That -s can probably be changed to something else to not start a shell if you want, but I haven't experimented with it. At any rate, that one line command can be issued from a .cmd batch file in your Startup folder, or from a Task Scheduler event after logon (or perhaps even before logon without a terminal window), or what I did for now is set up the official Microsoft Terminal (free from the Microsoft Store) to auto-start, default to my Ubuntu instance, and add genie to how that default instance starts. When my computer reboots, WSL with genie successfully comes back automatically. And genie (systemd) starts services like apache and mysql, thus making NextCloud run. Oh, I have auto-logon for my main Windows account, and a script that locks the screen 30 seconds later, so other unrelated user processes that aren't true services can also run. But that's just me.

If you want WSL to stop running in the background without rebooting and disabling your auto-startup, try "wsl -e genie -u" (from a Windows cmd prompt), wait about 15 seconds, and then "wsl -l --running" should report that Ubuntu is no longer running.

Second issue: make it accessible from other computers/devices

For that, I learned about netplan for Ubuntu to set a static IP within my home network's subnet, which wasn't so hard. But then I still needed to make the services (ports) accessible, which involved installing another Windows feature, Hyper-V, running its Manager AS ADMIN, and changing the WSL network adapter to External network (or Internal might work too, but definitely not Private, unless there's some way to mess with port forwarding, but I didn't want to bother with that). But then I found out that apt update wasn't working. So, I then had to follow some instructions to get WSL to stop clobbering /etc/resolv.conf with a wrong IP. Huzzah, my WSL instance (including NextCloud) is now accessible from other computers from a fixed IP address, with DNS working inside it.

Static IP: https://www.howtoforge.com/linux-basics-set-a-static-ip-on-ubuntu
Hyper-V switch manager: microsoft/WSL#4210 (comment)
Fix DNS: microsoft/WSL#5420

--

Having figured all that out was an interesting journey for me, but frankly, I don't recommend it for most people. The security issue is still a concern, but I'm behind a VPN, and never going to make it directly Internet accessible, so I think I'm okay there. The memory savings weren't as much as I'd hoped. WSL is taking over a gig to run this bare instance of NextCloud that I haven't even set up to do anything interesting with yet. And the NextCloud admin/overview page is showing 13 things I should fix, 4 of which are critical, meaning I still have a lot of work ahead of me to set it up "well". Most people would almost certainly be better off using a pre-made VM, for now.

However, I still see a path to where one day, much of that setup could be automated. For example, one way of telling if someone is running in WSL, and thus may need genie set up as a prerequisite, is to simply type uname -a. The kernel string will have Microsoft in the name. And the kernel version may give a clue whether WSL 1 or 2 is running. This might be an issue if someone compiles a custom kernel that excludes that string, though, so maybe there's a better way to detect WSL.

It may also be worth noting that I have Debian set up in WSL, too. I was accidentally running in it without realizing it for like half a day and wondering where my NextCloud stuff disappeared to after getting genie working there. So silly. But it did help me realize Debian is probably just as supportable as WSL, with probably just minor tweaks. For example, the YouTube instructions that worked in Ubuntu didn't work so well in Debian, probably because package names were different. I think in particular, it choked on not being able to find mysql-server. I think mysql-common is what might be needed on Debian, instead.

I also have ssh set up so I can remotely log in to that WSL instance, from another computer, with just 2 clicks in Windows Terminal, for what it's worth.

That YouTube video's comments (from an earlier post here) had several people asking about how to deal with these issues, and nobody there seemed to have come up with these solutions. So, I have cross-referenced this post there to hopefully help others a little. (Edit: my comments there aren't showing up, due to moderation? Or maybe they don't like the URL?) But like I said, most people are probably better off not even doing the WSL route for now. Though, with 22,000+ views, that video suggests to me that interest in this idea may be more than just a tiny niche.

@JonCStout
Copy link
Author

One interesting question I have is: if genie was set up in advance, would the install script then work unmodified? I'd have to figure out how to have a second Ubuntu instance, or to maybe backup my current one, wipe it out, and start over, to answer that. Maybe someday I'll try that, but probably not soon.

@enoch85
Copy link
Member

enoch85 commented Apr 29, 2022

From my own testing WSL really sucks. :) It's not reliable at all, even in Windows 11.

I don't think this is a way forward - trusting Windows in making great stuff in Linux. Anyone else with objections or should we close this issue?

@szaimen
Copy link
Collaborator

szaimen commented Apr 29, 2022

I also vote for closing this

@JonCStout
Copy link
Author

JonCStout commented Apr 29, 2022

I'd be interested in hearing more details of that testing. What Linux OS did you use? What setup method for NextCloud did you use? Did you use genie, and get the service port reliably accessible? What else did you have running on the machine (inside and out of WSL) that might have interferred, especially antivirus or firewall? What exactly seemed unreliable, and can it really be a blanket blame of WSL 2 when there's so many factors to consider?

Despite my curiosity, I have to admit I gave up on it, mostly because I couldn't justify the resource drain when I had 4 other higher priority things running. NextCloud would have to be rewritten to work natively on Windows, or not rely on heavy web services (Node.js perhaps?) for me to likely consider it again, or I'd have to invest in beefier hardware, which isn't in the cards soon. I realize rewriting is not very likely, though.

@enoch85
Copy link
Member

enoch85 commented Apr 29, 2022

@JonCStout There's not much to debate really. WSL isn't a "hypervisor" - it's just a way of getting Linux to Windows, and in a hackish way if you ask me.

The reason for me stating "it sucks", is that it crashed hard (not able to even start it (unknown error - you gotta love those error messages) on me several times when using it as a secondary system to Windows - just as intended. All the times I've been equally mad over the fact that I lost several weeks of work (I use backups, but still annoying).

I don't think it's a good idea to use for Nextcloud due to it's instability, and also the fact that it's not intended to use in the way as this issue wants. Sure you could probably get it working, but I wouldn't consider it stable, and that's a key value for running Nextcloud. So, WSL? No thanks.

@JonCStout
Copy link
Author

JonCStout commented Apr 29, 2022

I don't know why you'd say it isn't a hypervisor. WSL runs on Hyper-V, Microsoft"s VM implementation. Indeed, if I want to run VirtualBox instead, I have to not use WSL 2, and probably use a BCD edit to disable Hyper-V, as I can't get VirtualBox to run reliably with them on.

Edit: Were you trying to run other VMs in your work? It could be fair to say I saw such hard crashes when I was trying to mix WSL 2 and VirtualBox, though the other way around. It took me forever to figure out the conflict and get my VirtualBox machines to run again. Edit 2: I had to choose, couldn't do both at the same time without rebooting. I consider this another reason NextCloud should be native Windows or otherwise no VM required at all, but I digress.

@JonCStout
Copy link
Author

JonCStout commented Apr 29, 2022

The "hack" they use to make it work comes mainly from a custom Linux kernel that I believe has drivers and stuff for interacting with their VM. I see this as no different than what makes Qemu and VirtualBox and other VMs work as hypervisors with Linux guest OSs. Edit: Side note: Have you tried VirtualBox, with its drivers loaded in the guest, running a Linux guest on Windows in "seamless" mode? It's pretty cool. Can VMware do that, too? I'm not as familiar with that.

Edit 2: I will not cry when this gets closed, if everyone is done discussing.

Edit 3: Windows 11 is still somewhat new, and that could also be a stability factor. Also, were you using an insider edition, or a beta version of Windows 11 or WSL? I'm still on Windows 10 right now mainly for that reason, to give them more time to work out the bugs.

@enoch85
Copy link
Member

enoch85 commented Apr 29, 2022

I don't know why you'd say it isn't a hypervisor. WSL runs on Hyper-V, Microsoft"s VM implementation

Well, running the same thing in Hyper-V doesn't make it suddenly crash, so there's a big difference - believe it or not.

It took me forever to figure out the conflict and get my VirtualBox machines to run again

Make it easy on yourself and run VMware. They have built in support to run next to Hyper-V. Just an advice.

Windows 11 is still somewhat new, and that could also be a stability factor.

Sure, but WSL even worse in Windows 10. :) I've been using it in my daily work since it was released more or less. Windows gives me a hard time in general actually (work policy).

@enoch85
Copy link
Member

enoch85 commented Apr 29, 2022

Both me and @szaimen thinks this is a bad idea, and since no one else here seems to be willing to send a PR to make it happen - we'll close this.

@enoch85 enoch85 closed this as completed Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants