Items filtered by date: December 2014

Sunday, 19 June 2016 16:07

My VirtualBox Notes

These are my VirtualBox notes.

Official Sites

General

  • Release the cursor from the VM
    Right Ctrl key
  • Release the cursor from the VM when in scaled mode
    Right Ctrl + C
  • Extension Pack
    The main installer has option for USB 3.0, so I am not sure if this will prompt to add the extension pack or if it part of the main program.
  • Guest Additions
  • phpvirtualbox
  • Cannot change Boot order in settings
    • Legacy BIOS VMs:
      • Press F12 during VM startup to select a boot device for that session 
    • If the VM uses EFI:
      • Use the ESC key during startup or adjust disk/controller order for a workaround.
      • If you're already using EFI/UEFI, this is different. The EFI firmware has its own NVRAM boot entries.
      • VirtualBox doesn't provide a normal GUI option for rearranging those EFI entries.
      • You need to modify the EFI variables/NVRAM, typically from inside the VM using efibootmgr on Linux, or using the UEFI shell. For example from Linux: efibootmgr
      • Adjust Disk/Controller Order: VirtualBox prioritizes the disk attached to Port 0 of a SATA/IDE controller. Moving your bootable disk to Port 0 can enforce boot priority.
  • Storage Devices are missing in settings (Settings --> Storage --> Devices)
    • At the top-left, select expert mode and the hidden stuff will appear
    • Sometimes there is a blank line at the top, in basic mode, which is the parent controller (buggy)
    • Try removing everything by clicking the button until it is greyed out, save settings and start again.
    • Additionally, after wiping all storage devices, save and then make your changes.
  • Virtualbox keeps toggling Num Lock
    • You will notice this if you have an on-screen display for Num Lock.
    • This is quite normal as the Num Lock state is swapped to match which machine(or host) has focus.
    • Disable the on-screen notification.
  • Windows XP taking forever to load / Crashes with a CPU error (Windows 11 host)
    • Cause:
      • This is caused by Core Isolation being enabled.
      • Hyper-V running underneath VirtualBox is the single most common cause of exactly this error on XP guests on modern Windows hosts.
    • Solution:
      • Disable Core Isolation / Disable Hyper-V 
      • Settings --> Device security --> Core Isolation --> Memory integrity: Off
        • You will need to reboot.
      • This resolves this exact symptom for a lot of people, because Hyper-V's virtualization-based security conflicts with how VirtualBox exposes the CPU to an XP guest.
    • Links:
  • Installation
  • mtrr: your CPUs had inconsistent variable MTRR settings
    • This error might be caused by `Core Isolation` settings.
  • Make a disk with fixed size and do snapshots ?
    • I guess when the snapshots are removed, the VM will revert to a single disk again. While there are snapshots, effectively a parallel dynamic disk/file will be run along side it as an overlay. This will affect performance.
    • Don't run snapshots on a live production server.
  • Copy and Paste
  • Preallocate or Fixed disk (move to disk image managment)
  • Missing Device icons at the bottom of the window
  • Parallel Port
    • Can't give VirtualBox guest OS access to host physical LPT1 port | Super Users
    • How to enable parallel port? | Reddit
      • I was running WinXP in VirtualBox v4.0.x. It is dedicated for a legacy parallel/LPT port device that only has drivers for WinXP 32bit.
      • The host is Win7 x64.
      • It was working just fine for a long time. Recently, I updated VirtualBox to the latest v6.1.0 and now when I startup the WinXP vm, I get this error about no parallel port. And I can't find any settings to enable it.
    • Enabling and Configuring Parallel (LPTx) Ports - virtualbox.org
      • On several occasions the mods have been asked for instructions on how to enable and configure LPT (parallel port) passthrough in a guest.
      • LPT passthrough is a feature which has been requested for years, and was finally implemented with very little fanfare in VirtualBox v4.2.0 (*).
      • The release logs and documentation make only passing mention of it, which possibly reflects a low level of confidence the devs have in this new feature.
      • Basically, it's an (almost) undocumented feature, so if you can't get it to work... well just don't expect too much.
    • Passthrough questions - virtualbox.org
      • Should I be able to do the USB to LPT on the host machine and just pass through the LPT port?
      • Should I be able to pass through an AGP or PCI video card to the guest while keeping the onboard video for the host?
        Anything else I'm not thinking of?
  • VirtualBox multicore issue
  • Snapshots
  • Virtuabox vs VMWare vs Hyper-V
  • Should I enable PAE/NX ?
    • Yes, for all modern OSes. This should only need turning of for really old OSes.
    • This option does control 2 separate but related features.
    • DEP requires NX
    • What is PAE/NX in VirtualBox? | Quora
      • PAE (Physical Address Extension)
      • NX (No-Execute), also called XD (eXecute Disable) on Intel
      • Default choice: Enable PAE/NX for modern guests unless you have a specific compatibility reason not to. It improves security (NX) and enables expanded memory for 32-bit guests (PAE).
      • Enable it for modern OSes and for 32-bit guests that must access >4 GiB or require PAE.
      • In-depth answer.
    • When do I have to use PAE/NX? | Super User
      • Now, let's return to the fact that the checkbox is for PAE/NX. The same tricks used to make more memory locations accessible can also be used to add in an NX-bit. Again from the second paragraph of the PAE Wikipedia article:
      • In-depth answer.
    • Unlocking the Power of PAE NX in VirtualBox: A Comprehensive Guide - SmartTechSavvy - In this article, we will delve into the world of PAE NX in VirtualBox, exploring what it is, how it works, and its benefits and limitations.
    • Physical Address Extension - Wikipedia
    • NX bit - Wikipedia
    • How to Enable Processor-Based Security: DEP, NX/XD, Memory Integrity | iTechguides
      • How to enable processor-based security in Windows: check and configure DEP with NX/XD and BCDEdit, then enable Memory integrity for VBS/HVCI when hardware and drivers support it.
      • Hardware DEP uses NX on AMD processors or XD on Intel processors to prevent code from executing in memory pages marked for data.
      • Older applications and drivers can fail when DEP or Memory integrity blocks behavior that is unsafe, obsolete, unsigned, or incompatible.
    • Windows DEP Explained: How It Protects Memory and How to Manage It | WindowsForum
      • Data Execution Prevention (DEP) is one of those quietly powerful Windows defenses that rarely makes headlines — until it blocks something you’re trying to run.
      • Built to stop code from executing in memory regions reserved for data, DEP reduces the damage that buffer overflows and similar memory exploits can cause.
      • This feature uses both CPU hardware flags (NX/XD) and software fallbacks to enforce execution policies, and it’s enabled by default on modern Windows installations.
      • For most users DEP should stay turned on; for administrators and power users, understanding how DEP works, how to check its status, and how to safely troubleshoot exceptions is essential to balancing compatibility and security.

Virtual Drive's Serial Number

Tutorials

Misc

Startup and shutdown

Mount a RAW drive

Backing Up a Live Server

Performance

