I recently encountered a minor issue attempting to create additional VMs in VMWare Workstation 14 on Ubuntu. The error I received suggested there wasn’t enough memory free to power on an additional VM but the host has 32GB of RAM and I’d allocated 20GB across all VMs.
Inspecting the /etc/vmware/config file revealed the value:
prefvmx.allVMMemoryLimit = "12954"
Which is a hard upper limit for all VMs, adjusting it to the following with VMWare closed and then start VMWare resolved the problem:
prefvmx.allVMMemoryLimit = "20480"
1. Power down all running VMs on host (or migrate to another eSXi host if using vCenter)
2. Enable SSH on the eSXi host
3. SSH to the host
4. Enter maintenance mode via:
esxcli system maintenanceMode set --enable true
5. Uninstall the previous storage driver via:
esxcli software vib remove -n scsi-hpvsa -f
6. Reboot the eSXi host via:
esxcli system shutdown reboot --reason "your reason here"
7. When the eSXi host is back SSH back in and ensure Maintenance Mode is enabled through the same command in step 4.
8. SCP / SFTP copy the new storage driver to /tmp/ on the eSXi host
9. Install the new storage drive via:
esxcli software vib install -v file:/tmp/name-of-driver-file-here.vib --force --no-sig-check --maintenance-mode
11. Disable SSH
12. Exit Maintenance Mode
13. Power on / migrate back VMs
I needed to work out some AD accounts’ last logon dates to make a further assessment, in powershell I found this was fairly simple:
To get a list of all user attributes available for query:
$> get-aduser -identity <USERNAME_HERE> -Properties *
To query for last logon date:
$> get-aduser -identity <USERNAME_HERE> -Properties LastLogonDate
I was unable to compile the ubuntu kernel patches for VMWare Workstation 14.0 for a couple of reasons on Ubuntu 16.04 with an updated kernel v4.14:
1. Launching VMWare Workstation resulted in a GUI window complaining no GCC-7.2 was available, solved by the following commands (thanks to https://askubuntu.com/questions/859256/how-to-install-gcc-7-or-clang-4-0) :
sudo add-apt-repository ppa:jonathonf/gcc-7.1
sudo apt-get update
sudo apt-get install gcc-7 g++-7
2. The next failure was with further kernel compiling modules with the vmmonitor service failing. This needed a patch on the install scripts to support the latest kernel, resolved by the following commands (thanks to https://github.com/mkubecek/vmware-host-modules/commit/770c7ffe611520ac96490d235399554c64e87d9f for the patch and https://superuser.com/questions/1255099/vmware-workstation-not-enough-physical-memory-since-last-update/1255963 for guidance on applying it):
~$ sudo cd /tmp
~$ cp /usr/lib/vmware/modules/source/vmmon.tar .
~$ tar xf vmmon.tar
~$ rm vmmon.tar
~$ wget https://raw.gi
~$ mv -f hostif.c vmmon-only/linux/hostif.c
~$ tar cf vmmon.tar vmmon-only
~$ rm -fr vmmon-only
~$ mv -f vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar
~$ vmware-modconfig --console --install-all
Ubuntu disk partition extension under LVM:
1/ extend the LVM volume (cheated with gparted but parted would work fine, this is the container partition for the “Volume Group”.
2/ Next launch LVM and use “lvdisplay” to print the current output, mine was a container group with a single logical volume named “root”
3/ Now I know the location and name of the LV I can issue the following command to expand it into the available free space created in step 1:
lvextend -l +100%FREE /dev/Container1/root
4/ Finally exit lvm and expand the file system to fill the LV:
sudo resize2fs /dev/Container1/root
Issuing “apt-get update” or “apt-get upgrade” commands resulted in the following error:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
I couldn’t locate any running processes which would be locking these files so went ahead and removed the lock files via:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
And then repeated the commands successfully.
PS C:\> get-adcomputer -Filter 'Name -like "$COMPNAME_HERE*"' -Properties lastlogondate | select name,lastlogondate
Ubuntu 16.04 (kernel 4.14), Virtualbox
I was trying to install Oracle VirtualBox either from their repo or from the Ubuntu repo but both failed to compile the Kernel Module.
I tried various guides before actually reading the error log whereupon I found the “libelf-dev” package was required (at least for installing virtualbox-5.2 from Oracle directly!).
Resolved by following https://support.office.com/en-us/article/Office-repeatedly-prompts-you-to-activate-on-a-new-PC-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1
Close the activation window and all Office apps.
- Right-click the Start button on the lower-left corner of your screen, and select Run.
- Type regedit, and then press Enter. Select Yes when prompted to open the Registry Editor.
- On the left side of the Registry Editor, under Computer, navigate to the following key in the registry:
- Right click the OEM value and click File>Export.
- Save the key.
- After the key is backed up, select Edit>Delete.
- Repeat steps 3-6 for the following key:
- Close the Registry Editor and start Office again.
Description of the task
I received an Excel spreadsheet with a list of personal data including names, telephone numbers, membership numbers and addresses. I wanted to plot the addresses on a map in a way that left only the postcode identifiable for reasons of data protection as a postcode alone will not be traceable to more than a street it conforms with the requirements of being personally identifiable. Therefore the task required two stages to complete:
- Anonymise personally identifiable data (offline on a secure computer)
- Plot anonymised data on Google Maps
My thanks to “Lisa in the Health Library” for her blog post which pointed me to Google Fusion Tables
Anonymise personally identifiable data
To anonymise the data I created an additional column in the identifiable spreadsheet named “ID” and populated it with a contigious record count from 1 through to the last row and then saved the edited identifiable spreadsheet.
I then created a second blank Excel spreadsheet (which I’ll refere to now as the anonymised spreadsheet) and copied both the postcode column and the newly created “ID” column from the identifiable spreadsheet into the anonymised spreadsheet and saved it under a new name.
I now have a working anonymised spreadsheet which only I can identify the owners of the postcodes by referring back to the “ID” field in the identifiable spreadsheet if needed.
Plot anonymised data on Google Maps
Using *only* the anonymised spreadsheet I then followed the guidance from “Lisa in the Health Library”‘s blogpost here: https://lisainthehealthlibrary.wordpress.com/2014/05/05/creating-google-maps-from-postcode-data/ and completed the mapping.