Tuesday, July 31, 2018

Foray into Arduino

OK, so I'm taking a brief foray into the arduino world.
My son and I are working on a Halloween costume using arduino, specifically the Adafruit Playground Classic. So below are some notes on the project.

The processor:

Since the playground is not specifically called out in all command references, it is important to note:
  • ATmega32u4 Processor, running at 3.3V and 8MHz
  • MicroUSB port for programming and debugging with Arduino IDE
  • USB port can act like serial port, keyboard, mouse, joystick or MIDI

Sensors and Pins

  • 10 x mini NeoPixels, each one can display any rainbow color
  • 1 x Motion sensor (LIS3DH triple-axis accelerometer with tap detection, free-fall detection) SPI Pins, CS Pin on PIN 8 and Interrupt on PIN 7
  • 1 x Temperature sensor (thermistor) PIN A0
  • 1 x Light sensor (phototransistor) PIN A5
  • 1 x Sound sensor (MEMS microphone) PIN A4
  • 1 x Mini speaker (magnetic buzzer) PIN 5
  • 2 x Push buttons, left and right PIN 19 Left, PIN 5 Right (Read HIGH)
  • 1 x Slide switch PIN 21 LOW Left, HIGH right
  • 8 x alligator-clip friendly input/output pins GPIO PINS 0, 1, 2, 3, 6, 9, 10, 12
    Includes I2C, UART, and 4 pins that can do analog inputs/PWM output
  • All 8 pads can act as capacitive touch inputs
  • Green "ON" LED so you know its powered
  • Red "#13" LED for basic blinking  PIN 13
  • Reset button

  • D10 / A10 - This pin can be digital I/O, or Analog Input. This pin has PWM output
  • D9 / A9 - This pin can be digital I/O, or Analog Input. This pin has PWM output.
  • D6 / A7 - This pin can be digital I/O, or Analog Input. This pin has PWM output.
  • D12 / A11 - This pin can be digital I/O, or Analog Input.
  • D1 - This pin can be digital I/O, it is also used for Hardware Serial Transmit, and can be an interrupt input.
  • D0 - This pin can be digital I/O, it is also used for Hardware Serial Receive, and can be an interrupt input.
  • D2 - This pin can be digital I/O, it is also the I2C SDA pin, and can be an interrupt input
  • D3 - This pin can be digital I/O or PWM output, it is also the I2C SCL pin, and can be an interrupt input
  • D4 - Left Button A
  • D5 - Speaker PWM output
  • D7 - Accelerometer interrupt
  • D13 - Red LED
  • D17 - Built-in 10 NeoPixels
  • D19 - Right Button B
  • D21 - Slide Switch
  • A0 - Temperature Sensor
  • A4 - Microphone sound sensor
  • A5 - Light Sensor





Friday, July 20, 2018

Remove VMware Horizon View VMs and Desktop Pools stuck in Deleting stage.

I have had several times where the Horizon Pool will not delete all the way, the VMs are stuck in a deleting phase (note: the VMs are gone from vCenter, just not from the inventory). That makes the Desktop Pool get stuck and Chaos ensues.

Most Recently I got stuck for several days before I found this article. I have made some additions, changes and comments to the process, but credit to Jacob Gardiner for the screen shots and SQL deep dive.

From Jacob's Blog - My Comments and suggestions below are in BLUE and RED

I have recently experienced an issue with VMware View Desktop Pools, I tried to remove a Desktop Pool but it did not successfully complete and it had been stuck in the ‘Deleting’ stage. You will need to complete the following steps to successfully remove these Desktop Pools. (You may not need to do all of this, if your VMs are gone and it's just the inventory in the admin tool, the ADSI will suffice)
Firstly you will need to remove the machines from the ADAM Database on the Horizon View Connection Server. We will need to use ADSI Edit to complete the removal of these objects.

NOTE: This assumes that you are RDPed into the Connection Manager Server. I am a BIG proponent of Admin VMs with all of your remote tools on them and NEVER RDPing int a server unless it is necessary. I HIGHLY Recommend running ADSI Edit from your Admin VM and using the following:
Select or Type a Distinguished Name or Naming Context – dc=vdi,dc=vmware,dc=int
Select or Type a Domain or Server 
  Actual Server – NET-00-HCM-01:389
You will need to navigate to ADSI Edit, You can complete this by typing adsiedit.msc in to a Run box. You will now need to select Action, then Connect To. You will need to put in the following information in the connection settings.
Select or Type a Distinguished Name or Naming Context – dc=vdi,dc=vmware,dc=int
Select or Type a Domain or Server – localhost:389
VMware View ADAM Connection Settings - Removing VMware Horizon View Desktop Pools Stuck In 'Deleting' stage
Once connected you will see the following in the left hand column.
ADSI Edit Default Naming Context - Removing VMware Horizon View Desktop Pools Stuck In 'Deleting' stage
We now need to create a query to search for the machines that we are trying to remove from the database. We will now need to create a query to find the machines that are in the ADAM Database. You can complete this by right clicking ‘Default Naming Context’ and selecting New –> Query. You need to fill in the New Query box with the following information –
Name – This can be a name of your choice.
Root of Search – This needs to be the ‘Servers’ folder.
Query String – (&(objectClass=pae-VM)(pae-displayname=VirtualMachineName))
The VirtualMachineName above should ACTUALLY BE your VM Name, or a wild card like NET-VMX-1* that gets just the VMs you need to delete. Most people don't need to delete all of them.
ADAM VM Query - Removing VMware Horizon View Desktop Pools Stuck In 'Deleting' stage
I would advise using the * Icon as a Wildcard for the VirtualMachineName if you are trying to remove multiple entries at once as this will show them all.
ADAM VM Query Wildcard - Removing VMware Horizon View Desktop Pools Stuck In 'Deleting' stage
You will now be presented with the following results in the VM Query section.
ADAM VM Query Results - Removing VMware Horizon View Desktop Pools Stuck In 'Deleting' stage
You will now need to locate the relevant VM’s that you want to remove. The specific fields you should be looking for is the Description and the ipHostNumber field. These fields are the most useful for identifying the virtual machines required. Scroll down in the list and actually find the PAE-DisplayName field. That is the actual name of the VM and is MUCH better for finding your errant VM.
Identify VM - Removing VMware Horizon View Desktop Pools Stuck In 'Deleting' stage
You can now right click the entry and select ‘Delete’ as required.

Normally, I can stop here. Go back and look at the admin console and refresh. The Pool should be gone. If not, then proceed from here.
You will now need to login to the SQL Management Studio to the View Composer Database. In my deployment the View Composer is on the VMware vCenter Server. Login with the relevant credentials you used when you installed VMware View.
Login to Database - Removing VMware Horizon View Desktop Pools Stuck In 'Deleting' stage
You will now need to navigate to the VMware View Composer Database –> Tables –> dbo.SVI_VM_NAME
You will need to right click this and select ‘Edit Top 200 Rows’
SQL dbo.SVI VM NAME - Removing VMware Horizon View Desktop Pools Stuck In 'Deleting' stage
Right click and select ‘Delete’ to the selected VM’s that you want to remove from the database. After this the Desktop Pool was removed in Horizon View.
You should now remove the Computer Account from AD.
You can then remove the VM/VM’s from vCenter by right clicking the VM and selecting Delete from Disk.
To find more information on this process you can follow these KB’s.