Host Machine

  • Get a newer PC with at least 16GB RAM and a modern prosesor with loads of cores
  • Put Your Virtual Machines on a Solid-State Drive system rather than traitional drives for your host
  • Ensure Intel VT-x or AMD-V Is Enabled in the BIOS (VirtualBox wont run without this now)
    • This stops windows intercepting opcodes passed to the CPU by the virtualization technologies
  • Exclude Virtual Machine Directories In Your Antivirus   
  • Change Power Plan to High Performance
    Control Panel --> Power Options --> Change Plan Settings   
  • Disable Hyper-V & Windows hypervisor (wintips)
    1. Navigate to Control Panel > Programs and Features > Turn Windows features on or off : Disable the following
      • Containers  *                   (off by default)
      • Hyper-V      *                  (off by default)
      • Virtual Machine Platform        (off by default)
      • Windows Hypervisor Platform     (off by default)
      • Windows Sandbox                 (off by default)
      • * Note: The 'Containers' and the 'Hyper-V' features exists only in Windows 10 PRO.
           
    2. bcdedit /set hypervisorlaunchtype off
  • make sure windows updates are all applied as these usually cause a general slow down in your PC.
    • My system will not download or install them unless I click to do so.
  • Having the latest VirtualBox is probably a good thing.
  • Disable `Core Isolation` as this has known performance issues especially with older OSes.
  • Use nVME drives as they are quicker adn can handle modern disk formats better.
  • The Complete Guide to Speeding Up Your Virtual Machines | How-To-Geek - Virtual machines are demanding beasts, providing virtual hardware and running multiple operating systems on your computer at once.
  • Speed up a VirtualBox Virtual Machine and make it run faster | The Windows Club
    • The speed and performance of a Virtual Machine depend on the specifications of the host machine like RAM, processor, etc.
    • But sometimes, despite having a powerful computer, the Virtual Machine runs slow.
    • In this article, we will describe some methods that will help you make your Virtual Machine run faster.
  • Virus scanning recommendations for Enterprise computers that are running Windows or Windows Server (KB822158) | Microsoft Support
    • Describes recommendations that might help you protect a computer that is running Windows from viruses.
    • Delves into issues you might have with software and how to apply exclusions safely.
  • Antivirus Slowing Your PC Down? Maybe You Should Use Exclusions | How-To-Geek - Protecting your computer with an antivirus solution is par for the course when you’re dealing with a Windows PC, but unfortunately it slows you down at the same time. Here’s how to improve your performance, at least a little bit.
  • FIX: VirtualBox Running Very Slow in Windows 10/11. (Solved) - WinTips.org - Several methods to optimize VirtualBox's performance under Windows 10/11 (FIX: VirtualBox is running very slow on Windows 11/10)
  • [Fixed] VirtualBox VMs are too Slow on Windows 11 Host - Sysprobs - VirtualBox VMs are too slow on Windows 11/10 with a green turtle? Here is the working solution to bring back the speed & V symbol. TURTLE
  • Fix VirtualBox VM Running Slow on Windows 11 (Step by Step) | MCSA Guru
    • VirtualBox crawling on Windows 11? Hyper-V, Memory Integrity, and WSL2 steal VT-x. Learn what to disable, how to allocate resources, and enable nested paging.
    • If VT-x or Nested Paging is greyed out or refuses to enable, either virtualization is turned off in the host’s UEFI/BIOS, or the Windows hypervisor is still holding the extensions. Enable Intel VT-x / AMD-V (sometimes called SVM) in firmware, and re-check that the Hyper-V stack is fully off per the steps above.
  • Working with Virtual Machines | Oracle
    • The colored bar in the icon indicates current processor activity. Red indicates high CPU usage, Green indicates low CPU usage. 
    • A green turtle icon indicates that a native hypervisor, such as Hyper-V, is running on the host.
    • Processing Cap: Note that limiting the execution time of the virtual CPUs may cause guest timing problems.

Guest VM

  • Create Fixed-Size Disks Instead of Dynamically Allocated Ones
  • The disk type/controller should be set as SSD
  • Disable 3D Acceleration in VM Settings
    • I think to use 3D acceleration you should use the VirtualBox driver.
    • And incidentally, 3D acceleration isn't just for 3D. It allows for faster (lower CPU overhead) graphics in general, which is important to cater for the trend to UHD+ high res (4K) displays.
  • Change Graphics Controller in VM Settings
    • VboxSVGA <--> VboxVGA <--> VMSVGA
    • use VMSVGA
    • https://forums.virtualbox.org/viewtopic.php?t=105010
      • VBoxVGA has been depreceated
      • VboxSVGA is recommended for Windows VMs, and VMSVGA is recommended for Linux VMs. VMSVGA is apparently provided as a compatibility provision for im/exported VMs to other hypervisors, if I remember correctly, so the VM OS won't have to endure a video card change. You're free to try anything you want, and some Linux VM users have anecdotally reported glitches with VMSVGA that go away with VboxSVGA.
      • How to Make Ubuntu 20.04 LTS VMs Smoother by Enabling 3D Acceleration on VirtualBox - 9to5Linux
        • A quick and painless tutorial to correctly enable 3D acceleration on Ubuntu 20.04 LTS and Ubuntu 18.04 LTS for VirtualBox virtual machines.
        • has a test to see if 3D acceleration is being used.
  • Disable Host I/O Cache in SATA Controller.
        Although the Host I/O Cache of the disk controller helps VirtualBox to run faster, in some cases it does not.
  • Install VirtualBox Guest Additions (optional)
    • for special drivers for better performance and allows stuff such as RAM monitoring
    • I would do this if it was just linux, might casue a mess but I am not an expert
    • i like to keep my installs vanilla
    • Remove & reinstall Guest Additions might help
  • Allocate more RAM to VM
  • Allocate more CPU to VM (Execution and cores)
        Generally not best to have a cap if you have enough resources
  • Increase the video memory
  • Suspend Instead of Shutting Down
        This is workaround and should not be a solution for better performance

Links

Network Settings

Where have the VirtualBox Drivers gone?

When you first setup a VirtualBox PC you might find the drivers are missing. These are not easy to find unless you know where they are.

  • The windows Files are on a iso file which might not be present until you install "Guest Additions"
  • C:\Program files\Oracle\VirtualBox\VBoxGuestAdditions.iso
  • So you mount this image which has the drivers.
  • see https://www.virtualbox.org/manual/ch04.html
  • I have also found that the drivers that are supplied do not cover all operating systems.

** Notes off the CD ? **

Oracle VM VirtualBox Guest Additions

  • Where have the Windows drivers gone?
    The Windows Guest Additions drivers were removed from this directory to save space on your hard drive. To get the files you have to extract them from the Windows Guest Additions installers:
  • To extract the 32-bit drivers to "C:\Drivers", do the following:
    VBoxWindowsAdditions-x86 /extract /D=C:\Drivers
  • For the 64-bit drivers:
    VBoxWindowsAdditions-amd64 /extract /D=C:\Drivers
  • Note: The extraction routine will create an additional sub directory with the selected architecture (x86 or amd64) to prevent mixing up the drivers.
  • To get further help with the command line parameters of the installer,
    type: VBoxWindowsAdditions-<arch> /?

Notes

  • The video drivers are present but the network card is not. The link below suggest changing the network card hardware type until you find one that works.
  • https://ubuntuforums.org/showthread.php?t=1106684  
    • "In the Virtualbox Control Panel thing (where you can specify your machines hardware configuration), you click on the network adapter category and then change the interface type. There are four to select from. Simply try a different interface type until one works. I didn't need to give windows any drivers for the PCnet-PCI II device (the screenshot shows the PCnew-FAST III device, and that's what I use on my home computer... this other persons computer...well, it probably would have worked too, but the I picked the PCI device out of the list of four available and it work with no issues or prompts to install any drivers). "
  • Try "PCnet-PCI II device"
  • Intel Pro/1000 MT (82540EM)

