2016-07-09

The (default) generated homestead VM does not have an IPv4 address and how to fix this

When I first went on installing a Homestead VM, it did not get an IPv4 address. And there was nothing that indicated a failure:

  • neither when the VM is booting (no errors, all appears "OK")
  • using the "ifconfig" command, we can see that our adapters do not have an IPv4 address (whereas we were expecting 192.168.10.10 to be used)
  • the “lspci” command allows us to see what devices are used. We can see the Ethernet controllers there.

tl;dr

I have written a much longer article about the analysis of the problem and all the possibilities offered by Virtual Box in terms of virtual ethernet adapters, and how to configure the Vagrant NIC Types, and you can read it here:


But a long story short:

Finally


Configuring the adapter type through the Vagrant file did not work as it created a third adapter and was ineffective.


But changing manually the NIC adapters in the VirtualBox VM setting and using Paravirtualized network adapter (virtio-net) finally gave the best results












2016-07-07

A word about false-positive and false-negative test-results, and why having a 'negative test-result' means 'passing the test'



Both “false-positive” and “false-negative” test-results exist.


1/ Positive and Negative tests-results


First, notice that the usual phrasing is “one is taking a test”, or “one is being tested for something”. One is “positive” for anomalies just like one is “positive” for alcohol, narcotics, drugs, disease, pregnancy, driving speed limit or amounts of goods at the customs: ie. typically some output values are above or below average. In everyday life, tests usually measure the concentration of a given chemical compound, or goods, or speeds; it’s the same for software: except that instead of chemical compounds or goods, we have file system objects, and we also have durations, speeds, loads, etc.



So, when software is taking a test, software is tested “for” regressions. Just like a chemical-test might reveal the presence of a molecule in your blood, a regression-test might reveal some incoherent or wrong behavior coming from the system-under-test. Therefore a “positive” test-result is a test-result that causes the test to appears, in first instance, and without further investigation, as “failed”.

By symmetry, a “negative” test-result is a result that did not detect any anomalies; the test is then usually considered as “passed”.


2/ False test-results


A “false-positive” test is a test that first appeared as “failed” but was later proven to be insignificant (eg. just like you would be first tested positive for something after saliva, or urine test, and later dismissed upon running more precise, blood tests).

Finally, “false-negative” tests are much more rare in practice: those are tests that did not catch an anomaly but should have. One can tell a test is a false-negative whenever one finds a problem that was not reported in the test covering the use-case.


In a nutshell:


Positive test-result = Anomaly detected = Failed test
Negative test-result = No anomaly detected = Passed test
False-positive test-result = Anomaly detected but no problem found after further investigation.
False-negative test-result = No anomaly detected and yet there was a bug.



2016-02-12

Print system information on top of your desktop background upon startup using BGInfo.exe (Sysinternals)



Executable with custom template:




https://onedrive.live.com/redir?resid=C213C8B09441DCD7!48680&authkey=!AEUBtQwOZXCSUto&ithint=file%2czip

Drop the the ".exe" and the ".bgi" files in C:\Windows, and schedule task to run at user logon :



    Bginfo.exe BGInfoConf-v160205.1.bgi /nolicprompt /timer:0



Default template:







My template:




Scheduled:




2016-02-11

RDP as a different user to Localhost on Windows 7

Concurrent sessions is a feature in server editions of Windows that lets more than one user to log on remotely and use the server at the same time. By default in desktop editions when you connect to a remote computer using Remote Desktop it will force the user who is physically sat at the computer to log off. So how to work around this?

In two steps:


  • Crack termsrv.dll, remove the Concurrent Remote Desktop sessions limit, allow multi-user login in XP/Vista at the same time.
  • Connect RDC to IP address 127.0.0.2





REFERENCES:

Original patcher:
TCP-Z, Best TCP/IP Patch: Universal Termsrv.dll Patch V1.0b Build 20090425 Release
http://deepxw.blogspot.fr/2009/04/universal-termsrvdll-patch.html

Article commenting on the patcher:
Enable Concurrent Sessions on Windows 7, Windows Vista and Windows XP (Termsrv.dll)
http://digiex.net/guides-reviews/guides-tutorials/windows-guides/1879-enable-concurrent-sessions-windows-7-windows-vista-windows-xp-termsrv-dll.html

Cached version of the patcher executable:
UniversalTermsrvPatch_20090425.zip (Location 4) (Click to download)
https://onedrive.live.com/redir?resid=C213C8B09441DCD7!48685&authkey=!AAdHghvpV7PZ0oM&ithint=file%2czip

Connect Remote Desktop Protocol (RDP) Client To Localhost
(see "Method 1: Connect RDC to IP address 127.0.0.2")
http://www.techbuzz.in/connect-remote-desktop-protocol-rdp-client-to-localhost.php


FURTHER READING:

TCP-Z, Best TCP/IP Patch: Say Bye To Half-open TCP Connections Limit In Vista/2008 SP2
http://deepxw.blogspot.fr/2009/05/say-bye-to-half-open-tcp-connections.html

2016-02-10

Redirect terminal service to console (ie. Disconnect RDP and leave computer unlocked)

Usually, when you close your RDP connection the remote computer locks the computer and therefore restricts access and use of your Desktop (COMPUTER LOCKED).

The solution is either :

1/ use VNC instead of RDP

2/ or run "@tscon.exe 1 /dest:console" to transfer your session from RDP to CONSOLE, this will "virtually" kick you out, but it will leave your user session open and your Desktop active on the remote computer.

WARNING: By definition, this solution (2/) is unlikely to work for multiple remote desktop sessions on a single computer at the same time, there can be only one console session and it is already in use.


C:\Users\Administrator2>tscon 2 /dest:console
Could not connect sessionID 2 to sessionname console, Error code 7045
Error [7045]:The requested session access is denied.