How to create a CollabVM Mirror the proper way

From Computernewb Wiki
Revision as of 22:43, 17 May 2022 by Dartz (talk | contribs) (1 revision imported)
Jump to navigation Jump to search

This tutorial is meant for Linux machines. You should also use a Ubuntu based distro too. I used Lubuntu (the CollabVM one) but it should work on Kubuntu, Xubuntu or anything else.

Other Linux distributions work as well (as long as it's not CentOS), provided that you install the packages that collab-vm-server needs from your package manager.

You need a fully clean CollabVM server to run this! mkcvm requires 1GB of ram anyways...

How to create a CollabVM Mirror the proper way

Compiling the server

First off, you should have the server and webapp. If not, follow these steps:

Option 1: Use mkcvm

It's extremely simple. Just type these in the terminal, just make sure you have latest updates:

sudo apt install curl qemu qemu-utils -y
curl -Lk http://tiny.cc/mkcvm -o mkcvm.sh
chmod +x mkcvm.sh
./mkcvm.sh

You do not need qemu utils if your on Lubuntu 18.04. If you are doing this on VM3, you also need to run these commands:

sudo apt-get update
npm

If you did it all correctly, you should see 100 verbose messages, gets, and something about compiling files. If that's the case, you did it!!!!

Option 2: Do it yourself

Use this wiki page: How to install CollabVM/1.x

Making a VM

Start the server, and then go to localhost:port/admin and type in the password "collabvm" (without quotes) You should scroll down and check the mark next to Change Master Password, and change the password. Uncheck the mark once you are done. Scroll down and make a VM. You should change these:

  • Name: internal name
  • Display Name: the actual name
  • VNC Port: keep at 5900, if you are running more than 1 VM change this by 1
  • QMP Port: keep at 5800, if you are running more than 1 VM change this by 1
  • Start Command: we will do later

Now we are doing the start command.

A example would be qemu-system-x86_64 -cdrom ~/Documents/ISOs/XP.iso -hda ~/Documents/xp.qcow2 -m 512 -usbdevice tablet

You can use these arguments: also (o) stands for optional

  • -cdrom: iso file
  • -hda: hard disk file
  • -m: memory in mb
  • -usbdevice: you should keep it at usb-tablet
  • -enable-kvm(o): fast vm (Or alternatively, -accel tcg,thread=multi if you are not going to use x86 or have no hardware acceleration at all, this enables multi-threaded TCG)
  • -cpu(o): you should keep it at host
  • -boot(o): check below for parameters, and menu=on to display boot menu on boot
  • -net: you should keep it at user

-boot Parameters

  • a: boot from floppy
  • c: boot from drive
  • d: boot from cd
  • n: boot from rom

If you don't know how to create a hard disk this is a example qemu-img create -f qcow2 xp.qcow2 10G

You should start the VM now.

You see something like this?

guest44673
> hurr durr
Send

Double click your username. It may take more than a click. Type in the password you put in to the Admin Panel. You should be granted admin access now.

Installing the VM

Install the VM like you normally would. After you are done with that, go back into the Admin Panel and change these:

  • Turns Enabled: Yes
  • Start Command: remove the -cdrom

Now you should take a snapshot of the VM. Go into the terminal and type in this:

qemu-img create -f qcow2 -b yourimage.qcow2 -F qcow2 newsnapshot.qcow2

Go back into the Admin Panel and change these:

  • Votes Enabled: Yes
  • Start Command: change the hard disk you used for the installation to the snapshot hard disk

And just like that, YOU DID IT!!!! YOU MADE A COLLABVM MIRROR!!!!