Driver Links

Troubleshooting

Cannot access Guest OS from Host when using Bridged networking, but it has internet

  • Guest OS can access the internet and can be pinged
  • All other PCs on the network can access the Guest OS
  • My router can ping the Guest OS
  • Wireless Limitations
    • Bridging over Wi-Fi has limitations on most hosts because not all wireless support promiscuous mode. 
    • Use Ethernet instead
  • The VM cannot ping the host, the host cannot ping the VM.
  • Things I have tried (that did not work for me)
    • Turned off all firewalls
    • Uninstalled
      • OpenVPN GUI
      • WireShark + all dependencies
    • Tried all `Promiscuous Modes`
    • Remove network hubs/switches between my PC and the router
    • Swapped to using my physical ethernet rather than a WiFi connection
      • NB: this might be a solution for you.
    • I have been using virtio-net, so i tried`Intel PRO/1000MT Desktop (8254OEM)`
    • in network devices, disabling `VirtualBox NDIS6 Bridged Networking Drive` on NICs that I was not using
    • Checked Hyper-V or the sandbox feature is not installed.
    • Reverted VirtualBox 7.2.16 to 7.1.18. I did a full uninstall and reboot before putting the old version back on.
    • I had 2 host-only adapters, so i reinstalled VirtualBox without them
    • Swapped Network profile type to private
      • Settings → Network & internet → Wi‑Fi or Ethernet → your connected network → Network profile type → Private
      • This allowed me to ping the host from an external PC.
    • Reset all network adapters through settings GUI
      • Although this did not work, it did cleaned up my network devices
    • Disabled IPv6 in the NICs
    • VirtualBox Bridged Networking – Guest Can't Reach Host at All (But Internet Works) - virtualbox.org - has a big list of things he tried and came to the same conclusion as I did.
  • Diagnostic commands
    • arp -a
      • this will give a list of mac against IP, including Guest OS
      • If you see something like:
        10.0.0.190    xx-xx-xx-xx-xx-xx    dynamic
        • then the host can reach the VM at Layer 2, and we should investigate Windows filtering/firewall/routing.
    • arp -d
      • Empties the ARP cache
    • ping 10.0.0.190
      • obvious
    • ping 10.0.0.190 -S 10.0.0.166
      • ping the first IP starting its journey with the second IP
    • tracert -d 10.0.0.190
      • obvious
    • Get-NetConnectionProfile
      • If it shows Public for the adapter in question, that alone explains total inbound blocking, not just ICMP.
    • Test-NetConnection 10.0.0.190 -Port 22
      • can test any service with this powershell
    • Test-NetConnection 10.0.0.190 -InformationLevel Detailed
      • more advanced results of above
    • route print
      • Check the host’s route - The route should use the host’s normal LAN interface, not a VPN, Docker, WSL, or VirtualBox host-only interface.
    • route print 10.0.0.190
      • as above but only for the specified IP
    • Get-NetRoute -DestinationPrefix "10.0.0.190/32"
      • did not work for me
    • Get-NetAdapter | Format-Table ifIndex,Name,InterfaceDescription,Status,MacAddress,LinkSpeed
      • Nice table of adapters and their mac addresses
    • Get-NetAdapterBinding -Name "Ethernet 2" | Format-Table DisplayName,ComponentID,Enabled
      • List the NIC plugins (Eg Internet Protocol Version 4 (TCP/IPv4)
    • Get-NetFirewallProfile | Format-Table Name,Enabled,DefaultInboundAction,DefaultOutboundAction
      • check whether Windows is blocking the traffic
    • Get-NetFirewallRule -Direction Outbound -Enabled True -Action Block |  Select-Object DisplayName,Profile,Program
      • check whether Windows is blocking the traffic
    • Get-NetAdapterBinding -Name "Ethernet 2" | Where-Object {$_.Enabled -eq $true} | Format-Table DisplayName,ComponentID
      • not sure what this does
  • Cause
    • The network card is mangling the packets so they cannot be routed correctly. 
  • Solution(s)
    • These settings are only present on Ethernet cards so you cannot use a WiFi card to resolve this issue.
    • Edit the network card driver as follows (settings may vary)
        Default New setting Notes
      IPv4 Checksum Offload Rx & Tx Enabled Rx Enabled Allows ping
      Large Send Offload V2 (IPv4) Enabled Enabled Leave as is
      TCP Checkum Offload (IPv4) Rx & Tx Enabled Rx Enabled  
      UDP Checkum Offload (IPv4) Rx & Tx Enabled Rx Enabled Based on TCP results
      • You might need to apply these settings to IPv6

Error - Rapport Trusteer blocking VM from running

You are getting these errors

Failed to open a session for the virtual machine PM Cons.

The virtual machine 'PM Cons' has terminated unexpectedly during startup with exit code 1 (0x1).  More details may be available in 'C:\Users\Paul\VirtualBox VMs\PM Cons\Logs\VBoxHardening.log'.

Result Code: E_FAIL (0x80004005)
Component: MachineWrap
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

Solutions

  • Solution 1
    • Uninstall vb
    • Reboot
    • Install vb
    • Set that service state to ...  (vboxdrv service ?)
  • Solution 2
    • Remove trusteer/rapport
    • Reboot and check
    • Remove other security products
    • Reboot and check

Notes

Windows XP will not boot completely or takes a long time

  • This is cause by `Core isolation --> Memory intergrity`.
  • Disable in windows and the Windows XP guest will boot correctly/

Nested VT-x/AMD-V Greyed out

Nested virtualisation in VirtualBox can be unavailable for many reasons and we will work through them in a logical order below. The image blow shows you the setting we will be discussing

Hardware Support

As of VirtualBox 6.1.0, support for hosts that don't have VT-x or AMD-v have been dropped, and VT-x/AMD-v is required for all VMs.

Causes

  • Causes
    • Does your CPU support virtualisation.
      • It is very likely, as most modern processors have this feature.
      • VT-x / AMD-v has been added to CPUs thing since around 2010.
      • Intel 2nd Gen (VT-x, VT-d) + Ryzen 1000 series (AMD-V, IOMMU) and up = have the VT technologies.
    • Does Your CPU support Nested Virtualisation.
    • In the early days this was not a feature.
  • Checks
  • Notes
    • If you are running a VM in VirtualBox, then the answer is yes, but it might not support nested virtualisation.

Enabled in the BIOS?

  • Causes
    • Is it enabled in the BIOS?
    • Some BIOSes have a separate options for nested virtualisation.
  • Checks
    • Login to the BIOS and make sure all virtualisation options are on.

Check for Virtualisation support in Windows

So now we have verified our hardware supports the virtualisation features we need, we should now check Windows and VirtualBox.

Check VirtualBox mode (is there a green turtle)

  • This is a very simple check to see where the virtualisation is at for VirtualBox
  • Table 5-1 Virtual Machine Status Bar Icons - Working with Virtual Machines - You can see the icons up close here.
  • VirtualBox has 2 modes it can un its "Execution Engine" in, and this is easily shown by the CPU icon in the status bar at the bottom when you start a virtual machine up.
    • Execution Engine: VT-x/AMD-V

      • VirtualBox is using native hardware virtualization.
      • This is the "normal" mode and all CPU features are exposed to VirtualBox.
    • Execution Engine: native API
      • Some Hyper-V component is active, VirtualBox tries to use the Native Execution Manager (NEM) mode.
      • A green turtle icon indicates that a native hypervisor, such as Hyper-V, is running on the host.
      • This is where the reference to the green turtle comes from. Implication it is working but slower that it could.
      • This will mode runs slower than the native mode.
      • It allows you to keep core isolation on for more security but you cannot do nested virtualsation.
      • Using Hyper-V with Oracle VirtualBox - Advanced Topics | Oracle
        • Oracle VirtualBox can be used on a Windows host where Hyper-V is running but host systems might experience significant Oracle VirtualBox performance degradation.
        • Assuming Windows Hypervisor Platform is running, Oracle VirtualBox detects Hyper-V automatically and uses Hyper-V as the virtualization engine for the host system.
        • The CPU icon in the VM window status bar indicates that Hyper-V is being used.(i.e. it is a turtle)

What is causing Hyper-V to be running in Windows?

  • Hyper-V can be running for many reasons, not just for directly running VMs.
    • Hyper-V for directly running VMs (not sure what the name is)
    • Virtual Machine Plattform
    • Windows-Hypervisor-Platform
    • Windows Sandbox
    • Windows-Subsystem for Linux (WSL2)
    • Virtualization-based security (VBS/Core isolation)
      • This can get enabled when people upgrade their Windows 11.
    • Docker
  • There might be a way to get Nested Virtualisation working with Hyper-V and VirtualBox, I just have not found it yet.

Diagnostics

We can now use these techniques and software below to help identify the cause of Hyper-V to be running.

  • VBoxManage list hostinfo can be used to show exactly what features VirtualBox  can see
    C:\Program Files\VirtualBox>VBoxManage list hostinfo
    Host Information:
    
    Host time: 2026-08-31T07:38:38.409000000Z
    Processor online count: 8
    Processor count: 8
    Processor online core count: 4
    Processor core count: 4
    Processor supports HW virtualization: yes
    Processor supports PAE: yes
    Processor supports long mode: yes
    Processor supports nested paging: yes
    Processor supports unrestricted guest: no
    Processor supports nested HW virtualization: no
    Processor supports virt. vmsave/vmload: no
    Processor#0 speed: unknown
    Processor#0 description: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Processor#1 speed: unknown
    Processor#1 description: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Processor#2 speed: unknown
    Processor#2 description: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Processor#3 speed: unknown
    Processor#3 description: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Processor#4 speed: unknown
    Processor#4 description: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Processor#5 speed: unknown
    Processor#5 description: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Processor#6 speed: unknown
    Processor#6 description: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Processor#7 speed: unknown
    Processor#7 description: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory size: 16103 MByte
    Memory available: 5099 MByte
    Operating system: Windows 11
    Operating system version: 10.0.26200.8655
    
    C:\Program Files\VirtualBox>     
    • The example above was run with Core Isolation on.
  • Windows Task Manager
    • Open up Task Manager
    • Got to the Performance tab
    • Select CPU
    • At the bottom right you will see a "Virtulaisation" setting displayed.
  • msinfo32
    • Shows Virtualisation-based security (VBS) is running
  • Coreinfo
    • CoreinfoEx64.exe (from Windows)
      • Shows the status of various CPU and windows features including if the Hypervisor is present.
    • coreinfo -v (from the command prompt)
      D:\>coreinfo -v
      
      Coreinfo v4.02 - Dump information on system CPU and memory topology
      Copyright (C) 2008-2026 Mark Russinovich
      Sysinternals - www.sysinternals.com
      
      
      Note: Coreinfo must be executed on a system without a hypervisor running for
      accurate results.
      11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
      Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
      
      Microcode signature: 000000BE
      Processor signature: 000806C1
      
      Maximum implemented CPUID leaves: 0000001B (Basic), 80000008 (Extended).
      Maximum implemented address width: 48 bits (virtual), 39 bits (physical).
      
      HYPERVISOR      *       Hypervisor is present
      VMX             -       Supports Intel hardware-assisted virtualization
      EPT             -       Supports Intel extended page tables (SLAT)
      URG             -       Supports Intel unrestricted guest
      
      D:\>
      • Information returned is limited to virtualisation.
      • As you can see here the hypervisor is present and the other virtualisation options are not available.
      • coreinfo without the -v switch will show a lot more info.
  • systeminfo.exe
    Virtualization-based security: Status: Running
                                   Required Security Properties:
                                   Available Security Properties:
                                         Base Virtualization Support
                                         DMA Protection
                                         UEFI Code Readonly
                                         SMM Security Mitigations 1.0
                                         Mode Based Execution Control
                                         APIC Virtualization
                                   Services Configured:
                                         Hypervisor enforced Code Integrity
                                   Services Running:
                                         Hypervisor enforced Code Integrity
                                   App Control for Business policy: Enforced
                                   App Control for Business user mode policy: Off
                                   Security Features Enabled:
    Hyper-V Requirements:          A hypervisor has been detected. Features required for Hyper-V will not be displayed. 
    • In the results you will see these 2 sections that can be used to see if Hyper-V and Virtualization-based security (VBS/Core isolation) are running.
    • "A hypervisor has been detected. Features required for Hyper-V will not be displayed" - This means Hyper-V is running and this will prevent nested virtualization.
    • You can also get a shorter version using systeminfo | find "Virtualization"
  • bcdedit /enum
    • run this from the command prompt.
    • Look for hypervisorlaunchtype — Auto means Windows' hypervisor is set to launch at boot.
  • Rule out third-party hypervisors
    • If you run VMware Workstation, VirtualBox, Docker Desktop, or WSL2, any of those can install/enable a hypervisor layer too. Check:
      Get-Service | Where-Object {$_.Name -match 'vmms|vmcompute|WSL|VBoxSVC|vmware'}
    • and Task Manager → Performance tab → CPU should show "Virtualization: Enabled" — not diagnostic on its own, but if Hyper-V/WSL2 is installed you'll also see it under:
      Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -match 'Hyper-V|VirtualMachinePlatform|Containers'} 

Disable all instances of Hyper-V

If you go through the tutorials at the end they will direct you any additional processes you might need, but the one I did.

This allows the relevant CPU functions to be passed directly to VirtualBox rather than being grabbed by Hyper-V which in turn does not supply nested virtulisation.

  • Disable Core isolation
    • Windows Security --> Device security --> Core isolation --> Memory integrity
      • Modern Windows systems use this tech for security. Core Isolation and Memory Integrity give hypervisor-based protection. This makes threats like rootkits harder to execute.
      • But these features may conflict with some VM software. For example, VirtualBox can produce an error with Memory Integrity on. In that case, you can turn it off temporarily. But accept the security risk.
      • Keep Core Isolation off on dev machines. I leave it on for production systems. This balance gives both performance and safety.

Cannot enable VT-x/AMD-V in the VirtualBox GUI

We have to enable the setting using the command line. From the outside this does seem like a bug, but perhaps my new laptop is not new enough.

Fix

  • Enable the VT-x/AMD-V setting by using the command line:
    VBoxManage modifyvm "<VM name>" --nested-hw-virt on

Cause

  • Virtualbox enable nested vtx/amd-v greyed out | Stack Overflow
    • From Ticket : This behavior is actually a known issue for your kind of CPU.
    • These models lack a certain feature called VMCS shadowing which improves nested HW virt performance tremendously, it will be terrible otherwise. That is the reason it is not available from the GUI.
    • VBoxManage however is meant as a tool to even make VM config changes which can break the VM and it is assumed the user knows what he or she is doing. Thats why it is possible to enable it from VBoxManage but performance is expected to be abysmal.
  • https://forums.virtualbox.org/viewtopic.php?f=1&t=98708&p=478598#p478598
    • The VirtualBox Manager allows the user to change the Enable Nested VT-x/AMD-V checkbox (under System > Processor), only if the VMCS Shadowing CPU feature is available, and prevents the user from doing so otherwise. (Actually, the VirtualBox Manager checks the availability of all 4 CPU features involved, but this distinction is not important here.) In consequence, VirtualBox V1 can run VirtualBox V2 with G2 efficiently.
    • The VBoxManage modifyvm <VM name> --nested-hw-virt on command enables Nested VT-x, irrespectively of the availability of the VMCS Shadowing CPU feature, and can therefore be used to circumvent the restrictions of the VirtualBox Manager method. This is equivalent to saying "I know what I'm doing!". In consequence, VirtualBox V1 cannot run VirtualBox V2 with G2 efficiently if the VMCS Shadowing CPU feature is not available.

Research Links

While researching this I came across these articles.

Questions

  • Is it possible to keep the Hyper-V running to allow for the benefits of core isolation but with the ability to use nested virtualisation? Speed is nto an issue.
Published in Virtual Machines

This article is not complete yet.

There are 2 basic ways to remove the counter:

  1. Use the USB Jig - A little piece of hardware that would reset the counter and get rid of the yellow traingle when plugged into the USB socket.
  2. Software - I am not 100% sure how this works, needless to say it is software that alters the counter but this has a small chance of bricking your phone.

Links

Published in Android

I have made a list of the settings I like to set when am setting up a Cyanogenmod Android phoen for th first time. I makes things a lot easier because if you only use a setting once you might not remember where it is and spend ages trying to find it again, I know I have.

Android Settings

  • You can search settings
  • NB select to update the cyanogenmod recovery - Settings --> Developer options --> Update Cyanogenmod recovery
  • disable home button waking phone up - settings --> buttons --> Home Button --> Wake up device
  • change vertical app list to horizontal –
  • change home screen time out - settings --> Display & Lights --> Screen --> Sleep (i set to 10 mins)
  • enable developers mode - settings --> about --> tap 7 times on the build number
  • force app close when holding the back button --> settings --> Developer options --> Kill app back button
  • Kill app on leaving - Settings --> Developer options --> Apps --> Don't keep activities = destroy all related tasks when you leave app
  • Extended shutdown with recovery option - Settings --> Developer options --> Apps --> Advanced reboot
  • format SDCARD in android - Settings --> Storage & USB --> {select the drive ie sdcard0} --> 3 button menu --> Settings --> format -- you cannot wipe system drive here and also i would recommend not having root on whilst you do it.
  • enable usb drive mounting via usb
Published in Android

You receive the following error when trying to format your Samsung S2 Internal SD drive in Cyanogenmod CM13 (Android 6.0.1):

Command ’33 volume partition disk:
179_0 public’ failed with ‘400 33
Command failed’

command failed

Possible Causes

  • Corrupt PIT
  • The kernel/Bootloader was not IsoRec compatible
  • Corrupt partition format
  • The ROM is faulty

Solution (does not work)

After I had updated the bootloader/Recovery with TWRP 3.0 and performed a REPIT The drive seems to work ok. This basic will fix any of the errors outlined above. Obviously unless you need to re-partition you Samsung I would just try updating the Bootloader/Kernel/Recovery first.

I still cannot reformat the drive in CM13

Notes

This could just be a bug in the current revision of CM13.x so another excellent solution is to see if updating to the latest verion of CM13 works.

Published in Android
Sunday, 19 June 2016 14:13

Slow Samsung Evo 850 SSD

These are my reseach notes for trying to find out why my new Samsung Evo 850 SSD was not running at advertised speeds in my Dell E6540 Laptop.

Settings I tried and the results:

  • Chipset drivers set as IRRT but running in ACHI mode in bios (No Change)
  • using a standard ahci drive from microsoft 2006 causing issues (No Change)
  • use intel RST technology but make sure this is the driver being used (No Change)
  • c state setting in bios (No Change)
  • Disable the samsung RAPID Mode  as it is only a RAM disk
  • Intel speed step disabled (a bit better)
  • Single core rather than multi (slower IOPS read if i restrict to 1 core because not proper 1 CPU emulation, 1 core giving half speed and thus maxing the core out.)
  • UEFI / Legacy MBR (No Change)

Other Settings Not tried or are not applicable:

  • I can bump those 4K random read/writes up by disabling C1e and c-states in my BIOS
  • Other power settings in bios

So the Specific Settings I have available in my Dell E6540 are:

  • System Status
    • SATA Operation = AHCI
  • Performance
    • Multi Core Support
    • Intel SpeedStep
    • C-States Control
    • Intial Turboboost

None of these made any difference.

Other things to try that have been suggested:

  • Try safe mode
  • Try running prime 59 whilst running the Performance program because the CPU is kicked in fully
  • Window has power management features that could throttle the CPU
  • See if the drive is faulty by trying it in a Desktop PC with a powerful SATA chipset.

Conclusion

It is my chipset that has a limitation. Not all laptops were designed to handle SSD speeds because when these laptops were getting designed, SSDs were not main stream yet.

Links

Published in Hardware
Saturday, 18 June 2016 11:55

Flying Form

This code creates a form using a UniForm, that will slide in from the center for that extra effect to whichever module position you select In this case, Stick Leftbottom [stick-leftbottom] position.

This code is designed for Uniform but can be adapted to slide in any module.

 

 

CSS

/* Container */

.flying-form {
	padding-left: 10px;
}	

.flying-form .popup-form {
	position: relative;
	margin-bottom: 50px;
	width: 320px;
	min-height: 142px;
}

/* Animation */

.flying-form .animated {
	-webkit-animation-duration: 1s;
	animation-duration: 1s;
	-webkit-animation-fill-mode: both;
	animation-fill-mode: both;
}

@-webkit-keyframes slideInRight {
	0% {
		-webkit-transform: translate3d(100%, 0, 0);
		transform: translate3d(100%, 0, 0);
		visibility: visible;
	}
	100% {
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
	}
}

@keyframes slideInRight {
	0% {
		-webkit-transform: translate3d(100%, 0, 0);
		transform: translate3d(100%, 0, 0);
		visibility: visible;
	}
	100% {
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
	}
}

.flying-form .slideInRight {
	-webkit-animation-name: slideInRight;
	animation-name: slideInRight;
}	

/* Styling */

.flying-form .popup-form {
	position: relative;
	margin-bottom: 50px;
	width: 290px;
	background-color: #fff;
	padding: 15px 15px 0;
	box-shadow: 0 0 4px #666!important;
	border-radius: 3px 0 0 3px !important;
}

.flying-form .popup-form h2.popup-title {
	text-transform: none;
	margin: 10px 0 0 10px;
	font-size: 16px;
	line-height: 1.3;
	font-weight: bold;
}

.flying-form .popup-form .jsn-bootstrap .jsn-form-content .control-group {
	padding: 0 !important;
}

.flying-form .popup-form .jsn-form-content .control-group .control-label .required,
.jsn-uniform.jsn-master .popup-form .jsn-form-content .control-group .control-label i {
	display: none;
}

.flying-form .popup-form .jsn-form-content .control-group.ui-state-highlight {
	background-color: transparent !important;
	border-color: transparent !important;
}

