I make a unique user for each VM - root account is secured with SSH login disabled and a unique password, which is stored in my password manager.
Also, don't use Virtualbox. It's Oracle garbage. Use virt-manager instead.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
I make a unique user for each VM - root account is secured with SSH login disabled and a unique password, which is stored in my password manager.
Also, don't use Virtualbox. It's Oracle garbage. Use virt-manager instead.
Incus has a great selection of images that are ready to go, plus gives scripted access to VMs (and LXC containers) very easily; after incus launch
to create a VM, incus exec
can immediately run commands as root for provisioning.
Use qemu, or proxmox (it includes qemu).
Create one VM to your liking, then make it a template.
So when you need a new VM, you clone the template, and that's it.
There's many ways to do this. Saving the disk state is one, I believe that's what the other person suggested - essentially stores the disk as an image which then you use for future vms as your jumping off point. This is also essentially how workstations are deployed at companies. (Essentially being the key word). Cloud providers have different names for this too, in AWS this is called their AMI.
Another option is Ansible, which essentially handles deploying a VM by running your scripts for you. I haven't played too much with this, and I doubt it works with VirtualBox, but it's something you may want to look into, it would definitely uplevel your skills.
Thirdly is dependent on what you actually use your VM for, you haven't given your use cases but this is one of the reasons containerization became such a thing - because when running an app we mostly don't care about the underlying system. It may be worth it to learn about docker.
I’m playing with a multicast data delivery software I’m building. Doing tests from a sever (VM) to 20+ clients and/or other server (VMs). All running through a Open5GS gNodeB (5G network core). Also testing out potential software to be a docker image. I’m slowly converting to containers but I might just need to make the leap.
Sounds like it, I think docker is exactly what you're looking for
snapshots, clones, or automated setup with ansible or such
Simple method is just keep a ready to go VM and clone it.
Thank you!
NP! That's how I do it on proxmox, I'll start the VM every so often and update it. Only takes a few seconds to clone so it's nice and quick to do.
Just read their doc and saw a video about. Very streamlined. I love it.
There is also Vagrant which lets you specify VM specs, but also lets you install software in the VMs automatically. It also works for other VM software then just Virtualbox.
Thank you I’ll check it out.
Some combination of Ansible and cloud-init is probably what you're looking for.
This. Cloud-init, or autoinstall for Ubuntu, to get the install done, then use ansible for anything more.
Save the machine state after you get it booted up and configured. Host+T
Some good advice already in this thread.
Also worth considering QEMU as an alternative to VirtualBox. The Virt-manager tool is decent way of managing machines, and it's relatively straight forward to create a base machine if you're duplicating it. Virtualbox is perhaps initially more user friendly for absolute beginners, but once you have any familiarity with virtualization I'd suggest QEMU offers much more.
Also I find integration between the guest and the host linux system is generally more straight forward. Most linux systems already ship with samba and other relevant tools QEMU uses to interact between host and guest. There isn't a need to faff around with the guest-additions stuff. Plus KVM virtual machines can run with near native performance.
Thank! I’ll check out QEMU. Sounds like something I need.
Mandible is on my list of things to learn and play with. I’ll check it out thank you.
Use virt-manager
https://www.alpinelinux.org/about/ Check out Alpine. Might just be enough for what you want
I don’t think it’s a OS thing, I think it’s a hypervisor thing.