blog.plee.me About software, technology and random things

3Apr/220

(Re)Setting Hyper-V Virtual Machine Client Zoom Level

Hi!

A couple of days ago I was playing around with Hyper-V virtual machines. At some point I set the "View" => "Zoom Level" to 25%.

Unfortunately, at 25% the window becomes so small that you cannot see the View menu in the menu bar any more because it gets cut off. And for some reason you cannot use the arrow keys on the keyboard to navigate the menus either.

This zoom level not only applies for a single virtual machine, but all of them, as it as a general Hyper-V client setting.

Trying to access the menu when the VM is shut down does not work because the "Zoom Level" submenu is disabled, and once the VM is booted up, the window resizes instantly.

The only reliable way to (re)set it appears to be editing the Hyper-V client configuration on the host file system:

  1. Close the Hyper-V client window (the one that opens when you connect to / double-click a VM)
  2. Open the file at %UserProfile%\AppData\Roaming\Microsoft\Windows\Hyper-V\Client\1.0\vmconnect.config and set the setting with ZoomLevel back to 100 (or something similarly usable):
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <Microsoft.Virtualization.Client.InteractiveSession.InteractiveSessionConfigurationOptions>
    <setting name="ZoomLevel" type="System.UInt32">
    <value>100</value>
    </setting>
    [...]
    </Microsoft.Virtualization.Client.InteractiveSession.InteractiveSessionConfigurationOptions>
    </configuration>
  3. Save and close the file
  4. Connect to / double-click a VM again

I hope this was helpful to you.

Thanks for reading!

Source: How to restore auto zoom level in Hyper-V VM window (answers.microsoft.com) - Answer by Trond.R. on November 27, 2020 (Sorry, apparently you can't link to answers directly)

29Apr/100

Internet Connection Reset on the Speedport W 722V (Type B)

Hi!

Since I've recently found out that my new router, the T-Home Speedport W 722V Type B, apparently does not support automatic disconnecting at a specific time (in order to circumvent the 24-hour connectionreset by my ISP), I took a route that my good friend Pool has been using for quite some time.

It is a batch script, so in order to use it, you have to be able to execute it.

On a side note, the Type A model of this router does support automatic disconnecting! Make sure you choose "Other provider" when you're in the internet configuration menu in order to be able to see the setting for that. The "T-Online" option sadly does not show it.

What you need:

  • A Windows machine that is running at the given time (has to execute the script)
  • cURL for Windows, preferably the win32-ssl-sspi version (download page). win32-ssl should be fine as well.
  • Configure a scheduled task for the script, which is not covered in this guide (but quite simple. Just make it execute the script.)

The batch script:

REM Speedport W 722V Type B Internet Reset Script v1.0 - 2010-04-29
REM Written by pl (plee.me)
REM
REM Works with the T-Home Speedport W 722V Type B home router.

REM START CONFIGURATION
REM Adjust these variables to your own ones!
SET PWD=12345678
SET COOKIEFILE="routercookies.txt"
REM END OF CONFIGURATION

@echo off
curl -k https://speedport.ip/cgi-bin/login.cgi -d "pws=%PWD%" -e "https://speedport.ip/hcti_start_passwort.stm" -c "%COOKIEFILE%"
curl -k https://speedport.ip/cgi-bin/status_startseite.cgi -d "connect=0&disconnect=1&block=0&nonblock=0&abc=0" -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%"
curl -k https://speedport.ip/cgi-bin/status_startseite.cgi -d "connect=1&disconnect=0&block=0&nonblock=0&abc=0" -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%"
curl -k https://speedport.ip/cgi-bin/logoutall.cgi -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%"
del "%COOKIEFILE%"

What this script does:

It logs on the web administration interface, uses a hidden option to disconnect the internet connection, then uses a hidden option to connect, and finally logs out again.

Because the cookie is cached in a text file, it is deleted at the end of the script.

Additional information:

The lines beginning with REM are comments, so you might as well leave them out.

If you run the script, make sure that you either have the cURL directory in the PATH environment variable, or that you set its folder as the working directory, so that it can find the curl.exe and actually execute the (central) steps of the script.

I'm sure that this script can be optimized (probably a lot), but for now, it's doing the job.

I hope that was of any help to you, and thanks for reading! 🙂

   
%d bloggers like this: