Thursday, 7 September 2023

Only one virtual CPU is allowed in this system

https://www.truenas.com/community/threads/only-one-virtual-cpu-is-allowed-in-this-system.102957 in /usr/lib/python3/dist-packages/middlewared/plugins/vm/vms.py i outcommented Lines 227-234. # elif flags['intel_vmx']: # if vcpus > 1 and flags['unrestricted_guest'] is False: # verrors.add(f'{schema_name}.vcpus', 'Only one Virtual CPU is allowed in this system.') # elif flags['amd_rvi']: # if vcpus > 1 and flags['amd_asids'] is False: # verrors.add( # f'{schema_name}.vcpus', 'Only one virtual CPU is allowed in this system.' # )

Wednesday, 26 April 2023

Just got me a mini-pc with 5x 2.5GBE ports

This is for pfsense.. now it is my firewall and switch.. will prepare a network diagram but see this post on how to configure pfsense as a switch: https://www.cyberciti.biz/faq/how-to-pfsense-configure-network-interface-as-a-bridge-network-switch/

Tuesday, 25 April 2023

WD Sharespace

Recently I got a WS Sharespace, it refused to boot. I tried to zero the drive and realised not all drives are working!

Sunday, 23 April 2023

Low Level format on Linux

sudo dd if=/dev/zero of=/dev/sdb status=progress

Monday, 10 April 2023

ESXi703-VMKUSB-NIC-FLING-55634242-component-19849370.zip

ESXi703-VMKUSB-NIC-FLING-55634242-component-19849370.zip [root@localhost:~] esxcfg-nics -l Name PCI Driver Link Speed Duplex MAC Address MTU Description vmnic0 0000:00:1f.6 ne1000 Up 100Mbps Full 1c:69:7a:6b:a3:e5 1500 Intel Corporation Ethernet Connection (10) I219-V vusb0 Pseudo uether Up 100Mbps Full 00:e0:4c:36:01:44 1500 Realtek USB 10100 LAN

Get VLAN ID

Notes on USB Network Drivers for NUC

Some notes: https://flings.vmware.com/usb-network-native-driver-for-esxi/comments/17162#comment_17162 https://tech-addict.fr/home-lab-usb-network-adapters-for-esxi/ https://www.virten.net/2020/04/how-to-add-the-usb-nic-fling-to-esxi-7-0-base-image/ https://www.virten.net/2020/09/tips-for-using-usb-network-adapters-with-vmware-esxi/

ESXI - Automate bindings

 See these commands:






My final script: /etc/rc.local.d/local.sh

VDS_NAME="WAN"
VDS_PORT_ID=0
vusb0_status=$(esxcli network nic get -n vusb0 | grep 'Link Status' | awk '{print $NF}')
count=0
while [[ $count -lt 20 && "${vusb0_status}" != "Up" ]]
do
    sleep 10
    count=$(( $count + 1 ))
    vusb0_status=$(esxcli network nic get -n vusb0 | grep 'Link Status' | awk '{print $NF}')
done
if [ "${vusb0_status}" = "Up" ]; then
    esxcfg-vswitch -P vusb0 -V ${VDS_PORT_ID} "${VDS_NAME}"
fi




Note: to get PORT_ID -> this is your VLAN ID for the switch you want add the uplink:



Command to check NICs

 Name    PCI Device    Driver  Admin Status  Link Status  Speed  Duplex  MAC Address         MTU  Description

------  ------------  ------  ------------  -----------  -----  ------  -----------------  ----  -----------
vmnic0  0000:00:1f.6  ne1000  Up            Up             100  Full    1c:69:7a:6b:a3:e5  1500  Intel Corporation Ethernet Connection (10) I219-V
vusb0   Pseudo        uether  Up            Up             100  Full    00:e0:4c:36:01:44  1500  Realtek USB 10100 LAN

Re-install Fling Driver on ESXI

 Note the steps below to get it working - need full path to the zip file:



[root@localhost:/vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/software] esxcli software component apply -d ./ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip
 [MetadataDownloadError]
 Could not download from depot at zip:/var/log/vmware/ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip?index.xml, skipping (('zip:/var/log/vmware/ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip?index.xml', '', "Error extracting index.xml from /var/log/vmware/ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip: [Errno 2] No such file or directory: '/var/log/vmware/ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip'"))
        url = zip:/var/log/vmware/ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip?index.xml
 Please refer to the log file for more details.
