LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-16-2020, 04:30 AM   #1
dalacor
Member
 
Registered: Feb 2019
Distribution: Slackware
Posts: 76

Rep: Reputation: Disabled
Running Slackware on a Hyper-V virtual machine


I am about to sign up with a dedicated server hosting company where they will provide me with a dedicated server in their Data Centre.

Along with many of these providers, they don't provide a hardware firewall as standard. It would cost me around 50 a month for a hardware firewall which I don't feel is worthwhile.

Reading up on the subject some people are using the Software firewall on their Windows Servers (tightened up considerably of course) and while this in theory is sufficient, I don't have the same confidence in Windows Firewalls that I do in a Linux or dedicated firewall system.

So I am looking to setup Slackware in a VM to act as a firewall and Nat Forwarding system. It will basically only run IPtables and IP forwarding.

I have only found one topic about running Slackware in a VM and it appears that it can be done, but no information on the Internet regarding how reliable it is or whether there any issues to factor in for running Slackware or any Linux distro in a VM.

Any thoughts.
 
Old 05-16-2020, 07:24 AM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,425

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
I'm using Slackware in a VM at my office, on VMware ESXi. It runs for months on end without issue and only gets taken offline for updates. Hasn't missed a beat.

I only installed the A, AP and N series because initially I wanted to use it to automate backups... but now it is also an OpenVPN server, which gives me remote access to my office network from anywhere using my laptop. It's behind a hardware firewall, so I haven't setup a firewall on it, but all of the pieces are there if I wanted to do this. It also does the IP Forwarding for the VPN and shares NFS thru the VPN to another machine at home (also running Slackware) which uses rsync to grab daily snapshots of the backups.

Slackware is awesome for this stuff.

For your purposes, you'd also probably get away with just the A, AP & N series. Those 3 require about 2.5G of space, but will give you the ability to run many services.
 
Old 05-16-2020, 09:51 AM   #3
dalacor
Member
 
Registered: Feb 2019
Distribution: Slackware
Posts: 76

Original Poster
Rep: Reputation: Disabled
I was not expecting a reply as not a common setup from what I can gather. Although I can't think why we are not using linux in VM's more considering this is common practice for Windows servers now!

Thank you for the feedback.

Pleased to hear that it has been working very well for you! I currently have a working slack box running A, AP, D, L and N. I have only selected three items in AP.

I am very surprised to hear that you managed to get the system working without D and L - Openvpn for example requires openssl which is in the L series. I presumed that you need D to update Slack or the Kernels or install programs?

It is very timely that you mention this because one of my projects this weekend is to a: install Slackware in a vm, but b: I am also interested in doing a minimal slackware install as well.

I am intending to follow this topic https://www.linuxquestions.org/quest...-a-4175595495/ and see what I can come up with.
 
Old 05-16-2020, 08:39 PM   #4
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,425

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
Yeah, I don't see any reason why this shouldn't be done. IME, Slackware in a VM is just as reliable as it is on bare metal.

OpenSSL is in the N series. The OpenSSL-solibs packages are in the A series. I didn't pick & choose, I just installed all of the packages in the abovementioned series. There is probably some stuff I don't need, but at 2.5G, why worry?

It is my understanding that if you're not installing X, then there's no point installing the L series... I'm happy to be corrected on that though.

I left the D series out because nothing is going to be compiled on that machine. As I mentioned, initially it was setup purely to run cron job, hence the minimal installation. Since then, I've enabled OpenVPN, sshd, NFS, IP forwarding, and all the parts are there to set up a firewall too... but since it's already behind a hardware firewall (except for the OpenVPN port) I'm not sure if this is necessary.
 
Old 05-17-2020, 07:15 AM   #5
dalacor
Member
 
Registered: Feb 2019
Distribution: Slackware
Posts: 76

Original Poster
Rep: Reputation: Disabled
Interesting point about L series and X. I will test that and see. Because I don't see the point in a lot of the L series apps anyway.

I guess I need the D series as I do need to compile E2guardian on my Slackware boxes running as an Internet Filtering system. However, I won't need the D series for this particular Slackware setup as it will only run iptables.

I created a VM for Slackware. Besides the fact that I couldn't get it to work in secure boot mode (which I am not worried about anyway), once I installed Slackware and followed the instructions for modifying the kernel to enable hyper-v and rebooted, Slackware would not boot. After spending the morning trying to get it to work, I have responded to the original topic created by Skush - Slackware 14.1 in Ms Hyper-V to see if anyone can shed any light on the issue. I am probably missing one step somewhere!
 
Old 05-17-2020, 01:08 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,962

Rep: Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643
Quote:
Originally Posted by rkelsen View Post
It is my understanding that if you're not installing X, then there's no point installing the L series... I'm happy to be corrected on that though.
l/ series does contain some libraries that aren't tied to X and GUIs. ncurses, ffmpeg, imagemagick, a lot of python packages, libssh, etc. I suppose it probably does depend on what you're intentions are with the install
 
Old 05-18-2020, 01:45 AM   #7
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,425

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
Quote:
Originally Posted by bassmadrigal View Post
l/ series does contain some libraries that aren't tied to X and GUIs. ncurses, ffmpeg, imagemagick, a lot of python packages, libssh, etc.
My understanding is that the libssh package is predominantly used by GUI front-ends for sftp and scp. It is not required if you simply want to use ssh/sshd or the CLI versions of scp and sftp.

While ffmpeg & imagemagick can be used without a GUI, you cannot view their output without one.

The TUI tools in the AP series (e.g. Midnight Commander) work properly without ncurses from the L series.
Quote:
Originally Posted by bassmadrigal View Post
I suppose it probably does depend on what you're intentions are with the install
Quite correct Sir.
 
