Setting up Visual Studio Code for WSL 2

Recently, I’ve published a blog post on how to set up the Windows Subsystem for Linux version 2 (WSL 2). I’m currently learning Ansible and I was searching for a solution that fits my needs in terms of usability, knowledge, etc. I’ve tested some Linux distributions, tried to connect remotely with my coding tool of choice, Visual Studio Code, but all were complex or didn’t work as expected. That’s the reason I gave WSL 2 a try.

I really like Visual Studio Code. It’s fast, supports a wide range of languages, and it’s free. Yes, free. And you don’t even need a registration nor a login to download it! VSCode also supports a variety of extensions. If it detects that you’re writing something in YAML, it might help you with a pop-up that there is an extension for it, for example, to properly highlight the syntax of that language. And that’s just one great example. With the combination of WSL 2 and VSCode, I’m able to write scripts (or playbooks in Ansible terms) and run them directly in the same tool. How cool is this?

Today, I’m going to show you how you can set up Visual Studio Code to use it with your already installed WSL 2 Linux distribution (at least when you read my previous blog post and followed the guide there).

Read more

Setting up Windows Subsystem for Linux Version 2 (WSL 2)

A few weeks ago I started getting familiar with Ansible. I’m far away from being an expert, and I’m probably not going so far anyway. But I want to learn some new things and train my skills. One quote which reminds me every day when I try and fail at something:

Even a lesson learned the hard way is a lesson learned.

Before getting deeper into Ansible, I had to find out how I can use Ansible, how I have to set up everything I need to get started. And it wasn’t easy. But I might have found a very convenient way. I’m not a Linux pro, but I know some things, and I’m flexible in learning new things. I have created the following guide for my own documentation, but hopefully, you find it helpful If you’re new to Ansible and you want to find out more like I wanted to do.

And before we dive deep here, I just assume that you already know that Ansible is an automation engine, driven by so-called playbooks. The playbooks contain your code (like for example, the instruction to search updates and install them in a specific Linux VM), which you then run against your infrastructure.

So let’s dive into the topics now. And yes, there are many guides available on the internet, showing you how to set up WSL 2. I’ve checked many of these guides during my initial setup tests etc. Unfortunately, most were not complete, others missed some steps (which means more research and tests needed). This guide has been developed and tested by myself, step by step, to make the setup of WSL 2 as easy as possible for you.

Read more

My homelab hardware gets its own rack

This project started a long time ago. When I planned the hardware needs for my homelab, I also thought of getting a rack. I had a real IT rack in mind, as you know it from your daily business, maybe back in the days when at least some stuff was on-premises and not everything in the cloud. I wanted to get a small rack with enough space to mount my whole homelab hardware into it, to have a proper cabling solution, and to have flexibility in case my homelab gets an extension.

But that wasn’t easy. There are various flavors of racks. The normal 42 unit IT rack, half-hight racks, and also various wall-mountable racks for patch panels, switches, and smaller devices. I was thinking and tinkering, looking for specs. But in the end, nothing satisfied me. Well, at least not from a price perspective, of being not able to transport it. And then, there was something going on on Twitter:

https://twitter.com/widmerkarl/status/1175392396974145542

Thanks to my colleague Michael Schroeder I’ve found something. He mentioned his IKEA rack, and that made me curious. Earlier in June, my colleague Fred Hofer announced that he moved his hardware into a bigger rack and that it was easier as when he moved from an IKEA Lack rack to the small rack:

https://twitter.com/Fred_vBrain/status/1267580223727550470

And that was the trigger! Why not building my own rack and tailor it to my needs? I don’t have to spend much money on a real IT rack, and I can do something handcrafted. The rack didn’t have to be anything special, there was not much in my personal specification book.

That’s the specifications planned:

  • Small (not full 42 rack units)
  • It should be lightweight
  • Enough space for at least three servers, some switches, and a NAS (or two)
  • Enough space for future homelab upgrades
  • Extensible, if needed
  • Should withstand some weight
  • Wheels!

The idea of building my own IKEA Lack Rack was born.

This whole homelab IKEA Lack Rack story will be covered in a small blog series. This blog post will start the series with some planning stuff, the first pictures, and the BOM, as far as I can provide it already. At least the BOM will be updated if there is a reason for it.

Read more

An easy way to quickly migrate a VMware VM to Synology VMM

When it comes to virtualization, I’m working with VMware products in my homelab, alongside (hardware) products from other manufacturers. But some special circumstances made a special solution to a problem necessary. Due to a month of military duty, when I was at home only for the weekend, I shut down my homelab. Not also due to this fact, but also because I’m currently building my own customized rack, where I will install my homelab hardware. Be sure to check my blog frequently to get more information about the rack, as I will blog about it soon!

What’s the reason for this migration?

I’m using Ubiquiti hardware for my networking (lab switches, home networking, including wireless), and also a Pi-Hole as my ad-blocker. These are the only “business-critical” services in my home network. And they were running on my homelab. But what should I do when I shut down everything? Well, VMware Workstation to the rescue! I’m (actually, I was) running an ESXi on VMware Workstation on my gaming computer. This ESXi server was managed with vCenter as a replication target for Veeam Backup and Replication. Quickly migrate the VMs to that virtual ESXi host, and that’s it. But what when I accidentally shut down this PC? Or I want to shut it down? I need another solution which is more like 24/7!

What’s the solution?

That made me think about Synology. I knew that at least some Synology NAS systems can run virtual workloads directly, either as a virtual machine or within Docker. I didn’t want to go with Docker because of the lack of knowledge, and I have only limited system resources on that NAS box. So it will be two VMs running on my Synology box! But how?

You can’t just vmotion your VMware VM to Synology VMM (Virtual Machine Manager). You can export the VMDK files or create an OVF, which you then import into Synology VMM. But that took to long, somehow (in certain circumstances I can be impatient …).

This blog post will show you how you can easily backup your VMware VMs to a Synology box, with their own toolset, and restore it directly into Synology VMM. It might come in handy, in case you’re searching also for a nifty solution to run a Pi-Hole or a Ubiquiti controller. Or some other small VMs.

To be honest, the Synology box isn’t a Ferrari, or a Fright Liner in terms of performance and / or capacity. Such a NAS is always somehow limited in CPU resources and memory. In my case, I was happy that I maxed-out the memory when I initially bought the NAS box. My current NAS looks like this:

You can see, there are not many resources, but it should be fine for some tiny Linux VM. A domain controller can even run on it if the resources are used sparingly. But don’t expect too much… And let’s dive into the topic now.

Read more

Nerdzone – a new category on my blog

Just recently I stumbled across a tweet from VMware, showing some virtualized operating systems on a Red Hat system:

I didn’t know that VMware software was running on Red Hat. I know the earlier ESX Server which you could install on Windows Server (something like VMware Workstation, but for business workloads), and I know the early ESX bare-metal hypervisor. But I wasn’t aware of Red Hat running VMware software. But there’s always something new to learn, isn’t it?

That led me to the fact that I have to install some old operating systems as well, just to see if I’m still able to do so (with some of them, it’s not just Next, Next, Finish) and if they can run on modern virtualized hardware. And they do!

I’m not sure if I’ll install more old operating systems. Probably I do. But I decided to create a new blog category here, called the “Nerdzone”.

I’ll put everything into this category which has to do with tech, but it’s not directly related to other categories on my blog. For example, I’ll put a blog post here where I’m writing about the installation of old operating systems, like a guide or something.

Until this blog post, and some other will come, this is just an announcement for now 😉