.flying-form .popup-form .jsn-column-item.jsn-uniform-others textarea.jsn-value-Others {
	width: 255px !important;
	height: 20px;
}

.flying-form .popup-form .form-actions {
	padding: 0;
	padding-top: 10px;
	margin-top: 5px;
	margin-bottom: 5px;
	background: transparent;
}

.flying-form .popup-form .form-actions .btn-toolbar {
	margin-top: 0;
}

.flying-form .popup-form .form-actions .btn-toolbar .jsn-form-submit {
	width: 270px;
	background: #2baaff;
	border: none;
	box-shadow: none;
	text-shadow: none;
	margin-left: 0;
	/*margin: -20px 0 20px 10px;*/
	margin: 0px 0 20px 10px;
	padding: 10px 0;
	font-weight: bold;
}

/* Close Button */
	
.flying-form .popup-form .close-div {
	position: absolute;
	top: -10px;
	left: -10px;
	background-color: #222;
	border-radius: 50px;
	width: 20px;
	height: 20px;
	line-height: 20px;
	text-align: center;
}

.flying-form .popup-form .close-div i {
	color: #eee;
	margin: 0;
}

.flying-form a.close-div {
	display: none;
}

.flying-form:hover a.close-div {
	display: block;
}

JS Dependancies (Joomla / External / 3rd Party)

  • Cookie Support = jquery.cookie.js - You can probably get a newer version of this from the usual sources, but you can click on the filename and download from it from this page. Also this library has been referenced in the HTML (Bottom Content) code below.

HTML (Top Content)

<!-- Top Content -->
<div class="popup-form animated slideInRight">
	<h2 class="popup-title">You expect the next QuantumWarp survey will be about:</h2>

The form will be rendered in-between these code blocks

HTML (Bottom Content)

<!-- Bottom Content -->
	<a href="#" class="close-div"><i class="fa fa-close"></i></a>
</div>

<script src="/images/kb/2016/814/jquery.cookie.js"></script>

<script>
	(function($) {
		$(document).ready(function() {
			//$.cookie('flying-form', '0');
			$(".close-div").click(function() {
				$.cookie('flying-form', '1');
				$(".popup-form").hide();
			});

			$(".flying-form .jsn-form-submit").click(function() {
				$.cookie('flying-form', '1');
				$(".flying-form .jsn-form-content").fadeOut('slow');
				$(".flying-form .form-actions").fadeOut('slow');
				sheet = document.styleSheets[0];
				sheet.insertRule(".flying-form .jsn-form-content, .flying-form .form-actions { display: none !important }", 1);
			});

			if ($.cookie('flying-form') != 1) {
				$(".flying-form").fadeIn('slow');
			}
		});
	})((window.JoomlaShine && JoomlaShine.jQuery) ? JoomlaShine.jQuery : jQuery);
</script>

Notes

  • To configure Uniform for this Flying Form effect
    • Add the CSS code to your custom.css file
    • and the load the jquery.cookie.js into your modules folder (ie images/modules/814/)
    • Create your form as a module, I called my Flying Form
    • Add flying-form as a module suffix
    • Disable the WYSIWYG in both the 'Top Content' and 'Bottom Content' boxes
    • Paste the HTML (Top Content) in to the 'Top Content' box
    • Paste the HTML (Bottom Content) in to the 'Bottom Content' box
    • Select the Stick Leftbottom [stick-leftbottom] position (or selected position)
    • Publish Module
  • To make this code work for anymodule or to slide in other code
    • create a Custom HTML module with flying-form module suffix
    • Just combine the HTML snippets and paste this into the Custom HTML module
    • Paste you new module content inbetween the HTML blocks
    • publish to your select module position
    • Save
  • The close button uses Font Awesome in the HTML and some CSS styling.
    <a href="#" class="close-div"><i class="fa fa-close"></i></a>
  • The cookie storing of the user closing the slider does not seem to work. Code look correct though.
  • Using radio selecter keeps the form short.

 

Published in Packages

This is a great little snippet to add phone numbers into the topbar and when displayed in mobile are centered and on seperate lines so everything looks nice.

Tel: 0800 123 4567 Mobile: 07777 123 456

HTML

<p style="text-align: center;">
	<span style="font-size: 24pt;">
		<span style="display: inline-block; white-space: nowrap; margin-top: 5px;">Tel: 0800 123 4567</span>  <span style="display: inline-block; white-space: nowrap; padding-top: 5px;">Mobile: 07777 123 456</span>
	</span>
</p>

 

Published in Joomlashine
Tuesday, 14 June 2016 16:29

Dehacking a Joomla Website

These are my notes on recovering your hacked Joomla website (de-hack/dehack/dehacking).

The best prevention is to have good reliable backups.

Part 1 - Am I hacked?

If you receive reports from a customer that their website is hacked you need to look at their site from your computer.

Precautions

  • Use a Sacrificial PC (a PC you dont mind wiping if it gets infected)
  • Make sure A-V is running
  • HIPS is on
  • An AD Blocker is running
  • Run your browser in Sandbox mode
  • Malwarebytes Anti-Exploit is running
  • Javascipt is disabled (to start with)
  • Adobe PDF is not installed
  • No Script Plugin is running

What should I do to check?

  • Check the obvious cPanel settings to make sure it is not them causing a website to go off
    • Is the account suspended
    • Over bandwidth quota Account
    • Over disk quota
  • Have a look around with ftp / cPanel before anything else
    • Are there random file names and unusual folders
    • Check the CGI folder and remove anything in there (should I disable CGI)
  • Check the Vulnerability Feed from Joomla
  • Check the homepage to see if it is hacked (optional)
  • Check .htaccess
  • Login to Joomla admin
  • Install RSFirewall and run system check
  • Check Website log files
    • check the raw access logs with ApacheLogViewer (or other log viewer) and check for access to dodgy files and heavy access from 1 IP etc..
    • Also try sorting by request, this will expose dodgy files and their access
    • POST should not be heavily used by remote IP address
    • Add these IPs to the htaccess IP deny rules

Part 2 - First Steps if your site is hacked

  • Disable website by .htaccess (Deny From All)
  • Change cPanel password

Part 3 (opt A) - Recover from backup

This by far is the best way to recover your joomla website.

This will replace all files and your database, so if youor backup is really old or out of date you should consider if this is the best option for you.

  • Back the virus infect website up and store
    • Why do this? This is done just in case you have missed some new content or other thing you have missed. It does not harm and this backup can be deleted later. Download this to your PC before starting.
  • Verify that the Joomla version of the infected website and the backup are the same. If they are not you will need replace the database with that out of the backup and this can lead to content loss if the backup is not new enough. If you do not want to swap the database you cannot use this method.
    • The joomla version number is stored in
      • administrator/manifests/files/joomla.xml
      • /libraries/cms/version/version.php
      • Write down the Joomla version make sure you combine the release+maintenance version to get the correct joomla version?
    • How to find which version of Joomla! I'm using? - Joomla!
  • Delete the files in public_html folder on the server
  • Upload your backup
    • Only the contents of the public_html folder, you should extract these files from the backup and re-zip ready for upload.
    • You can also upload the full backup and after extraction only move the required files into public_html if you know what you are doing
  • Extract backuped files into the public_html folder
  • Replace the database (optional)
    • only do this if the Joomla versions were not the same
  • Empty joomla cache