Old 05-18-2020, 01:27 PM   #8
dalacor
Member
 
Registered: Feb 2019
Distribution: Slackware
Posts: 76

Original Poster
Rep: Reputation: Disabled
I just did a test install of my new vm with just a, ap and n. It does install Slackware, enable me to configure initrd for the vm etc. Testing various commmands, I see things like Vim and Clear don't work unless I install things from the L series. I am happy to use nvi instead of vim, as this doesn't require anything from the L series and I only would need to install Ncurses to use Clear command. Surprising how often I use that command.

So I can definitely confirm that removing L does break some functionality even when you are not using X-Windows. I will have a play with the minimal install on the other topic and see what I come up with as it would be nice to as minimal an install as possible. I have noticed an increase in speed today installing Slackware, but also updating Slackware if you are not using the L series! Every little helps.
 
Old 05-18-2020, 03:13 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,962

Rep: Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643
There really should be no difference in speed no matter how much of Slackware you have installed. If you don't start those extra programs, they won't run and won't take up any resources besides disk space.

For simplicity sake, if you have no intention of starting X, I'd recommend installing a, ap, d (if you plan to compile anything), l, and n. You can safely leave out x, xap, kde, kdei, and xfce. y is optional but works in console only mode.

Installing l just simplifies dependencies greatly, but it would install a lot of libraries that will be unused outside of an X session... but the speed of the system will be the same with or without it.
 
Old 05-19-2020, 04:45 AM   #10
dalacor
Member
 
Registered: Feb 2019
Distribution: Slackware
Posts: 76

Original Poster
Rep: Reputation: Disabled
My apologies for the confusion. Perhaps it would help if I explain how I currently use Slackware.

I run Windows 10 on my computer and my laptop as my daily system. I use Slackware for my clients to run E2guardian which is an Internet Filtering Server. So once I have setup the Linux box, I don't tend to do too much on it unless I am wanting to update E2guardian or update Slackware. For this particular Slackware box that I am wanting to run as a VM, I want to use this as a firewall for my Mail server which is now going to be on a dedicated server in a datacentre. Again, once I have set it up and got the firewall working, I expect to do very little on the Linux box other than just check logs and do Slackware updates.

So in short, most of my time that I spend on Slackware is installing Slackware, configuring Slackware, updating Slackware and installing and configuring programs like E2guardian.

I fully understand what you are saying about running speed being unaffected by how much you install. Where I am coming from, is for example, yesterday and the day before when I was trying to get my Slackware install to boot in the VM, over the course of the time I had to re-install Slackware several times. So in general, I spend far more time installing, updating and configuring Slackware than I do in actually using it per se. Not just for this Slackware install, but setting up a baseline system for the E2guardian also took multiple re-installs testing different configurations.

I noticed quite a difference in install time removing d and especially l series when installing Slackware.

Also I adhere to the principle if you don't have software a,b and c installed, it keeps the system more secure. For my firewall Slackware install, I am in agreement with rkelsen, I simply don't need d or l series which means there are fewer programs/services that can be exploited.
 
Old 05-19-2020, 09:39 AM   #11
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,962

Rep: Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643Reputation: 4643
What is causing you to install Slackware multiple times on the same system? Figuring out how to minimize this would be the obvious way to save time.

And since you're installing in a VM, maybe it would be worth saving a snapshot after installation so if you screw up the system bad enough, you can just revert to the snapshot and undo everything.

This isn't to say you should install d/ and l/, just trying to figure out the whole picture.

Quote:
Originally Posted by dalacor View Post
Also I adhere to the principle if you don't have software a,b and c installed, it keeps the system more secure.
Again, this comes down to what's running, not what's installed. You can have apache installed, but if it isn't running, you aren't vulnerable to any bugs it might have until you start it.
 
Old 05-19-2020, 05:37 PM   #12
dalacor
Member
 
Registered: Feb 2019
Distribution: Slackware
Posts: 76

Original Poster
Rep: Reputation: Disabled
Now that I am using Slackware in a virtual machine, I certainly will be making use of VM snapshots to create a base system. Last year, I was running bare metal so could not make the snapshot. I was doing a lot of things that required a fresh install as I was testing a number of things out and I essentially wanted to reset a lot of settings to default from time to time.

For instance, this time around I needed to re-install Slackware at least three times. Once, (the first time on the vm) and after struggling to get Slackware to reboot after setup, I downloaded a brand new ISO and wiped the previous install and installed Slackware for a second time, with the latest current to fix my hyper-v initrd problem. Then once I worked out what settings worked etc, I then had to re-install Slackware a third time to test my settings worked on a fresh install (as all my other tests was booting off the slackware CD and mounting the Slackware install). I installed it more than three times (as I tried different things like adding the k series etc and it was just quicker and easier to redo the install as I couldn't boot on the Slackware system. So as you can see in my example, I needed to re-install Slackware at least three times in this case anyway.

Now that I have got Slackware in a VM and actually working, I will create a snapshot after install to create my base system and I will build on that.
 
Old 05-19-2020, 07:19 PM   #13
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,425

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
Practice makes perfect. You're on the right path. Well done.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Struggling to get a bootable 14.2 installation in Hyper-V virtual machine smtkr Slackware - Installation 3 05-18-2017 06:48 AM
Linux Mint 18 in "Software Render Mode" running on virtual machine in Hyper-V. Bradley-NZ Linux - Virtualization and Cloud 2 12-01-2016 04:16 AM
Is base memory of virtual machine used when virtual machine is not running? ravisingh1 Linux - Virtualization and Cloud 3 04-09-2013 03:41 AM
Can KVM access a Hyper-V virtual machine directly Nick_C Linux - Virtualization and Cloud 4 03-05-2012 10:12 AM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration