bashvm - CLI VM Manager - bashvm.com

Hello everyone,

I’m very excited to present everyone bashvm, I have been working on for some time and I wanted to get more exposure on the project.

bashvm is basically a bash script that can manage virtual machines with only ssh access required, In result it has very little overhead and reduces the attack surface for the hypervisor since it is just a bash script.

More details can be found on https://bashvm.com

Screenshots: https://bashvm.com/screenshots.html
Guide: https://bashvm.com/guide.html
Github: https://github.com/babywhale321/bashvm

Here is an example of creating a new vm using the automate option


bashvm has many features and many more to come so all comments or suggestion are welcomed.

Comments

  • any bench?

    Thanked by (1)Not_Oles

    ServerFactory aff best VPS; HostBrr aff best storage.

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @yoursunny said:
    any bench?

    Node

    root@zombie ~ # curl -sL yabs.sh | bash
    # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
    #              Yet-Another-Bench-Script              #
    #                     v2024-01-01                    #
    # https://github.com/masonr/yet-another-bench-script #
    # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
    
    Sat Mar  2 04:34:52 AM UTC 2024
    
    Basic System Information:
    ---------------------------------
    Uptime     : 0 days, 2 hours, 51 minutes
    Processor  : Intel(R) Xeon(R) CPU E3-1275 v5 @ 3.60GHz
    CPU cores  : 8 @ 3600.000 MHz
    AES-NI     : ✔ Enabled
    VM-x/AMD-V : ✔ Enabled
    RAM        : 62.6 GiB
    Swap       : 32.0 GiB
    Disk       : 436.7 GiB
    Distro     : Ubuntu 22.04.4 LTS
    Kernel     : 5.15.0-89-generic
    VM Type    : NONE
    IPv4/IPv6  : ✔ Online / ✔ Online
    
    IPv6 Network Information:
    ---------------------------------
    ISP        : Redacted Online GmbH
    ASN        : AS24940 Redacted Online GmbH
    Location   : Falkenstein, Saxony (SN)
    Country    : Germany
    
    fio Disk Speed Tests (Mixed R/W 50/50) (Partition /dev/md2):
    ---------------------------------
    Block Size | 4k            (IOPS) | 64k           (IOPS)
      ------   | ---            ----  | ----           ---- 
    Read       | 489.57 MB/s (122.3k) | 782.80 MB/s  (12.2k)
    Write      | 490.86 MB/s (122.7k) | 786.92 MB/s  (12.2k)
    Total      | 980.43 MB/s (245.1k) | 1.56 GB/s    (24.5k)
               |                      |                     
    Block Size | 512k          (IOPS) | 1m            (IOPS)
      ------   | ---            ----  | ----           ---- 
    Read       | 805.23 MB/s   (1.5k) | 865.85 MB/s    (845)
    Write      | 848.01 MB/s   (1.6k) | 923.52 MB/s    (901)
    Total      | 1.65 GB/s     (3.2k) | 1.78 GB/s     (1.7k)
    
    iperf3 Network Speed Tests (IPv4):
    ---------------------------------
    Provider        | Location (Link)           | Send Speed      | Recv Speed      | Ping           
    -----           | -----                     | ----            | ----            | ----           
    Clouvider       | London, UK (10G)          | 921 Mbits/sec   | 829 Mbits/sec   | 24.4 ms        
    Scaleway        | Paris, FR (10G)           | 923 Mbits/sec   | 929 Mbits/sec   | 21.1 ms        
    NovoServe       | North Holland, NL (40G)   | busy            | 935 Mbits/sec   | 10.8 ms        
    Uztelecom       | Tashkent, UZ (10G)        | 877 Mbits/sec   | 432 Mbits/sec   | 90.3 ms        
    Clouvider       | NYC, NY, US (10G)         | 867 Mbits/sec   | 555 Mbits/sec   | 85.2 ms        
    Clouvider       | Dallas, TX, US (10G)      | 839 Mbits/sec   | 349 Mbits/sec   | 120 ms         
    Clouvider       | Los Angeles, CA, US (10G) | 808 Mbits/sec   | 396 Mbits/sec   | 150 ms         
    
    iperf3 Network Speed Tests (IPv6):
    ---------------------------------
    Provider        | Location (Link)           | Send Speed      | Recv Speed      | Ping           
    -----           | -----                     | ----            | ----            | ----           
    Clouvider       | London, UK (10G)          | 909 Mbits/sec   | 918 Mbits/sec   | 24.4 ms        
    Scaleway        | Paris, FR (10G)           | busy            | busy            | 21.5 ms        
    NovoServe       | North Holland, NL (40G)   | 918 Mbits/sec   | 923 Mbits/sec   | 10.8 ms        
    Uztelecom       | Tashkent, UZ (10G)        | 867 Mbits/sec   | 604 Mbits/sec   | 90.2 ms        
    Clouvider       | NYC, NY, US (10G)         | 858 Mbits/sec   | 511 Mbits/sec   | 85.0 ms        
    Clouvider       | Dallas, TX, US (10G)      | 824 Mbits/sec   | 454 Mbits/sec   | 120 ms         
    Clouvider       | Los Angeles, CA, US (10G) | 797 Mbits/sec   | 402 Mbits/sec   | 150 ms         
    
    Geekbench 6 Benchmark Test:
    ---------------------------------
    Test            | Value                         
                    |                               
    Single Core     | 1403                          
    Multi Core      | 4575                          
    Full Test       | https://browser.geekbench.com/v6/cpu/5138179
    
    YABS completed in 12 min 59 sec
    root@zombie ~ # 
    

    VM Made with bashvm

    root@vm1-zombie:~# curl -sL yabs.sh | bash
    # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
    #              Yet-Another-Bench-Script              #
    #                     v2024-01-01                    #
    # https://github.com/masonr/yet-another-bench-script #
    # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
    
    Fri Mar  1 11:18:33 PM EST 2024
    
    Basic System Information:
    ---------------------------------
    Uptime     : 0 days, 1 hours, 53 minutes
    Processor  : Intel(R) Xeon(R) CPU E3-1275 v5 @ 3.60GHz
    CPU cores  : 4 @ 3599.998 MHz
    AES-NI     : ✔ Enabled
    VM-x/AMD-V : ✔ Enabled
    RAM        : 3.8 GiB
    Swap       : 976.0 MiB
    Disk       : 90.2 GiB
    Distro     : Debian GNU/Linux 12 (bookworm)
    Kernel     : 6.1.0-18-amd64
    VM Type    : KVM
    IPv4/IPv6  : ✔ Online / ✔ Online
    
    IPv6 Network Information:
    ---------------------------------
    ISP        : Redacted Online GmbH
    ASN        : AS24940 Redacted Online GmbH
    Location   : Falkenstein, Saxony (SN)
    Country    : Germany
    
    fio Disk Speed Tests (Mixed R/W 50/50) (Partition /dev/vda1):
    ---------------------------------
    Block Size | 4k            (IOPS) | 64k           (IOPS)
      ------   | ---            ----  | ----           ---- 
    Read       | 246.89 MB/s  (61.7k) | 791.99 MB/s  (12.3k)
    Write      | 247.54 MB/s  (61.8k) | 796.15 MB/s  (12.4k)
    Total      | 494.43 MB/s (123.6k) | 1.58 GB/s    (24.8k)
               |                      |                     
    Block Size | 512k          (IOPS) | 1m            (IOPS)
      ------   | ---            ----  | ----           ---- 
    Read       | 863.79 MB/s   (1.6k) | 903.63 MB/s    (882)
    Write      | 909.69 MB/s   (1.7k) | 963.81 MB/s    (941)
    Total      | 1.77 GB/s     (3.4k) | 1.86 GB/s     (1.8k)
    
    iperf3 Network Speed Tests (IPv4):
    ---------------------------------
    Provider        | Location (Link)           | Send Speed      | Recv Speed      | Ping           
    -----           | -----                     | ----            | ----            | ----           
    Clouvider       | London, UK (10G)          | 921 Mbits/sec   | 932 Mbits/sec   | 24.7 ms        
    Scaleway        | Paris, FR (10G)           | busy            | busy            | 21.3 ms        
    NovoServe       | North Holland, NL (40G)   | 923 Mbits/sec   | 935 Mbits/sec   | 11.2 ms        
    Uztelecom       | Tashkent, UZ (10G)        | 621 Mbits/sec   | 443 Mbits/sec   | 90.5 ms        
    Clouvider       | NYC, NY, US (10G)         | 836 Mbits/sec   | 612 Mbits/sec   | 84.9 ms        
    Clouvider       | Dallas, TX, US (10G)      | 805 Mbits/sec   | 430 Mbits/sec   | 121 ms         
    Clouvider       | Los Angeles, CA, US (10G) | busy            | 303 Mbits/sec   | 150 ms         
    
    iperf3 Network Speed Tests (IPv6):
    ---------------------------------
    Provider        | Location (Link)           | Send Speed      | Recv Speed      | Ping           
    -----           | -----                     | ----            | ----            | ----           
    Clouvider       | London, UK (10G)          | 909 Mbits/sec   | 920 Mbits/sec   | 24.7 ms        
    Scaleway        | Paris, FR (10G)           | busy            | 916 Mbits/sec   | 21.8 ms        
    NovoServe       | North Holland, NL (40G)   | 917 Mbits/sec   | 923 Mbits/sec   | 11.1 ms        
    Uztelecom       | Tashkent, UZ (10G)        | 844 Mbits/sec   | 528 Mbits/sec   | 90.2 ms        
    Clouvider       | NYC, NY, US (10G)         | 855 Mbits/sec   | 448 Mbits/sec   | 84.8 ms        
    Clouvider       | Dallas, TX, US (10G)      | 789 Mbits/sec   | 442 Mbits/sec   | 121 ms         
    Clouvider       | Los Angeles, CA, US (10G) | 749 Mbits/sec   | 361 Mbits/sec   | 150 ms         
    
    Geekbench 6 Benchmark Test:
    ---------------------------------
    Test            | Value                         
                    |                               
    Single Core     | 1421                          
    Multi Core      | 4118                          
    Full Test       | https://browser.geekbench.com/v6/cpu/5138073
    
    YABS completed in 14 min 45 sec
    root@vm1-zombie:~# 
    
    Thanked by (1)babywhale

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @babywhale Thanks for bashvm! <3 :star: <3 :star: <3 :star: <3 :star: <3 :star:

    Over the last couple of weeks I have tried bashvm on three dedicated servers, running either Debian 12 or Ubuntu 22.04 LTS. I have tried to go through variations on the VM install procedures, such as, for example, changing, as scripted by bashvm, the source of the software installed in the VM between official distribution supplied qcow2 images and official distribution supplied ISOs. bashvm also provides, and as additional examples of my testing, I have tried to test multiple VM networks on the Node, port forwarding, and IPv6 with dhcpv6.

    As a clueless™ guy, I can say that the most basic use of bashvm, autocreated VMs made from official distribution supplied qcow2 cloud images, are pretty easy. My workflow, so far, for bashvm autocreated VMs, the simplest case, looks like this [the numbers inside brackets are bashvm menu sequences]:

    Make an Auto Cloud VM (= KVM VPS from official distro qcow2 cloud image)
      Clone bashvm
      Install bashvm with bashvm-installer
      Create an Auto Cloud Image VM -- [1,10]
      Add port forwarding -- [7]
      Add dhcpv6 (auto) to default network -- [3,8]
      Add dhcpv6 reservation -- [3,10] # Haven't tried this step yet
      Start VM [1,2], console inside [1,11], add ssh keys and 51-Not_Oles.conf, restart sshd
    

    Installing from official distribution supplied ISOs is a little more complicated, especially if we decide to add a different Node network. Also, VMs created from ISOs require VNC to install the VM's internal software, configure the VM's IPv6, install openssh-server, etc. It appears that bashvm might support almost any ISO, but, for example, I haven't tried any BSD ISOs as yet.

    Probably most LESbians already know @babywhale from his dedicated work on the FreeVPS project. Now, in addition to his FreeVPS work, @babywhale also has given us bashvm! Notably, bashvm is open source under the MIT license. Also, delightfully, bashvm runs over ssh, so no web framework is required -- and, accordingly, no possibility of attacks and compromises exists via a web framework which isn't there!

    During the entire time that I have known @babywhale, both in the FreeVPS context and now in the bashvm context, he always has been super friendly, super dependable, and super hard working! He always responds almost immediately to the dozens of questions I ask. He steadily and consistently improves bashvm! He is beyond awesome! @babywhale deserves a huge round of applause from everyone on the Low End! 👏👏👏👏👏 Certainly there is no doubt whatsoever that @babywhale is one of the most dedicated and one of the best contributors to our Low End community! <3

    I am cautiously optimistic that bashvm will enable MetalVPS, finally, to more fully utilize excess server capacity by enabling awesome community members to receive high quality, performant libvirt KVM VMs created on MetalVPS servers by bashvm.

    Lest anyone become too afraid, :) no, MetalVPS isn't giving up its on-the-metal mantra. But, awesome MetalVPS Neighbors ought also to have the option of running on emulated or virtual KVM metal. And bashvm <3 provides a wonderful opportunity to make emulated metal or virtual metal MetalVPSes happen safely and dependably via libvirt. More on all this before too long!

    Thanks to @babywhale for bashvm! <3

    Thanks to @crunchbits for wonderful Crunchy! <3

    I hope everyone gets the servers they want!

  • edited March 2

    Great to see a fully textual menu system: takes me back to one I created some 30 years ago. :)
    No bloat there, it seems. :+1:
    Nice one @babywhale

    Thanked by (2)Not_Oles babywhale

    It wisnae me! A big boy done it and ran away.
    NVMe2G for life! until death (the end is nigh)

  • Not_OlesNot_Oles Hosting ProviderContent Writer
    edited March 3

    Just for crazy fun, If someone wanted to write a front end web interface for bashvm, maybe it could use something like:

    https://bashsta.cc/

    https://github.com/cgsdev0/bash-stack


    HN discussion at https://news.ycombinator.com/item?id=37265392 includes this gorgeous tidbit:

    "Other similar projects require a CGI-capable web server. This one instead uses djb's tcpserver. Guess next step will be to drop any external dependencies."
    -- https://news.ycombinator.com/item?id=37271827

    Everyone here knows about djb, right? https://cr.yp.to


    Probably bashvm could be added to FOSSBilling? @BelleNottelling

    Or FOSSBilling could be somewhat simplified and re-implemented in bash-stack?
    Of course, SimplyFOSSBilling would use djb's qmail. And flat file databases processed with awk.
    Is it really true that Gmail started with qmail?
    Last time I looked there was a working implementation of qmail in NetBSD's pkgsrc.

    Thanked by (1)babywhale

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @babywhale continues working hard on bashvm!

    root@zombie ~/bashvm # date
    Wed Mar  6 06:00:14 PM UTC 2024
    root@zombie ~/bashvm # git pull
    remote: Enumerating objects: 27, done.
    remote: Counting objects: 100% (27/27), done.
    remote: Compressing objects: 100% (23/23), done.
    remote: Total 23 (delta 15), reused 0 (delta 0), pack-reused 0
    Unpacking objects: 100% (23/23), 9.48 KiB | 388.00 KiB/s, done.
    From https://github.com/babywhale321/bashvm
       0f14771..03ae062  main       -> origin/main
    Updating 0f14771..03ae062
    Fast-forward
     bashvm-cloudinit.sh       |  49 ++++++++++++++----
     bashvm-cloudinit.yaml     |  31 ------------
     bashvm-port-forwarding.sh |  10 +++-
     bashvm.sh                 | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
     4 files changed, 207 insertions(+), 58 deletions(-)
     delete mode 100644 bashvm-cloudinit.yaml
    root@zombie ~/bashvm # 
    
    Thanked by (1)babywhale

    I hope everyone gets the servers they want!

Sign In or Register to comment.