diff --git a/README.md b/README.md index a4b8902..cffada1 100755 --- a/README.md +++ b/README.md @@ -17,10 +17,15 @@ Setup * Modify config.php to your needs * Visit page to generate svmm_db for flat file user database * Execute SVMM backend as SU: sudo ./start-svmm start -* Copy a fresh OS install of your choice in a qcow2 (or other format) image to svmm_db/disks/clean.img (THIS MUST BE DONE FOR THE SCRIPT TO COPY AND START A FRESH VM) +* Copy a fresh OS install of your choice in a qcow2 (or other format) image to svmm_db/disks/alpine.img and svmm_db/disks/debian.img (THIS MUST BE DONE FOR THE SCRIPT TO COPY AND START A FRESH VM) + * * For notes on the vm name, they'll be updated in the future. ChangeLog ---- +11/3/2020 - v1.1 +* Multi-VM specifications for startup options... +* Support VM deletion in case of VM disk corruption of needing of a fresh VM. + 9/24/2020 - v1.0 * Working PHP front end with user registeration and login * Working bash back end for server management diff --git a/config.php b/config.php index 857d2ab..eab4e4c 100644 --- a/config.php +++ b/config.php @@ -3,13 +3,13 @@ // SVMM - Simple VM Manager - For Qemu KVM // (C) Chris Dorman, GPL v3 (2013-2020) // https://github.com/Pentium44/SVMM -// Version: 1.0 +// Version: 1.1 /////// -$svmmtitle = "FreeBox"; // SM title -$desc = "Simple, ad-free, yet flexible VPS hosting platform to the user; for the user! " . $svmmtitle . " is powered by SVMM.

With a fresh account, you'll be able to create your own free VPS, and 1 is available per user."; // platform description -$domain = "vps.cddo.cf"; // where is SSB operating? -$version = "1.0"; // version -$maxvm = "100"; // max vm count +$svmmtitle = "Simple VM Manager"; // SM title +$desc = "Simple, ad-free, yet flexible VPS hosting platform to the user; for the user! " . $svmmtitle . " is powered by SVMM.

With a fresh account, you'll be able to create your own free VPS, and 1 is available per user. Each VM is monitored for inappropriate network traffic. Mining scripts, torrenting, seedboxes, proxy servers, and copywritten content without proper ownership is strictly forbidden on these servers. VM security is left to the user and is to be taken seriously! Root passwords MUST be changed when first generating your VM. Malicious findings will result in the removal of your user account and your VM!"; // Description +$domain = "https://hosting.cddo.cf"; // where is SSB operating? +$version = "1.1"; // version +$maxvm = "50"; // max vm count ?> diff --git a/freebox-logo.png b/freebox-logo.png new file mode 100644 index 0000000..d28ee36 Binary files /dev/null and b/freebox-logo.png differ diff --git a/index.php b/index.php index f5698c2..2c42721 100644 --- a/index.php +++ b/index.php @@ -67,8 +67,8 @@ $username = $_SESSION['svmm-user']; --> +
-
VM status: "; $vmstatus = file_get_contents("svmm_db/users/$userid.pid.status"); echo $vmstatus; - echo "
Start Stop"; + echo "
Start Stop Delete"; echo "

"; echo "Connection information (Via SSH):
"; echo ""; @@ -291,7 +344,7 @@ else if(isset($_GET['do'])) } else if (!isset($_SESSION['svmm-user']) || !isset($_SESSION['svmm-pass'])) { - loginForm(); + header("Location: index.php?do=about"); } else { @@ -299,9 +352,14 @@ else if(!file_exists("svmm_db/disks/$userid.img")) { echo "

Free VPS creation

"; - echo "

Each user will have the ability to create a VM, and will have a consistent uptime unless FreeBox ends up being disabled due to malicious users improperly using the virtual machines

"; - echo ""; - echo "Create a VPS"; + echo "

Each user will have the ability to create a VM, and will have a consistent uptime unless FreeBox ends up being disabled due to malicious users improperly using the virtual machines. The choice is yours, but remember theres a limited amount of mini boxes in comparison to the micro boxes.

