How to convert a VM from VirtualBox to KVM

Converting the virtual machine images is very easy, but many guides suggest you to convert  from VDI to RAW and then from RAW to QCOW2. It doesn’t really make sense, you’ll waste double the time, and it’s gonna be hours if the drive is big.

To convert from VDI to QCOW2 just use qemu-img:

qemu-img convert -f vdi -O qcow2 [VBOX-IMAGE.vdi] [KVM-IMAGE.qcow2]

If the virtual machine was Windows-based, probably will crash at first boot, because of the virtual hardware changes, and because there are no virtio drivers installed (unless you make a VM with IDE emulation)

For fix the BSOD at boot you can do onf of this:

Personally I chose the first option, but then I had to install again hundreds and hundreds of security updates, it would have been better if I installed the patch before migrating.

Update: I noticed that the converted Windows XP VM uses the cpu at 100% even when idle. This is a nasty bug that would take ages to fix. I tried to force enabling ACPI, but all I can get is a BSOD on boot. I’ll just scratch the VM and rebuild it…

Is it worth to keep a PC case open?

I got a new server for Dandandin and I kept it open from all sides while I was doing tests. Average disk temperature 23 ° C. When I saw that was stable, I closed, placing fans on the front and on the back, to have a positive airflow. Disk temperature lowered a couple of degrees, and the disk has much more activity than last week!

caso-chiusoSo, even if it might seem that an open case will have “more airflow”, you will have a better airflow with a closed case.

update: looks like smartctl is not reporting accurately the hdd temperature. I need to do more tests with hddtemp.

How to do a quick CPU benchmark on Linux

With Enki (a Brain Training app for coders – if you want to try iy, and you need an invite, you can my code: MAGNE985) I found a quick benchmark to for Linux, to see the speed of a CPU core.
dd if=/dev/zero bs=1M count=1024 | md5sum
This line tells the CPU to calculate an md5 hash for an 1gb of “zeroes” and measure how long it takes. For example, on the Pentium G3420 that I have in my office I get this:
dd if=/dev/zero bs=1M count=1024 | md5sum
1073741824 byte (1,1 GB) copiati, 2,10036 s, 511 MB/s dd if=/dev/zero bs=10M count=2048 | md5sum
21474836480 byte (21 GB) copiati, 49,0278 s, 438 MB/s
while on an Intel Xeon W3520 (my web server) I get this:
dd if=/dev/zero bs=1M count=1024 | md5sum
1073741824 bytes (1.1 GB) copied, 2.79137 s, 385 MB/s

dd if=/dev/zero bs=10M count=2048 | md5sum
21474836480 bytes (21 GB) copied, 56.9042 s, 377 MB/s
Hey! It takes 10 seconds more! What? An expensive Xeon is slower than a cheaper Pentium????
Yes, the server is outdated, but I did not expect to have such a difference! It is time to change my web server!
confronto-xeon

My brief adventure with m.2 SSDs

Some time ago I bought a motherboard with an m2 SSD connector. I only noticed this connector after purchasing it, so I did not bought a suitable drive, I just used a regular SSD.

Then I read a review, a comparison between a SATA 3 SSD and an NVMe SSD. Astonishing performances, up to 4 times faster! Whoa!

The review mentioned the Samsung 950 Pro but it has a problem for me: it’s 3 times more expensive than a regular SSD!

I found the Crucial MX300 m.2, for just 15 euro more than a regular SATA SSD. Yes! I Bought it immediately!
The installation was easy, just open the case, insert it into the slot and tighten the locking screw.

Windows starts but… I can’t see the drive anywhere! Where is it?
I go into the BIOS settings (ok, EFI) and it’s not shown! Did I install it wrongly? I take it apart and I install it again, but… nothing!

What happened? I assumed that m.2 (the form factor), also meant NVMe (the data protocol), but it’s not . The Crucial MX300 is an m2 SSD m.2 SATA, so it (should) seen by the system as SATA!
In my board it’s not compatible, so I have to return it.

Next time: if you want to buy an m.2 SSD, check that’s it’s NVMe, otherwise, at least in a desktop PC, it’s better to buy a regular drive.

Pokémon GO: my adventure ends here

pokemon go no rootI opened Pokémon GO for my evening stroll and … game over!

They blocked the game on any rooted phone!

On Android, root is a must have, so I won’t remove it just to play a games that eats batteries like cakes! (One day I’ll write “10 reasons to get our phone rooted”)

It’s like as the ban on clippers on airplanes: totally useless!

If they wanted to ban cheaters: they’ll continue to cheat, with Magisk, Tasker and Xposed, they can continue to use the fake GPS, move around using a joystick instead of waking, catch chance calculators, and so on.

If they wanted to ban map scanners: they are using a program written for it, so they’ll just use the old API or pretend to be an iPhone.

I could continue to play it by setting Tasker to disable root via Magisk Manager as soon as the game is run, but is it worth?

Well, I removed the game and left an one star review, my battery thanks me 😂

Adobe sends invoices that are looking like spam

Unfortunately, needing it for work, I had to buy rent Photoshop CC.

After a few days I get the invoice by email:

adobe

Nlar? Who’s that? I almost pressed on “report spam”, when I see that’s an Adobe invoice. I open the email:

adobe2

??? What the…?? They send an invoice (very important, because otherwise I can’t deduct the 19% VAT from it), like this, in an empty email, without a “thanks for giving us money, even if you hate us“???

If I didn’t remember to have bought rented it, I would have definitely deleted the invoice, since they sent it 3 days after the subscription!

UCBrowser is now banned

Today I went to see my access log report (even if I don’t use Google Analytics, I still have complete access to server logs, and I analyze anomalous patterns) and I found this:

ucbrowser

??? Nobody uses UC Browser outside China!

I go to see visitor log:

ucbrowser2

What happends, suddenly the Naruto karaoke become popular in China? I read more details:

ucbrowser3(Green: IP addresses, pink: device; yellow: browser)

The IP addresses in the log file aren’t the actual ones, they’re from CloudFlare, a proxy between this site and the Internet. The real addresses are for example 14.152.64.xxx (Shenzhen), 123.150.183.xxx (Tianjin), 58.215.183.xxx (Jiangsu).

What can be the odds? Either there are thousands of chinese with a Samsung Galaxy Note 2 interested in Naruto karaoke (but they close the page before reading it), either UCweb is doing a “micro-DDOS” to my server, they need to get that specific page (only that page!!!) every few minutes. They’re not identificating themselves as a bot like Google, Bing and the rest of the world is doing, but they pretend to be a Samsung Galaxy Note 2

I hate this abusive behaviour, so I will redirect every visit from a Samsung Galaxy Note 2 with UCBrowser, to ucweb.com

Update 9 september: I thought that banning only Galaxy Note 2 with UC Browser (meaning: only bots) was enough, but they just updated their bot. Ok, so, ANYONE using UC Browser is now banned 😡💢

ucbrowser-basta

Tokyo 2020

Did you see the Tokyo 2020 teaser intro?

It was awesome! There’s captian Tsubasa, Doraemon, Pac-man and in the end the Japan prime ministry becomes Super Mario, jumps in a pipe and arrives in Rio!

You didn’t see it live?

Oh, bad luck! Unfortunately the olympic committee doesn’t allow distribution, takes down every mirror on YouTube… I don’t understand… you should be happy that your teaser is so great that has become a viral video, giving you free advertisement!! What’s the purpose in spending thousands of dollars to make a teaser, then forbid everyone to watch it?

I don’t understand this, like their war to the GIF videos on Twitter.

Screenshot_20160822-224630