Help wanted!

Could some Windows user come up with a Powershell script that would install an Ubuntu VM, please?

How to run an Ubuntu Desktop virtual machine using VirtualBox 7 | Ubuntu looks like it would be a good start.

I could try installing a Win 11 VM and experimenting from there but I think there is a serious danger of disappearing up my own arse - so I won’t and will appeal for help instead.

If you only need access to a terminal, you can very quickly get VMs using Vagrant, which happens to be one of my all time favourite pieces of software.

Rather than use a VM, you can also consider using a combination of WSL2 and the new Windows Terminal.

What do you need the VM for? Is there some sort of trouble using safe on Windows? Or is this for something else?

1 Like

My thinking is to have everyone Windows Mac and Linux starting from the same baseline - a clean install of Ubuntu with a fresh ~/.safe and verified safe and sn_node binaries

Eliminate as many variables as possible and simplify providing support

If it can be achieved, I want a one-click install for all and then simple menus^ to get “nodes from home” whether that is actually home or cloud instances.

^ Did someone say @neik and his dancing whiptail menus?


Vagrant would work well for that. You can get it to run a set of scripts when the VM is spun up, the idea being you will get a machine in the exact same state for every vagrant up.

If you wanted to work with that on comnets, then fair enough, but the only thing is, we do need to have testing on all the platforms we support, so I would still like to see people running safe on a diversity of operating systems.


Here’s a little repo I have of Vagrant boxes. Might give you an idea.


Absolutely but that is a longer term project until we have a body of competent Windows users who can support the n00bs and help with Powershell scripts.

This effort is aimed at getting a larger no of participants quickly ( over next few days) to become more confident about joining in testnets.

I will look again at Vagrant - used it before with reasonable success just not for SAFE.

Can have a think when I get back to work and have some free time on my hands.

I was thinking about making a comnet specific version of my script that basically will remove all the options so so would be a run and done

1 Like

Im just winding you up, I know your time at home is precious.
Just had a visit from son#1 who is just back onshore himself.

Im going to look at whiptail myself once I have the basic structure right. I can/will reuse a lot of the comnet-install from comnet-install/ at testnet-menu · safenetwork-community/comnet-install · GitHub

1 Like

Feel free to use and abuse as you see fit

I don’t see any reason why there would be any problems using safe with Vagrant or a VM. Remember, Vagrant is just an automation tool for the underlying VM, so if there are problems, it’s not likely to be with Vagrant, but with VirtualBox, or whatever VM implementation you’re using. Speaking from experience, you often run into a lot of problems with VirtualBox on Windows.

However, running a node on a VM, that can potentially be an issue because of NAT or bridged networking. Again though, that is due to the VM, not Vagrant.

I will be working on this script in a VM myself so the first job is to get connected myself and take it from there.

I’ll check the network is connecting correctly before any SAFE setup so we can weed out basic connectivity problems early

I appreciate what you say re VMs but the alternative to just having a go at it now is waiting for someone who can provide similar scripts for Windows.

Anyway. I’m about to run vagrant-boxes/base-ubuntu-focal at master · jacderida/vagrant-boxes · GitHub
and see what happens.
If it goes well I’ll maybe put a network up on Hetzner and see if I can connect. Its only a small box, Im not kicking off a testnet, just to work out the connectivity.

1 Like

Vagrant is a bastard - that is all

1 Like

It didn’t.

What happened?


What didnt go wrong?

vagrant on a pretty vanilla Uuntu 22.04 was a pig to install and configure - strange cos when I last used it back 2018ish ISTR it JustWorked and I was perfectly happy for the simple use I needed it for.

After getting sick of screenfuls of error msgs like

I just gave up and got on with paying work.

If I cant easily get vagrant running, I can’t recommend it, let alone support it. Both Virtualbox and Virtual Machine Manager coexist fine on this box without vagrant anyway.

Anyway , Ive been busy with other stuff and have not moved on any SAFE scripts for a while. Might take a further look tonight.

oh and

willie@gagarin:~$ ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]


so if I CBA thats where I will look next.

1 Like

Hmm, 2.2 is an old version. It’s up at 2.3 now. Works perfectly on my Arch install.

Ruby is quite often a headache (Vagrant was implemented in Ruby, before Hashicorp started using Golang) when there needs to be multiple different versions. I’m not sure how you installed it, but it might be best to pull it from the apt-get package manager to make sure it’s a version that would be compatible with the current OS.

Arch can be a pain in some respects, but one thing it is amazing for is the community keeping the package management system up to date so you generally always have access to recent applications that are compatible with whatever the current OS configuration is in terms of things like the Ruby and Python environments.

1 Like

Also, the folk who would be using it in your scenario would be installing it on Windows, so I don’t understand how that’s relevant to having problems installing it on Ubuntu.

The Windows version has an MSI-based installer and the application will use an isolated version of Ruby that it’s distributed with, so it’s unlikely to be subject to these same problems.

Interestingly, it looks like there’s some Golang in the codebase now, which would be a much better language for something like Vagrant because it takes away the Ruby headache. I wonder if there’s a long term version for a full port…

1 Like

Overall btw, I still feel like it would be better for Windows users to run natively rather than use a Linux VM. What is your barrier for doing that? Because you don’t have Bash script equivalents in Powershell?

One thing is, you could see if ChatGPT could convert the scripts, and I would also be willing to help you with that.


100% agree

No native Windows box handy. I am downloading a Win10 torrent right now to use in a VM but I’d still have a wee bit of dubiety as I would be using VM bridged networking to develop this rather than bog std Windows networking to eth0 or wlan0.

Now that is a good idea and I’ll be taking you up on that once I have converted a couple of simple bash scripts to Powershell to see what the major hassles/issues are.
Its all on hold for a day or so as Im busy with other stuff right now.


OK. If you want me to try anything, I can run it on my Windows gaming machine, which is currently Windows 10. I keep declining the upgrade it’s offering me to 11, but I could take it if it would be preferable to use that platform.

In general btw, ChatGPT is excellent for shell scripts. I’ve had it write me quite a lot of utility stuff in Fish shell. It doesn’t always get things 100% right, but it gets the general gist and you can modify the wee niggles yourself.

I’ve never tried to ask it to convert from one language to another though.

1 Like