[root@localhost:/vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/software] ls -l ./ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip
-rw-r--r--    1 root     root        355708 Apr 10  2023 ./ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip
[root@localhost:/vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/software] pwd
/vmfs/volumes/XPG SX8200 PRO/software
[root@localhost:/vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/software] esxcli software component apply -d "/vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/software/ESXi800-VMKUSB-NIC
-FLING-61054763-component-20826251.zip"
 [DependencyError]
 Component VMware-vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763 has unmet dependency vmkapi_incompat_2_10_0_0 that is not provided by any component in depot.
 Component VMware-vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763 has unmet dependency vmkapi_2_10_0_0 that is not provided by any component in depot.
 Please refer to the log file for more details.
[root@localhost:/vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/software] ls -l
total 561536
-rw-r--r--    1 root     root        349277 Aug  3  2020 ESXi700-VMKUSB-NIC-FLING-34491022-component-15873236.zip
-rw-r--r--    1 root     root        352595 Apr 10  2023 ESXi703-VMKUSB-NIC-FLING-55634242-component-19849370.zip
-rw-r--r--    1 root     root        355708 Apr 10  2023 ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip
-rw-r--r--    1 root     root     570619119 Jan 24 23:10 VMware-ESXi-7.0U3l-21424296-depot.zip
-rw-------    1 root     root           316 Aug 15  2020 index.xml
drwxr-xr-x    1 root     root         73728 Jan 25 00:43 m2
-rw-r--r--    1 root     root          2944 Aug 15  2020 metadata.zip
drwxr-xr-x    1 root     root         73728 Jan 24 23:24 mm
-rw-------    1 root     root           205 Aug 15  2020 vendor-index.xml
drwxr-xr-x    1 root     root         73728 Aug 15  2020 vib20
[root@localhost:/vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/software] esxcli software component apply -d "/vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/software/ESXi703-VMKUSB-NIC
-FLING-55634242-component-19849370.zip"
Installation Result
   Components Installed: VMware-vmkusb-nic-fling_1.10-1vmw.703.0.50.55634242
   Components Removed:
   Components Skipped:
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true


Update VMware ESXi 7.0 Update 3l - Need to remove Fling Driver first

 


[root@localhost:~]  esxcli software profile update -d /vmfs/volumes/XPG\ SX8200\ PRO/software/VMware-ESXi-7.0U3l-21424296-depot.zip -p ESXi-7.0U3l-21424296-standard

 [DependencyError]

 VIB VMW_bootbank_vmkusb-nic-fling_0.1-4vmw.700.1.0.34491022 requires vmkapi_incompat_2_6_0_0, but the requirement cannot be satisfied within the ImageProfile.

 Please refer to the log file for more details.


[root@localhost:~] esxcli software component remove -n VMware-vmkusb-nic-fling

Removal Result

   Components Installed:

   Components Removed: VMware-vmkusb-nic-fling_0.1-4vmw.700.1.0.34491022

   Components Skipped:

   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.

   Reboot Required: true


Wednesday, 5 April 2023

Replacing faulty drive on Truenas

 Refer to here:
https://www.truenas.com/community/resources/replacing-a-failed-failing-disk.75/




Basically,  take the faulty disk (da5) offline.

Can hot-swap if possible (I did not - I power down and replace the drive)

Can choose replace -> pick the new drive (da5)

And you will get the screen above.

Once done, you see below:








Monday, 3 April 2023

My ESXI Network

 





Restart of ESXI

 I need to run the following commands every time. Not sure why :-(


# Steps after restart

esxcli network vswitch standard portgroup remove -p WAN -v WAN

 esxcli network vswitch standard remove -v WAN

 esxcli network vswitch standard add -v WAN

esxcli network vswitch standard portgroup add -p WAN -v WAN

 esxcli network vswitch standard uplink add -u vusb0  -v WAN


#

esxcli network vswitch standard portgroup list

esxcli network vswitch standard list



[root@localhost:~] esxcli network vswitch standard list

vSwitch0

   Name: vSwitch0

   Class: cswitch

   Num Ports: 3456

   Used Ports: 4

   Configured Ports: 128

   MTU: 1500

   CDP Status: listen

   Beacon Enabled: false

   Beacon Interval: 1

   Beacon Threshold: 3

   Beacon Required By:

   Uplinks: vmnic0

   Portgroups: PfSense_LAN, Management Network


WAN

   Name: WAN

   Class: cswitch

   Num Ports: 3456

   Used Ports: 3

   Configured Ports: 128

   MTU: 1500

   CDP Status: listen

   Beacon Enabled: false

   Beacon Interval: 1

   Beacon Threshold: 3

   Beacon Required By:

   Uplinks: vusb0

   Portgroups: WAN