"; + echo "
IP/Port: cddo.cf/" . $userid . "22
"; + echo "
  • CPU: 25% of 1x Xeon E5649 core
  • RAM: 128MB dedicated
  • Disk: 10GB dedicated space
  • OS: Alpine GNU/Linux
  • Network: 50mbps down + 2mbps upload
  • Select available ports for server operation
"; + echo ""; + echo "
"; + echo "
  • CPU: 50% of 2x Xeon E5649 cores
  • RAM: 512MB dedicated
  • Disk: 25GB dedicated space
  • OS: Debian GNU/Linux
  • Network: 50mbps down + 2mbps upload
  • Select available ports for server operation
"; + echo ""; + echo "
"; } else { diff --git a/machine b/machine index 6542f02..cf62655 100755 --- a/machine +++ b/machine @@ -1,8 +1,10 @@ #!/bin/bash -MAXLOAD=25 +MAXLOADMICRO=25 +MAXLOADMINI=50 CMD="qemu-system-x86_64" -MEMS=138 +MEMSMICRO=138 +MEMSMINI=544 case $1 in status ) @@ -26,9 +28,16 @@ case $1 in ;; esac ;; - start ) - $CMD -enable-kvm -daemonize -display none -hda svmm_db/disks/$2.img -m ${MEMS}M -net nic,model=e1000,vlan=0,vlan=1 -net user,vlan=0,vlan=1,hostfwd=tcp::${2}80-:80,hostfwd=tcp::${2}22-:22,hostfwd=tcp::${2}66-:6666,hostfwd=tcp::${2}65-:25665,hostfwd=tcp::${2}21-:21,hostfwd=tcp::${2}67-:6667 -pidfile svmm_db/pids/$2.pid - ./setcpulimit $(cat svmm_db/pids/$2.pid) $MAXLOAD > /dev/null & + start-micro ) + $CMD -enable-kvm -daemonize -display none -hda svmm_db/disks/$2.img -m ${MEMSMICRO}M -net nic,model=pcnet,vlan=0,vlan=1 -net user,vlan=0,vlan=1,hostfwd=tcp::${2}80-:80,hostfwd=tcp::${2}22-:22,hostfwd=tcp::${2}66-:6666,hostfwd=tcp::${2}65-:25665,hostfwd=tcp::${2}21-:21,hostfwd=tcp::${2}67-:6667 -pidfile svmm_db/pids/$2.pid + ./setcpulimit $(cat svmm_db/pids/$2.pid) $MAXLOADMICRO > /dev/null & + + #./setkilltimer $(cat svmm_db/pids/$2.pid) $2 > /dev/null & + ;; + + start-mini ) + $CMD -enable-kvm -daemonize -display none -hda svmm_db/disks/$2.img -m ${MEMSMINI}M -smp 2 -net nic,model=pcnet,vlan=0,vlan=1 -net user,vlan=0,vlan=1,hostfwd=tcp::${2}80-:80,hostfwd=tcp::${2}22-:22,hostfwd=tcp::${2}66-:6666,hostfwd=tcp::${2}65-:25665,hostfwd=tcp::${2}21-:21,hostfwd=tcp::${2}67-:6667 -pidfile svmm_db/pids/$2.pid + ./setcpulimit $(cat svmm_db/pids/$2.pid) $MAXLOADMINI > /dev/null & #./setkilltimer $(cat svmm_db/pids/$2.pid) $2 > /dev/null & ;; @@ -43,5 +52,5 @@ case $1 in echo "Stopped!";; * ) - echo "Usage: machine {start|status|stop|stopall} {_|html|return} [vm id]";; + echo "Usage: machine {start-mini|start-large|status|stop|stopall} {_|html|return} [vm id]";; esac diff --git a/style.css b/style.css index c7c9460..54d4395 100644 --- a/style.css +++ b/style.css @@ -12,6 +12,8 @@ html, body { .title { font-size: 46px; text-align: center; + background-position: center; + background-color: #dddddd; padding: 8px; } @@ -105,11 +107,11 @@ a:hover { .contain { background-color: #121212; border: solid 1px #565656; - width: 690px; - max-width: 690px; - min-width: 690px; + width: 680px; + max-width: 680px; + min-width: 680px; margin: 0 auto; - padding: 5px; + padding: 10px; } .maincontain {