Thursday, March 7, 2024

VMware EVC

VM can be vMotioned to new generation hardware, and vMotion back to its original host, as long as the VM has not been powered off on the destination host with new hardware.

When VM is powered off and powered back on new host, the new host EVC mode setting will taken into effect. If VM hardware version is too old , there could be kernel panic, at least for Linux OS. Guest OS might prompt user interaction in VM console to confirm regular boot process, depending on vendor, then guest OS will start successfully. However after this power-back process, VM could not vMotion back to its original host anymore, since EVC setting is working for the VM. EVC compatibility prevents reverse process.

Monday, August 14, 2023

ansible-doc vmware.vmware_rest.vcenter_ovf_libraryitem

Under - deployment_spec section, Ansible-doc does not provide enough detail on `additional_parameters'  as displayed below:

- `additional_parameters' (list): Additional OVF parameters that may be needed for the deployment. Additional OVF parameters may be required by the OVF descriptor of the OVF package in the library item. Examples of OVF parameters that can be specified through this field include, but are not limited to:
  • {@link DeploymentOptionParams}
  • {@link ExtraConfigParams}
  • {@link IpAllocationParams}
  • {@link PropertyParams}
  • {@link ScaleOutParams}
  • {@link VcenterExtensionParams}

This causes vwmare_rest API call to deploy third-party OVF from content library very difficult to fill in all necessary properties in correct syntax.

Link below contains the class detail, but not syntax format. (I understand that a programmer will be able to figure it out)

https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1cd28284-3b72-4885-9e31-d1c6d9e26686/71ef7304-a6c9-43b3-a3cd-868b2c236c81/doc/operations/com/vmware/vcenter/ovf/library_item.deploy-operation.html

https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1cd28284-3b72-4885-9e31-d1c6d9e26686/71ef7304-a6c9-43b3-a3cd-868b2c236c81/doc/structures/com/vmware/vcenter/ovf/property-structure.html

https://vdc-download.vmware.com/vmwb-repository/dcr-public/4f867b1e-c524-4e4b-b79e-4321822b5c70/a3cd39a7-4eaf-4e10-9ad2-589f9dfe1f9a/doc/Com/Vmware/Vcenter/Ovf.html

Link below provide a quick way to get json format via vCenter API explorer. 

https://stackoverflow.com/questions/47912744/propertyparams-when-deploying-vm-from-ovf

Just convert it into yaml format for readability, then use it in Ansible playbook properly.

PS: deploy ovf from content library is much faster than from local ova/ovf file, if you need to deploy it into multiple VM instances, and one time upload is worthy.

Thursday, August 3, 2023

Ansible "module_stderr": "env: python: No such file or directory\n"

Recently I got the following error while running existing Ansible playbook, which run successfully before :

fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "env: python: No such file or directory\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 127}


Ansible complains about python not found. I am using Homebrew python.

which python

python: aliased to python3

which python3

/opt/homebrew/bin/python3


stackoverflow option 2 works for me
https://stackoverflow.com/questions/3655306/ubuntu-usr-bin-env-python-no-such-file-or-directory

Just create symbolic link for python, required by Ansible:

ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python

Wednesday, February 2, 2022

Sync Office 365 Calendar to Pixel 6 Calendar app

In case your company email policy blocks Pixel 6 native Calendar app to access Office 360 email/calendar, You can do so via the help from Outlook email app from Microsoft.

In Outlook app, Office 365 account settings has one Option: Sync calendars. Turn it on, and Office 365  calendar will show up on your Pixel 6 Calendar, so you have one place to check all your schedules on Pixel 6.











Sometimes, Outlook updates might overwrite this setting, so just go back and enable it again.

Yes, you can publish your Office 365 calendar as URL, then access it via Google calendar from web browser, but currently, native Calendar app on Pixel can't not subscribe published Office 365 calendar yet.

Tuesday, January 18, 2022

Chrome browser password export/import

We all know how to import/export bookmarks in web browser, while it comes time that we will also need import passwords saved in web browser. Google Chrome provide nice feature to do so.

Credit to https://www.howtogeek.com/715223/how-to-export-and-delete-saved-passwords-in-chrome/, and https://www.alphr.com/import-passwords-google-chrome-using-csv-file/

