How to get llama 2 up and running , in a VM, with no GPU, and limited memory on Ubuntu

Image
OK I decided to write this up after unsuccessfully being able to find all the required info I needed in one place. In this setup we will be using Ubuntu Server 22.04.2 LTS as the OS. I have this running on a home lab ESXi server 8, on a HP Compaq Pro 6300 SFF CPU = Intel Core i7-3770 Installed Memory 16 GB I have some 10K SAS drives installed for the VM's If you have not already, navigate to  Get Ubuntu Server | Download | Ubuntu and download the 22.04.2 LTS ISO Next Lets create our VM that we are going to run this in. *Note Im using ESXi however you can probably do this in Workstation, Fusion, VirtualBox etc The main things to note on the VM creation. Set Ubuntu 64 bit as the guest OS Set your CPU relevant to the physicals CPU, I will be starting with 4 VCPU Set your Memory to as much as you can tolerate, I will be using 12 Disk Space - we are creating a 100G swap file, and the rest of the file can take up some room , so more is better if you can afford it Dont forget to add the U

VMware View local \ remote user information

In some instances you may want to get some information on the users that are logging in to the VM's.
This is not easily accessible through View its self.
So I have come up with a way get the information from the VM's themselves.

First of all your going to need the MOF file i created in an earlier post here for the WMI queries.
Install this into your parent image.
You will also need the logon script , that runs at logon located here.
And lastly a remote SQL database that will hold the data, I have taken the liberty of creating a script to create the database for you here.

After running trough this, you will be able to query for users that logged in to a specific VM and find any additional information provided by the agent.


So lets get started.

Create a database with the script
Open up Microsoft Management studio and connect to your database server, create a new database, and use the script to create a new table.
Paste the contents of the script into a new query window
change the line USE [TEST1]
and change it to your database name is, so if your database is named DB1 then it would be
USE [DB1]
Once you execute the script you will now have a blank table.

Make sure to give the user you will be connecting to the database the proper permissions.
The user name and password will be saved in the VBscirpt to connect to the database.
Some people will choose to obfuscate this however I will not cover this as there are may methods to do this and you should choose one that works for you.
After that you are done with the database portion for now.


Power on your Parent Image and Load the MOF.
Copy the MOF to your parrent image in %systemroot%\System32\wbem\ and load it by running the following command in the above directory:
Mofcomp -class:forceupdate VMwareView.mof



Copy and Edit the VBScirpt on the parent VM
I like to put my scripts in C;\temp\  so I will copy it there and edit it.
Edit the following:
Find the line that says "Composer\Composer" and replace this with your SQL server
Find Catalog=DATABASENAME and replace this with the name of your database
Find id = 'username' and replace this with the name of the user that has access to the database
Find password="P@SSW0RD" and replace it with the password
Optional : at the time of the file you will see wscript.sleep 10000, this is a 10 second delay to avoid a race condition where the data is not populated fast enough, change this ass needed.
Save the file
Release the IP on the VM, shut it down and take a new snapshot.

Create a GPO to execute the vbscript on logon.
Create your GPO , link it to an OU (or however you want) that will apply to the users logging into the VM.

Recompose your pool on the new snapshot.
Once this completes you should now have users logging in, executing the VBscript and logging data into the database.

If you have any questions just post them on the blog.

As an FYI I have only tested this on 6.2.1 agent, however i think it will be fine on older versions.



Comments

Popular posts from this blog

vSphere 7 - Specify a vmkernel adapter to use for NFS datastores Step By Step \ Walkthrough on a DVS

Horizon View 2-factor Authentication for Free! with Google Authenticator or others

How to get llama 2 up and running , in a VM, with no GPU, and limited memory on Ubuntu