Setting up Ubuntu 16.04 as Samba DC in Hyper-V Server 2016 -PART 1


Introduction

This easy tutorial is part of a series on setting up and running Ubuntu 16.04 as Samba Active Directory Domain Controller and File & Print Server as virtual machines inside Hyper-V Server 2016.

The virtual machines can be fully backed up with free Altro, and also do a separate backup of the File Storage with Rsync.

The virtual machines will be managed through server manager remotely from any location via internet.

Preparing the Installation


Install Hyper-V Server 2016 on your server machine and create a virtual machine call DC1

Don’t get confused with “Windows Server Hyper-V” and “Hyper-V Server”. What we need is Hyper-V Server 2016 and it is completely free to download and install. It has no GUI interface and can be managed remotely through Powershell and server manager.

1) We shall be looking into the complete installation of Hyper-V server 2016 at a later date. But allow me to start this tutorial by first creating a virtual machine (DC1) in Hyper-V with a startup memory of 512mb.

> NEW-VM  NAme DC1  -MemoryStartupByteS 512MB  -SwitchNAME dcSWITCH  -BooTDevice CD  -Path E:\VM\DC1\configFile  -Generation 1   -NoVHD

2) Create dynamic memory between which the virtual machine will fluctuate.

> SET-Vmmemory   -VMname DC1   -DynamicMemoryEnabled $True  -MinimumByteS 512MB   -MaximumByteS 1GB  

3) Assign the virtual machine two virtual processors.

> SET-VMprocessor -VMname DC1  Count 2

4) Create virtual hard disk.

> NEW-VHD -Path E:\VM\dc1\dc1disk0.vhdX -SizeBytes 60GB  -Dynamic  -BlockSizeBytes 1MB 
> ADD-VMHardDiskDrive  -VMname dc1  ControllerType IDE  -ControllerNumber 0  -ControllerLocation 0  Path E:\VM\dc1\dc1disk0.vhdX 

5) Create virtual dvd drive and link it to your downloaded ubuntu iso.

> SET-VMdvdDRIVE  -VMname dc1  -ControllerNumber 1  -ControllerLocation 0  -Path C:\ubuntu.iso  

6) Fire on the virtual machine and install Ubuntu!

> START-VM DC1

That ends the first part of our tutorial. In part 2 we shall be setting up our ubuntu server for samba install and then configure it as Active Directory Domain Controller. Don’t hesitate to contact me if you need more clarification and deep explanation on this series.