The site should now be running but it might not be clean, backups can still have issues. Perform the Hack Cleanup to finish.

Part 3 (opt B) - Repair Hacked Site (as is)

If you do not have any backups you will need to repair your Joomla installation using the following procedure. This is not the preferred option.

  • Backup the website
    • Why do this? This is done just in case you have missed some new content or other thing you have missed. It does not harm and this backup can be deleted later. Download this to your PC before starting.
  • Write down the Joomla version
    • The joomla version number is stored in
      • administrator/manifests/files/joomla.xml
      • /libraries/cms/version/version.php
      • Write down the Joomla version make sure you combine the release+maintenance version to get the correct joomla version?
    • How to find which version of Joomla! I'm using? - Joomla!

Full Package Joomla System Files Re-Install

This section should re-enable Joomla but malware might be present in 3rd Party Apps and in random folders all over the place and should not be counted on as fully cleaning your website.

This section will also allow you to get a list of installed extensions and their version numbers. You can get these from your database if you know what you are doing.

  • Download the full installation package for the same Joomla version from github
  • extract the zip file
  • upload all of the extracted Joomla files to the hacked website's public_html folder and replace all files
  • This should allow you to get basic access to your joomla website
  • login into the joomla website and get a list of the installed extensions and their version numbers

You can move to the 'Perfom Hack Cleanup' section if you have time contraints or are happy that the infection is not envasive, this is not recommended. You should carry on with the next section.

Full Fresh Install with 3rd Party Apps brought back in

This is a lot more thourough in cleaning you site but requires a lot more work. This assumes you have followed the section above and have a backup of the infected site and a list of extensions.

  • Delete the files in public_html folder on the server
  • Extract the backup you just made on to your PC (of the infected site)
  • Scan the files in the public_html files for virus and remove them if found.
  • Upload the Full Joomla installation package to the public_html folder on the server
  • carefully check the /images/ folder and once you are happy that it is clean upload this to public_html on the server
  • There might be 3rd party apps that have user files that need uploading (ie in the media folder), unless you know what needs uploading and have check for virus or dogy files DO NOT UPLOAD, you can always do this later. Most user stuff will be in the /images/ folder
  • Download all of the extensions you need and make sure they are the correct version
  • check the  configuration.php from the download infected backup and make sure it is clean from virus or dodgy code and then if all clear upload it to the website server
  • Login to joomla. You migth get some erros but ignore these unless you cannot login (that will need to be dealt seperately)
  • install all of the extensions you have downloaded. this will re-install all of these extensions with fresh files.
  • Check all of the extensions are working correctly (i.e. there are no missing images). If there are missing images check in your infected backup for them, clean the related files and folders and then upload them to the correct location on the server.
  • Check joomla is running normally

The site should now be running but it might not clean yet. Perform the Hack Cleanup to finish.

Part 4 - Post Hack Cleanup

These instructions should be done for all versions of recovery and help prevent getting re-infected and remove any straggling malware or unwanted behaviour.

Users and Passwords

  • Remove any erroneous user accounts. Delete any users that should not be in the Joomla user manager.
  • Change passwords (and prefixes) for the following in order and all of them:
    • cPanel (if not already)
    • MySQL Database
    • MySQL Database Prefix
    • RSFirewall
    • Joomla Users - Reset them all
      • if you have users do a bulk reset once you have changed the admin password
  • Edit configuration.php via cpanel and change MySQL database password
  • Check the administrator folder is protected by .htaccess authentication (Batcode). If it isn't, add this feature
  • Enable 2nd Factor Authentication in Joomla (I have not tried this yet)
  • The potential login procedure would follow
    1. URL with Token
    2. Batcode
    3. RSFirewall
    4. Joomla Login
    5. 2nd Factor Authentication

RSFirewall

If already installed upgrade it if it is not the latest version.

  • Install RSFirewall if not present (with hashes and GeoIP)
    • Upload New Hashes (if not present)
    • Install GeoIP to block by country? (if not present)
  • Configure RSFirewall settings  (as per skeleton notes)
    • Upload Skeleton Config - Which includes:
      • Block all China and Russia
      • Active file scanner
      • Enable admin password protection
      • High and critical emails sent to joomla@example.com
      • Disable Joomla Installer
      • Prevent New Admins from being created
      • convert all emails to images (i have not used this yet)
      • Filter File Uploads
      • Automatic Blacklisting set to 10
      • etc...
  • Scan / System check and follow all recommendations (apart from php.ini)
    • Remove any malware files it finds by keeping the list on screen and then use a ftp browser and remove all infractions
    • Temp Files
      • Empty temp files (except index.html if doing manually)
      • The temp folder should be /home/{account}/tmp-joomla if not already
      • Don’tdelete /home/{account}/publid_html/tmp it will just come back with a system upgrade or get flagged by the RSFirewall as missing.
  • Database Check (PHPMyAdmin and RSFirewall)

Upgrade Joomla and Extensions

Backup again before doing this sections for safety.

  • Re-install/Upgrade all extensions
  • Re-install/Upgrade template (Joomlashine allows you to scan files for modifications)
  • Remove JSecure lite (if present)
  • Install SH404SEF (optional)
  • Upgrade Joomla

Joomla Settings

  • Add captcha to all forms
  • Empty joomla cache
  • Add 5G firewall

Final Operations

  • Empty Temp files again
  • Run RSFirewall System check
  • Create a backup from the live webserver and save it to your PC
  • Extract the public_html (your could do the whole cPanel archive) and scan for virus
  • If the scan(s) come back clear you are done. If any virus is found you need to remove them and upload the cleaned files
  • remove any .htaccess restrictions
  • Delete the root .htaccess and robots.txt files and replace with the Skeleton ones or use the latest Joomla ones from the upgrade
  • Done

Part 5 - cPanel Additional

I use cPanel for hosting so this is what I do but you can easily translate these in to any other hosting platform

  • Set email quotas within the disk quota of the account ie the website + email quota is below the account limit 100mb mail boxes is good.
  • Purge the default mailbox (probably via webmail or ftp)
    • load horde, right click on the inbox and select empty - this will remove all emails
  • Set Default Email address to "Discard the email while your server processes it by SMTP time with an error message."
  • Country restrict the site via .htaccess (in the short term)
  • Enable SPF and DKIM
  • Get the server PHP version upgraded if needed
  • Server AV scan when replacing the .htaccess you must bear in mind multiple domains , if you delte these rewrites this could cause a connection reset error. Restore the htaccess file from the viri website buyt make surte yoou clean it. This might want to be earlier in these instructions

Misc

Password Checklist

When fixing multiple websites you need to record the username and passwords. I use a text file with the following in:

Published in Joomla

This for me is a very important process to know. For my longer articles I mainly create them in office and then copy and then paste them in to my WYSIWYG (JCE Editor). This method allows me to write the articles quicker without fear of time outs and lost content etc.

With putting most of my articles on my website there is no need to keep the word documents as this would get tiresome and could be confusing. There is a downside to this. If you want any of the articles in a word format you no longer have the original and the article has been converted in to a HTML page.

Until now I did not know how to convert the Joomla articles back to Word Documents and i was use to that when I copied the document back from the website and pasted into Word 2010 the results were undesireable and not how I remembered the original word document, the formatting could be loast, the wrong font was being used and the heading references were missing.

I will now show you how to completly restore a Word document from a Joomla article. You should note that this will work with other content such as K2 articles.

 

