January 26

Windows: Shutdown wsl

If you are using Linux in wsl on Windows 10 and 11 you may find a time where you want to restart Linux environment. To do this do the following in Powershell:

Get-Service LxssManager | Restart-Service
Category: Windows | Comments Off on Windows: Shutdown wsl
January 24

Linux: MAAS – cli error when uploading an image

When trying to do MAAS commands you may receive an error similar to:

argument COMMAND: invalid choice: ‘boot-resource’ (choose from ‘login’, ‘logout’ … )

This error is due to you not being logged into the MAAS server from the command line.

To login use the following syntax:

  1. maas login yourmaasadminuser http://localhost:5240/MAAS
  2. paste your API Key. (This can be found from your MAAS gui. Click on the user name at the top right hand corner of the page and then click API keys under details.
  3. If the user and API key are correct you will receive a message that ‘You are now logged in to the MAAS server at http://localhost:5240?MAAS/api/2.0/ with the profile name ‘yourmaasadminuser’.
  4. You can now enter you commands and they should work as long as you command syntax is correct.

By: tconrad

Category: Linux | Comments Off on Linux: MAAS – cli error when uploading an image
December 31

ESXi: Esxcfg-vswitch Commands

Delete a Port Group:
esxcfg-vswitch -D “Service Console” vSwitch1

Add a nic (vmnic2) to a vswitch (vswitch1):
esxcfg-vswitch -L vmnic2 vswitch1

Remove a pnic (vmnic3) from a vswitch (vswitch0):
esxcfg-vswitch -U vmnic3 vswitch0

Create a portgroup (VM Network3) on a vswitch (vswitch1):
esxcfg-vswitch -A “VM Network 3” vSwitch1

Assign a VLAN ID (3) to a portgroup (VM Network 3) on a vswitch (vswitch1):
esxcfg-vswitch -v 3 -p “VM Network 3” vSwitch1

Change your Service Console (vswif0) IP and Subnet Mask:
esxcfg-vswif -i 172.20.20.5 -n 255.255.255.0 vswif0

Add a Service Console (vswif0):
esxcfg-vswif -a vswif0 -p “Service Console” -i 172.20.20.40 -n 255.255.255.0

Add Vlan to a Port Group:
esxcfg-vswitch “vSwitch name” -p “portgroup name” -v “vlan ID”

List the existing config so you can get your vswitch and portgroup name:
esxcfg-vswitch -l

By Paquin

Category: Virtualization | Comments Off on ESXi: Esxcfg-vswitch Commands