Latest posts by Jason Coltrin (see all)
- Windows 10 Fall Creators Update installation and features - Thu, Nov 2 2017
- Install Microsoft SQL Server on Ubuntu Linux - Thu, Jan 5 2017
- Use PowerShell with Google Cloud Platform - Thu, Dec 8 2016
We’ll go through the steps required to set up a local domain controller (testdomain.com) on your workstation with SAMBA. We can then join that domain with a Windows workstation.
The following outline covers setting up such a lab and the individual steps to get your own free domain controller running. While there are a few limitations for a SAMBA domain, such as not being able to run multiple sub-domains or child domains (such as phoenix.testdomain.com and munich.testdomain.com), you can still use Windows administrative tools (like ADUC and DNS) to modify settings and user accounts.
- Download and set up necessary software: VirtualBox and iPXE.
- Create a virtual machine, and install an Ubuntu server with the netboot.xyz iPXE bootable .iso.
- Configure the Ubuntu server with SAMBA prerequisites, and set up the domain controller.
- Join a Windows workstation to the new domain.
Download and install VirtualBox ^
VirtualBox is a lightweight hypervisor for setting up labs and running temporary virtual machines on a workstation-class computer. For this guide, we’ll use VirtualBox, but the same principles apply to Server 2012 Hyper-V or VMWare ESXi. Start by downloading VirtualBox from Oracle. If you’re using Windows 10 64-bit like myself, get the VirtualBox 5.0.14 for Windows hosts. When attempting to run the VirtualBox .exe installer, Windows 10 may want to protect you with SmartScreen. Click More info and then Run anyway:
Windows 10 SmartScreen more info
Windows 10 SmartScreen run anyway
Set up VirtualBox with all default options selected.
Be aware that VirtualBox will install a USB driver and temporarily disconnect network interface cards.
VirtualBox setup NIC reset
Download the netboot.xyz iPXE .iso ^
Next we’ll download my favorite new utility, netboot.xyz. For this exercise, download the image labeled netboot.xyz-dhcp-iso to your Downloads folder. Netboot.xyz is an iPXE image that can bootstrap any number of operating systems from the internet, which allows us to get a virtual machine up and running quickly.
Typical virtual server building methods will have you performing a time-consuming process, finding the correct .iso on a developer’s site, downloading the .iso, selecting the correct virtual disk, and then booting and setting up. iPXE is a small .iso (or bootable image) that gives you a menu to bootstrap a number of different operating system distributions and utilities. It provides a menu similar to a BIOS for installing or booting into a live operating system.
After selecting which operating system we want in netboot.xyz, it’ll connect to the internet, download the distribution files, and begin the setup. In our case, we’ll tell VirtualBox to create a new virtual machine and set the VM to boot to a virtual CD drive, which uses our netboot.xyz-dhcp-iso.
Create a virtual machine ^
Start by hitting the New button, name your domain controller server (DC1), and select Linux for the Type and Ubuntu 64 for the Version:
VirtualBox setup VM
Click Next, provide the OS with the amount of memory you want to provision (1,024MB), click Next again, and select Create a virtual hard disk now. For virtual hard disk type, I like to use VHD so I can migrate the VM to Hyper-V if necessary.
VirtualBox Setup VHD disk
Choose whether you want a dynamically allocated (recommended) or fixed disk size, select the size of the virtual hard disk (8GB), and the click Create. We now find our VM is setup but Off. Also notice that the IDE Secondary Master Optical Drive is Empty.
VirtualBox setup initial VM
We want to use the netboot.xyz-dhcp-iso as our optical drive, so go into Settings. Select Storage and then Controller IDE: Empty. Then click the drop-down disk icon, and click Virtual Optical Disk File.
VirtualBox setup IDE select .ISO
From here, we browse to our Downloads folder and select the netboot.xyz-dhcp.iso file. Click Open, and your VM will boot to the netboot.xyz iso.
VirtualBox setup IDE netboot .ISO
In my next post, I’ll explain how to install Ubuntu in VirtualBox with the netboot.xyz iPXE .iso.