Different Methods I have tried

  • Pasting into LibreOffice Writer 5.1.3 (Prefered Method)
  • Create HTML file with the HTML from the article WYSIWYG and then open that file with Libre Office
  • Pasting into Word 2010
  • Create a HTM file from the browser and then open with Microsoft Word 2010
  • Conversion Websites

 

Methods and their results:

Pasting into Libre Office Writer 5.1.3 (Prefered Method)

  1. Goto the articles webpage, do not edit the article.
  2. Copy the article's content only, not the menu, statistics, modules etc.... (If you need the title which is not in the content because it is managed by the menu item, type that in later.)
  3. Create a blank LibreOffice Writer document and open it.
  4. Paste (Ctrl+V) the content into LibreOffice Writer
    • Ctrl+V seems to do a paste, 'HTML without comments'.
    • After pasting into LibreOffice Writer there are no weired characters. Layout, lists and headings are maintained but the fonts have been changed to the default LibreOffice style.
  5. Save the file as Word .docx file
  6. Open the file in Word 2010
    • The layout and heading references have been maintained. There are no weired characters but the styling is still the sames as was in LibreOffice.
  7. Select all of the content
  8. Change style to word 2010
  9. Add the main <H1> Title if needed
  10. Save the document
  11. Done

You now have a word version of your HTML article. The headings and formatting is maintained. You can also paste the word document back into a WYSIWYG with no further issues.

Notes

  • I have not tested this method with images but should work.
  • This method seems to remove all weired chracters, possibly has an invisible font substitution for this exact issue.
  • I would guess the results by using the WYSIWYG content (not HTML) will be exactly the same.

 

Create HTML file with the HTML from the article WYSIWYG and then open that file with Libre Office

  1. Edit the article in Joomla
  2. Expose the HTML and copy it
  3. Create a article.html file on your PC's desktop and paste the code into it
  4. Save and close the article.html file
  5. Open the article.html file with LibreOffice Writer
  6. Save the content as a word .docx file (i.e. article.docx)
  7. Open article.docx in Word 2010
  8. Select all of the content
  9. Change style to word 2010
  10. Add the main <H1> Title if needed
  11. Save the document
  12. Done

You now have a word version of your HTML article, there might be a few things you need to sort out but the headings and formatting is maintained. You can also paste the word document back into a WYSIWYG with no further issues.

Notes

  • It is important to only use the HTML of the article.
  • I have not tested this with images, they possibly will fail unless using full http:// paths.
  • When I open up the article.docx file in LibreOffice, some characters appear as weired characters, not a lot. This is due to the characters being non-standard from the original Microsoft Office Word document (i.e look like periods but are not, or those dashes that you get in Word but are the ones Word autocorrect adds). These characters go unnoticed because they render correctly on the webpage (or appear to) but are slightly different characters. When LibreOffice opens the HTML file it substitutes these characters with characters from the ‘SimSun’ font giving rise to what appears to be corruptions but is infact just an unpleasant font substitution. To correct this you can:
    • Makes sure there are no errors in the original word document. It is the auto correct thing that most likely causes this
    • Remove all non standard code in the article (joomla/wysiwyg)
    • Tidy the text up inlibre office before saving
    • Tidy the text up in Microsoft office

 

Pasting into Word 2010

This keeps the formatting from the website but does not correctly attach heading status to the headings even though they are in the nav pane. You can merge the styles which seems to restore the fonts but not the heading.

If you use this method you will have to use the 'Change Style' feature and manually set the headings again. There is also a chance that there will be font settings in the document that will be copied back in to a Joomla rticle should you want to try and use this code back in the joomla article, perhaps after editing it.

 

Create a HTM file from the browser and then open with Microsoft Word 2010

  • Using FireFox I saved the articles webpage as htm and then open with word.
    • This keeps the headings correctly referenced
    • This is messy as it keeps all of the other stuff like the menu and modules.
    • You can then delete the uneeded bits by highlighting and deleting
    • Select all and go to ‘Change Styles’ and select ‘Word 2010’ which makes the headings look normal. The text still stays in the wrong font and size
    • This would cause specified font rules being copied back up to a Joomla article should you want to put the article back into Joomla.

 

Conversion Websites

  • These converters will try and keep the content the same as on the website by setting fonts and sizes rather than maintaining the elements such as converting <h1>, <h2> to a heading elements in Word.
  • So these converters will translate the content fine into the Word equivalent visually but there will be element recognition loss and font substitution.
  • Because of the loss of headings I would have to manually set all the headings again and then use the 'Change Style' feature. Teh results of this will vary from converter to converter.
  • Because I want to create a word document that only uses the default so there is no font settings within the document, this method is not good.

 

General Notes

  • They might be stuff that cannot be translated properly like code highlighting, but these can be sorted out manually as they most likely never existed in a word document anyway

  • Office 2016 - This might be more forgiving for direct pasting of content as it is a lot newer and because HTML and document formats probably have more parity

Published in Joomla
Sunday, 12 June 2016 13:46

Make an Android Microscope

More to come as I do the project.

Viewing Method

  • cast to device
    • screen mirroring (miracast)
    • screen mirroring (chromecast)
    • screen mirroring (TeamViewer/AirDroid/etc..)
  • Other
    • IP webcam (DroidCam)
    • HDMI/MHL output from phone via USB
    • via DLNA (AllCast + AllShare)?
    • TeamViewer
  • Screen share via App
    • AirDroid
    • Windows Phonelink
    • MyPhoneExplorer

Notes

  • Settings --> Connect devices --> Connection preferences --> Cast
    • Still no 3 dots
  • Three-dot menu missing from Cast (#732) · Issues · LineageOS / issues / android · GitLab
    • Google removed "wireless display/Miracast" support in P. This is the method a lot of smartTVs use for direct casting/screen mirroring. Android also fully supports casting via Chromecast/google home type devices and thats why this menu remains in place.
  • Miracast is bi-rectional, where-as Chromecast is one-way i.e. they only do receivers and is a locked down protocol.

Zooming Methods

  • camera zoom
  • adding a lense on
  • using a better phone
  • large TV

my methods makes the phone the microscope, not adding one onto it

Lenses

  • Lense types
    • Macro = for subject close to the lense
    • Micro = microscope stuff (possible Wide + Macro + Fish Eye lens = micro)
    • Telescopic = for subject far away from lense, there is usually a minum distance the subject needs to be (minimum focus distance)
    • Super Macro ?
    • Zoom Lense ?
  • Focusing distance = minimum distance the subject has to be from the lens

Bracket

  • Retort stand (29cm version probably to small)
  • Lazy stand thing (clips onto the desk) – This has the ability to be moved about easily

Software

Different lenses from ebay

Microscope

  • 60x
    • Cheap version (v1)
      • 60 x no adjustable zoom (or possible screm thread) with UV and led light, clips on with a screw thread fitting
  • V2
    • 60 x adjustable zoom with UV and led light, clips on with a screw thread fitting
    • White plastic or one with a smiley face
    • Smiley face one does not have any cushioning on the clamp, this could scratch your phone
    • Bracket version available
  • 100x
    • V1
      • 100x standalone version available (to use with your eye)
      • 100x that fits onto a mobile phone
      • Available with a case for a phone
      • 3 * LR1130 batteries (included)
  • V2
    • Uses 3 x AAA batteries
    • Seems bigger than the other version
    • Maybe heavier
    • Can be used on mobile or standalone

Other notes

Published in Android
Page 24 of 97