chrome://settings/passwords has function to export password into CSV files.

For import, you will need to enable password import feature first: chrome://flags, then type in “password import” into the search bar to enable password import. 

Import function will display above Export Password, after Chrom is relaunched.

This is very handy when you have a new computer to set up.

Sunday, January 31, 2021

Samsung Galaxy Tablet 10.1 GT-N8013 on Android 11 with LineageOS 18.1 (ALPHA/BETA)

Flash (firmware update) on 8 years old original Samsung Galaxy Tablet 10.1 GT-N8013 with latest Android 11 is possible now. theupgradeguide.com provided detailed steps and screenshots nicely to follow.

html6405 from xda-developers provides all the Downloads for : Samsung Galaxy Note 10.1 Wifi. Make sure that the latest TWRP recovery file and magisk_patched_n8010.img file are download from same place, instead of img file from twrp official site. This also applies to LineageOS and Open GApps zip files. Official sites might not provide support for GT-N8013 anymore.

TWRP image replace recovery.img file on GT-N8013, which is done by Odin or Heimdall (Jodin is Java wrapper around Heimdall) via Odin mode, aka bootloader mode. TWRP img is used in recovery mode: power + volume-up (release buttons after Samsung screen is displayed; volume-up key is on the left to SD card slot)

MagiskSU from topjohnwu replaces SuperSU for rooting recent version of Android devices. Magisk Manage app is included in Lineage OS, which will be used for creating magisk_patched_*****.img in place, so you can rename it as boot.img and flash boot partition in Odin mode (or just select "Direct Install" method, which will flash boot image in place.). After reboot, GT-N8013 is rooted, and passes SafetyNet Attestation checking via Magisk.

LineageOS 18.1 on GT-N8013 from htm6405: lineage-18.1-20210114-HTML6405 seems to have the common issue on LineageOS with charging over a hour, which might freeze and could not resume from standby screen. Hopefully this will be resolved by next release.

LineageOS boot up process is a little slow (initial boot is even slower), compared to original Samsung boot. I did not find an option to fast boot it yet.

After flashing GT-N8013 with LineageOS 18.1, Android display device info as GT-N8010, I understand the img file I used did  have subfix with n8010. It is fine.

Android (Trust System security) complains that This build was signed with public key, and SELinus is not enforcing, you system has been weakened, so I had to disable the trust, not the best practice really.

Also credit to Sonny Kurniawan on Blogger, who provided details on flashing Android Nougat. Yes, my stocked GT-N8013 has been collecting dust all these years. 😅

Always xda link for more and latest info.

As to OEM bootloader unlock, JJEgan from xda-developers says GT-N8013 is unlocked. I enabled Developer debug mode in original ROM (Android 4.1.2), and I don't recall there is option for bootloader unlock either. 

I used Heimdall on OS X Mojave to flash TWRP and magisk patched.img.

Update: I flashed GT-N8013 with LineageOS 18.1 BETA from html6045 with same version of TWRP as ALPHA release last December without any issue.

Note: Magisk is not installed on BETA release.

Tip: LineageOS might not include some language input method, but Gboard app from Google Playstore is pretty good, which detects extra language selected, and download most popular input method in the background.

Heimdall on OS X High Sierra/ Mojave

Samsung Galaxy devices use Odin to flash firmware, however Odin is only available on Windows unfortunately.

Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy devices from Benjamin Dobell, an alternative for Odin on Linux/Mac.

Packaged Heimdall binary from link doesn't work on High Sierra or latter, so you will have to compile source code from gitlab. Heimdall frontend requires Xcode 9.4 above.

bfabiszewski @bfabiszewski has merge request: Fix build on macOS High Sierra for Heimdall, which replaces three CMakeLists.txt files from source. Without these fixes, cmake step from Benjamin Dobell will fail.

I followed fix from bfabiszewski on OS X  Mojave and built Heimdall binary successfully.

It seems that best practice is to run Heimdall with sudo, and also for heimdall front end. One caveat or feature I noticed is that Heimdall tends to release kernel drive after some operations, which might cause next task failed with initialization error. If this happen, just disconnect/reconnect usb cable, and run heimdall detect to make sure Heimdall can detect Samsung Galaxy devices.