Category Archives: Virtualization

Install MacOS Ventura on Proxmox 8.x

This is a guide on how to configure and install MacOS Ventura on Promox 8.x.x. (This was tested in my lab which runs Proxmox 8.0.3 and 8.0.4. It should work for other versions as well)

Requirements:

  1. Proxmox 8.x.x
  2. Opencore ISO [ Link: https://github.com/thenickdude/KVM-Opencore/releases . https://github.com/thenickdude/KVM-Opencore/releases/tag/v20]
  3. MacOS Ventura ISO (You can get this from archive.org)
  4. Root access to Proxmox to edit config

Steps to configure:

Download the OpenCore-v20.iso.gz  from KVM-Opencore and extract it. [Link: https://github.com/thenickdude/KVM-Opencore/releases/tag/v20 ].

Create a VM in Proxmox with the below settings:

  • Select ISO Image as Opencore iso
  • Set Guest OS type to “Other
  • Set Graphics card as “Vmware compatible”, Machine type “q35
  • Set BIOS to OMVF UEFI, add EFI Disk and select disk. Un-select Pre-enroll keys. Select SCSI Controller to “VirtIO SCSI
  • Set hard disk as “VirtIO Block” , size = 64GB, cache = Write back unsafe
  • CPU: Set 1 Socket, 4 Cores, Type as “Host”
  • 4GB Min RAM
  • Set NIC to Vmware vmxnet3
  • Then add second cd, select Bus/Device as defaults(IDE) and add MAC OS ISO.
  • Change boot order so that opencore is first and then second is macos

Minor Changes needed for it to work:

  • SSH into the Proxmox host and edit the VM config: (the VM ID = 100 for my newly created VM. It may be different in yours)

/vim /etc/pve/qemu-server/100.conf

  • If your Proxmox server is running on an Intel CPU, then below line in top of the file:


args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on

  • If your Proxmox host is running on an AMD CPU, use the below line instead:


args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on

Now, change the media=cdrom to cache=unsafe. Here is a sed command to do so:


sed -i 's/media=cdrom/cache=unsafe/g' /etc/pve/qemu-server/100.conf

Below is my config for reference (/etc/pve/qemu-server/100.conf):


args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on
balloon: 0
bios: ovmf
boot: order=ide2;ide0;virtio0;net0
cores: 4
cpu: host
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,size=4M
ide0: local:iso/macOS Ventura 13.0.1.iso,cache=unsafe,size=13073658K
ide2: local:iso/OpenCore-v20.iso,cache=unsafe,size=150M
machine: q35
memory: 8096
meta: creation-qemu=8.0.2,ctime=1690969304
name: MAC-OS
net0: vmxnet3=D6:41:D1:8F:B5:49,bridge=vmbr0,firewall=1
numa: 0
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=57a6ce4a-a710-483a-8577-28c1feae47d4
sockets: 1
vga: vmware
virtio0: local-lvm:vm-100-disk-1,cache=unsafe,iothread=1,size=64G
vmgenid: a9dee6c6-376d-48b9-bc20-3c586856ffb4

Here is a screenshot for reference of the settings page in Proxmox for the MacOS VM:

 

Proxmox MacOS Ventura Settings

– Here is a screenshot of the boot order settings:

– Now Boot the MacOS VM, and select UEFI boot when prompted.
– At boot prompt, run the below:


System\Library\CoreServices\Boot.efi

Installation:

– Open Disk Utility
– Click “View” => Show All Devices.
– Select the First option that shows 64GB disk and click on “Erase”. Once done, close disk utility and click option to start installer.
– Select the disk and continue the install on it

The rest of the installation is pretty straightforward. It did take a very long time for the install to complete along with a few restarts. But, at the end you should be able to boot into the Proxmox VM.

-Here is a screenshot of my VM post install.

MacOS VM login screen after installaton

 

Hope this helps! Cheers

Credits/References:
https://github.com/thenickdude/KVM-Opencore/releases/tag/v20
https://i12bretro.github.io/tutorials/0775.html

Enable promiscuous mode in VMware Workstation

Below are the steps to enable promiscuous mode for a VM in Vmware Workstation.

Shutdown the VM and edit the .vmx file. This is in the directory where your VM’s hard disks were configured to be sure.

vim /home/extr3me/vmware/pfsense/pfsense.vmx

Tip:
You can right click on the VM and select option “Open VM Directory” that will take you to the directory where the .vmx file is located.

Add the below line to the file:

ethernet0.noPromisc = "FALSE"

-If you have multiple interfaces, then add another line and replace the value 0 with 1 etc. Below is an example for two interfaces:

ethernet0.noPromisc = "FALSE"
ethernet1.noPromisc = "FALSE"

Source/Credits/Reference:

https://superuser.com/questions/1209497/how-do-you-enable-promiscuous-mode-in-vmware-workstation#1270695

Update to the latest ESXI 6.7 patch version on an Intel NUC (offline update)

I recently bought an Intel NUC for my homelab (NUC7i5BNH with 64Gigs of RAM) which has been running ESXi for the past few months and I have been happy with its performance so far. Fear for the worst, I noticed a few minor UI issues in the build that I was running which had been really bugging me. For Example: When using the search bar in the HTML5 UI, it partially hides the last search result in the list which was super annoying.

Luckily, VMware fixed these issues in one of the newer 6.7 patch releases and this blog post details on how I updated ESXi 6.7 U3 to the latest patch release on my NUC. To be precise, the upgrade was from ESXi-6.7.0-20190802001-standard (Build 14320388) to ESXi-6.7.0-20200604001 (Build 16316930). PS: I am not using vCenter in my homelab.

Short Version:

1. Backup your VMs/ESXI configuration. Download the latest patch from VMware’s website (Link).
2. Upload the ESXI patch release to the server’s datastore.
3. SSH into the NUC and get the full location of uploaded patch in your datastore. Find the profiles bundled within the patch file.
4. Put the ESXI server in maintenance mode and start the update.
4. Once update is complete, reboot the NUC, disable maintenance mode and you are good to go.

[Disclaimer: Please review VMware’s best practices for performing an ESXI upgrade which also includes taking backup of your ESXI configuration + VMs. if you plan to upgrade for a production system, make sure all necessary backups are taken before attempting the procedure. My NUC which is the 5th gen, the update worked right of the box without any customization. If you are running the new 10th generation Intel NUC, then you may need have make some modification to the VIBs for the upgrade to work.]

Long Version:

Go to VMware’s patch page  and download the latest patch version for the ESXI release (Link).

In my case, I downloaded the latest patch which at the time of writing this post was ESXi670-202006001.zip.

Before the upgrade, my Intel NUC was running the below build:

[root@nuc:~] vmware -vl
VMware ESXi 6.7.0 build-14320388
VMware ESXi 6.7.0 Update 3

-To check the volumes in the datastore. I did upload my patch to the ssd datastore which is a symlink.

[root@nuc:~] ls /vmfs/volumes/ -l
total 1792
drwxr-xr-x    1 root     root             8 Jan  1  1970 317122ee-8c7e716b-adf9-8414e6a14676
drwxr-xr-x    1 root     root             8 Jan  1  1970 5e4867ab-521f3ade-c1f4-94c691adc828
drwxr-xr-t    1 root     root         86016 Jun 26 18:10 5e486a9d-f29d23c4-81b6-94c691adc828
drwxr-xr-x    1 root     root             8 Jan  1  1970 dafb9eea-924c7ebf-4eba-5b7ab8fcbb15
lrwxr-xr-x    1 root     root            35 Jun 26 18:16 ssd -> 5e486a9d-f29d23c4-81b6-94c691adc828

Verify the full path/location of the uploaded image.

[root@nuc:~] ls /vmfs/volumes/5e486a9d-f29d23c4-81b6-94c691adc828/ESXi670-202006001.zip
/vmfs/volumes/5e486a9d-f29d23c4-81b6-94c691adc828/ESXi670-202006001.zip

Using esxcli, find the profiles that are bundled with the offline installer. The profile name will be used later when performing the upgrade.

[root@nuc:~] esxcli software sources profile list -d /vmfs/volumes/5e486a9d-f29d23c4-81b6-94c691adc828/ESXi670-202006001.zip
Name                             Vendor        Acceptance Level  Creation Time        Modification Time
-------------------------------  ------------  ----------------  -------------------  -------------------
ESXi-6.7.0-20200604001-standard  VMware, Inc.  PartnerSupported  2020-06-04T02:21:11  2020-06-04T02:21:11
ESXi-6.7.0-20200604001-no-tools  VMware, Inc.  PartnerSupported  2020-06-04T02:21:11  2020-06-04T02:21:11
[root@nuc:~]

Place the ESXI host in maintenance mode before starting the upgrade.

[root@nuc:~] esxcli system maintenanceMode set -e true

Verify that ESXI is running in Maintenance mode.

[root@nuc:~] esxcli system maintenanceMode get
Enabled

The output “Enabled” means that the host is in maintenance mode.

To perform the patch upgrade, pass the path and the profile as well.

[root@nuc:~] esxcli software profile update -d /vmfs/volumes/5e486a9d-f29d23c4-81b6-94c691adc828/ESXi670-202006001.zip -p ESXi-6.7.0-20200604001-standard
Update Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
VIBs Installed: VMW_bootbank_ixgben_1.7.1.16-2vmw.670.3.104.16075168, 
....
[root@nuc:~]

Once the update is complete, reboot the ESXI server.

[root@nuc:~] reboot

Once the host is back up, SSH into the ESXI host. The host will still be in maintenance mode which is expected.

[root@nuc:~] esxcli system maintenanceMode get
Enabled

Disable maintenance mode

[root@nuc:~] esxcli system maintenanceMode set -e false
[root@nuc:~] esxcli system maintenanceMode get
Disabled

Now, verify that the update completed and is running the new build.

[root@nuc:~] vmware -vl
VMware ESXi 6.7.0 build-16316930
VMware ESXi 6.7.0 Update 3
[root@nuc:~]

Well, Thats it folks!! Hope this helps.

 

PS: I anticipated the update process to be super confusing and tedious. However, it turned out to be fairly simple thanks to jeffreykusters and VMware’s instructions which I have credited them for below).

Credits/References/Sources:

jeffreykusters
Vmware

Make CentOS virtual machine in VirtualBox use the host’s VPN Connection

If your host PC (in my case Windows 10) is connected to a VPN but your CentOS 6.x VM is not using the VPN, then do the following:

1: Power off your CentOS VM.

2: Right click your centos machine in virtualbox and then click “Settings“.

right click your centos virtual machine and click settings (Screenshot)

3: Click “Network” and change the Adapter Settings to “NAT“.

change virtualbox network settings to NAT (Screenshot)

4: Now power on your centos virtual machine.

5: Once your VM boots up, login and then restart the network service. You can use the following CLI command “service network restart“.

Your CentOS virtual machine should now to able to use the VPN connection and use it accordingly. Do verify the same in your virtual machine. Hope this helps!

Do like and subscribe if this guide helped you. Cheers!

Install Kali Linux in virtualbox (using ova file)

This is how I installed Kali Linux in virtualbox using the ova file method in my windows 10 PC along with its screenshots.

Requirements:

  1. Kali Linux 2019.1 Preinstalled ImageDownload Link (Torrent)  (~3.2 GB) [Updated link o latest Kali Version]
  2. VirtualBox: Download Link (~200 MB)
  3. CPU that supports Virtualization.
  4. Atleast 8GB of free disk space
  5. 7-zip: Download Link (~1.4 MB) [ Note: Winrar is another alternative you could use instead of 7-zip.]
  6. Virtual Box Extension Pack: Download Link (~22 MB) [Optional]

Installation Procedure:

The first thing you need to do is go ahead download and install Virtualbox in your system. Then download the Kali Linux ova file mentioned above and extract it using 7-zip or Winrar. The extracted file would be a .ova file format which is a pre-installed Kali Linux machine. Using a pre-installed file saves us a lot of time as we don’t have to go through the whole installation process.

Now, open VirtualBox:

open virtualbox

Then click on “File” and then click on “Import Appliance“.

click file import appliance

Click on the folder icon as shown below.

import ova file window

Now, browse to and select the extract .ova Kali Linux image file and click on “Open“.

select kali linux ova file

You would now see a window called “Appliance settings” where you can configure stuff like the name of your VM, the amount of RAM to be allocated to your Kali Linux VM etc.

kali linux appliance settings

If you want to change the name of the VM, simply click on the text and you can change it according to your will.

changing vm name

Finally, click on “Import” and wait for a few moments to import the Kali Linux Appliance.

click import to load kali linux appliance

importing kali linux appliance progress bar

Now, right click on your Kali Linux Virtual machine as shown below and click on “Settings“.

open kali linux virtual machine Settings

If you need to adjust the amount of RAM, click on “System” and you can move the slider accordingly. I would suggest atleast a minimum of 2048 MB (2GB) of RAM.

select ram for your Kali Linux VM

Now, click on “Network” as shown below and select “Bridged Adapter” and then click on “OK“.

Select Kali Linux network mode to Bridged Adapter

Click on your Kali Linux VM and then click on Start as shown below.

start kali linux in virtualbox

You should now be able to see the grub menu. Hit “Enter” in your keyboard.

kali linux grub menu

Now, login to your Kali Linux machine with the default username as root and password toor.

Note: If you are using newer Kali versions (from year 2020 ), the username and password is “kali”.

Ref: https://www.kali.org/docs/introduction/default-credentials/

kali username

kali password

You should now be booted into your Kali Linux desktop.

kali linux logged in

Customize Kali (Optional): 

I would like to make some minor changes to make sure the VM is not interrupted during pen testing. This section is purely optional, you can skip to the next section if you don’t want to customize it.

Click on the triangle pointing downwards in the upper right corner and then click on the “Settings” icon.

Kali Linux drop down menu

This will bring you the “All Settings” window as shown below. Click on “Date & Time“.

all settings menu

You can change the time zone to your time zone.

change time zone

Now, go back to the “All Settings” window and then click on “Privacy“.

select privacy in all setting menu

You would see a screen similar to the one below:

default privacy settings

Now, disable “Automatic Screen Lock” by moving the slider.

disable auto screen lock

Go back to “All Settings“, then click on “Power“.

click on power in all settings

Now, select Blank Screen option as “Never” and turn off  “Automatic Suspend” as shown below.

disable blank screen and automatic suspend

Update Kali Linux:

Open the terminal window by clicking on the icon as shown below:

open terminal

This is what the terminal window would look like in a Kali Linux system.

Kali Linux Terminal

Enter the following commands in the terminal to update your Kali Linux system.

apt-get clean && apt-get update -y
apt-get upgrade -y && apt-get dist-upgrade -y

This may take a while depending on your internet connection for the update to complete.

And that is it for setting up Kali Linux in virtualbox to get started with pentesting (only for ethical hacking and for purely educational purposes).

If you have any sort of queries regarding this installation, just leave a comment and will get back to you. I will be posting some ethical hacking tutorials in the future, so stay tuned.

Double quotes not working in Linux terminal – [Solution]

I encountered an issue in my CentOS VM where whenever I type the  (single quote) or the  (double quotes) in the terminal, they don’t get displayed. I did the following to fix the issue:

In your terminal window, type the following:

# setxkbmap -layout us

You should now be able to use single, double quotes or tilde symbols in your terminal.

The above command simply changes the keyboard layout to English (US) and this is under the assumption that you are actually using a English (US) keyboard in your PC.

[Note: English (US) layout is different from English (US) International keyboard layout].

You can check the screenshot below for reference.

setxkbmap -layout us

Thanks and credits to this post that helped me resolve this issue.

Feel free to leave a comment in the comments section down below. Happy troubleshooting! Cheers!

How To fix “This kernel requires an x86-64 CPU, but only detected an i686 CPU. This processor is unsupported in RHEL 7.” when booting from VirtualBox

Error: This kernel requires an x86-64 CPU, but only detected an i686 CPU.
This processor is unsupported in RHEL 7. 

centos-boot-error

[Note: This tutorial is under the assumption that your physical CPU is 64-bit and your installed host OS is 64-bit and will only work in these circumstances.]

Cause:

This mainly happens due two reasons:

  1. If you have a 64-bit OS installed but the VirtualBox OS type is accidentally changed/set to 32-bit after installation.
  2. If Vt-X (Virtualization) is disabled in the BIOS. (This can happen if you reset your BIOS to default settings which may have disabled Vt-X  bit).

Solution:

Step 1: Right Click on the Centos/RHEL OS which is giving you the error and then click on “Settings“.

virtualbox settings

Step 2: In General Tab, check the OS Type and see if you are able to change to “Redhat 64-bit” and follow step 4.

change os type

Step 3: If you are only able to see 32-bit entries in the OS type list and your physical CPU supports 64-bit, this means that Vt-X is disabled in your BIOS. So, restart your PC and boot into your BIOS, enable Vt-X.

For reference, I have a Asus Maximus VII Ranger Motherboard and here is how I enabled Vt-X in my BIOS.

enable vt-x

[Optional: If your CPU supports Vt-d, enable that too, it will improve functionality and performance of your Virtual Machine. Some CPUs will not have the Vt-d function, if you dont have it then you can ignore it]

optional step to enabled vt-d

Step 4: Restart your computer and boot back your CentOS/RHEL VM and it should come right up.

centos boot error fixed

Hope this fixed the issue. If this tutorial helped you,do  leave a thumbs up a comment below. Hope this helps! 🙂

If you have any sort of queries,  just leave a comment below and will get back to you. Don’t forget to follow my blog to get future updates! 😀

Regards,
ΞXΤЯ3МΞ