Milestone3:Nesting - echadbourne/SYS-350 GitHub Wiki
Before even starting I had to install chrome remote desktop on my management server. I achieved this by downloading the .deb file, running
sudo dpkg -i [name]on that file, fixing the broken install/installing dependencies withsudo apt --fix-broken installand running the original install command again to make sure the install worked. Then there was a configuration I needed to do, and it worked!
Part 1: Nested Virtualization
To start with I had to make sure that my new nested boxes had DNS and PTR records according to the IP Resource
Step 2: ESXi Autostart
In the ESXi Web console (not vcenter, for some reason this is not possible in vcenter) under "Actions" > Enable autostart, in this order:
- FW
- MGMT
- DC
- Vcenter
Then go to Host > Manage > System > Autostart to verify that it is in the right order.
Step 3: ESXi Virtual Appliances
To begin with I had to download the .ova file because the link version was not working (403 Forbidden) so I downloaded the .zip file, and unziped it with
unzip [name]
I then started the deployment of the ova file by right clicking SYS350 under the first tab in vcenter, and clicking "Deploy OVA," Uploaded the file, named it, and finished the wizard.
Config all 3 nested devices, similar to the screenshot shown
Tweak the settings in super5 to allow the nested hosts to work: ESXI Host Site > Networking > 350-Internal > Edit Settings > Security
I then added all 3 of the nested hosts to SYS350. I did have to ping each of them by hostname to make sure they were on and connected properly, and after a bit of time they were. Like Super5, I left most things at the defaults, entered information where needed, and assigned the license at that step of the setup wizard.
In order for this to work I needed to make sure all of the nested hosts were on, because they could not be added if they were off
Part 2: Templates
DHCP
I used DHCP on pfSense. To do this entered the LAN configuration and set the IP again, and enabled DHCP on the LAN. I then went to the online management portal and configured the DHCP with all of the pertinent information. All I set was the DNS server, Default Gateway, and domain name. Everything else was default
I realize that I could have done this entirely with the GUI, but my brain is tired of networking today so this is what I did.
Ubuntu Template
Next I downloaded the ubuntu iso from the class server and set it up as a vm in vcenter with the following configurations:
- Thin Provision hard disk
- CD point to iso
I turned on the new vm, and proceeded with the ubuntu installation, using this as my default setup:
I had a ton of problems with getting ubuntu to install properly, I even tried a few other distros (mint and xubuntu) and had very little luck. Turns out I needed to install ubtuntu in offline mode. If it was installing in online mode it would get stuck on "Get 85," but if it was installing in offline mode it got past "Get 85" just fine. Once I got a working Ubuntu install, things seemed to work as intended.
Install VmWare tools
In vSphere, click on the notification that says vmtools is not installed, and mount the drive to the vm.
In the vm, move the compressed file to another folder (eg Downloads) and extract it, then via command line run the vmtools installer .pl document. I left everything at the defaults in the script, then checked the version with
vmware-toolbox-cmd -vcommand:
If you tried to extract the compressed folder from the drive to another location it would give a "no space" error, which is why copying the zipped folder to somewhere else first was necessary. Of note, if you need to check drive space on linux you can use the command
df -h
Install perl, it was already installed and the latest version
Power down, snapshot called base
Convert to Template
Right click the vm > Templates > Convert to template
Hamburger Menu > Policies and Profiles > VM Customization Specifications. Create a new one with the following settings:
I ended up making both of the templates simultaneously because there was a lot of waiting for both to install and do things, so while I was waiting on one task I would swap to the other, eg. Kali installing, so go work on Ubuntu Template things
Kali Template
For Kali I used the same specs as the Ubuntu install, seen below, then ran through the installer with the same username and password (deployer account) as the Ubuntu vm. During the installation I left everything at the defaults.
I chose kali for the second template because I didn't feel like using Rocky, I like it, and it has tools I can use for troubleshooting any potential network issues if they arise. I won't need to download anything to another vm. Plus it is an extremely versatile flavor of linux.
vmtools was already installed on the kali box, heres the version:
Install perl, it was already installed on the vm
Power down, snapshot called based, convert to template
Kali Specification
Same process as the Ubuntu Specification
Deploy VM from template
Create a new VM > Deploy from template
Ubuntu
Named it ubuntu1-elizabeth, set the ip address to 10.0.17.110, selected Customize Guest OS to select your specification to be able to do the hostname and ip address
The template did not set the ip like it was supposed to but it should get DHCP
Kali
I think this is the right screenshot, in all the craziness there was lots of cloning happening. But this shows a vm cloned from a template, which is the goal here
Another note, I had problems with my Kali template not working correctly after it's conversion. I ended up having to make a whole new Kali vm on Datastore 1 rather than Datastore 2, cloning it for safekeeping, and then converting it to a template, which then worked. I think Datastore 2 might be a bit broken, but the point is I have a working Kali template.
The kali specification didn't do what it was supposed to but we checked it in class and it should have been fine.