Microsoft Hyper-V: “msvm_virtualsystemsettingdata Object was not found” Error

Today I installed Windows Server 2008 with Hyper-V, to run a few test VMs on.

When installing Hyper-V, it warned me that it was a pre-release version, and that it needed an update.  I did a Windows Update, to get all of the other updates, but it didn’t seem to upgrade Hyper-V.

I didn’t install the Hyper-V update to start with, but when I tried to create any virtual machine, it errored with: “msvm_virtualsystemsettingdata object was not found“.  It could also not create any virtual networks.

The fix for this was to install the final update for Hyper-V, to bring it up to a production-safe release.  You can download the update here:  http://support.microsoft.com/kb/950050.  Please read all of the notes on kb950050 before installing it onto your server, though!

So, if you’re having trouble with Hyper-V, maybe you’re on pre-release code, too!

Viewing Another Users’ Crontab Entries in Ubuntu, Debian or CentOS

There may be occasions where you, as the administrator of a machine, may want to see what cron entries your users have.  Maybe you have slow downs at a particular time every day, and want to see who’s running what.

All crontab’s, for all users, are stored in /var/spool/cron/crontabs on Debian and Ubuntu, as plain text files.   So, as root, you will be able to cat any of the files in there – they are stored as the username, so:

/var/spool/cron/crontabs/daz

… would be a user called “daz” for example.

In CentOS, the path is slightly different – there is no crontabs directory, so it’s simply:

/var/spool/cron/

You can also find out an individual users’ crontab by issuing (as root);

crontab -l -u username

This will show you that users crontab.  Of course, if you want to edit it, you can by doing:

crontab -e -u username


Removing System Icons (Clock, etc) from the Windows 7 Taskbar

There are some icons which aren’t classed as notifications, you may want to remove from the Windows 7 task bar.

Items like the clock, volume, network, and power icons are all classed as system icons, and not part of the normal “Desktop Notifications” settings (where you would find icons for Live Messenger, Outlook, etc).

If you do want to add or remove certain system tray notification icons, you can do this by:

Control Panel -> Notification Area Icons -> Turn system icons on or off (at the bottom of the window, in blue text)

You’ll then be able to modify what gets shown there on the taskbar.

How to Install the Telnet Client in Windows 7

Telnet is missing from the default install of Windows 7, as it was in Windows Vista.  The process, though, to install it is exactly the same as before:

Start by opening Control Panel and then go to Programs and Features

Then once open, down the left-hand side, you’ll see an option Turn Windows Features on or off – go into that.

Install the Telnet Client in Windows 7
Install the Telnet Client in Windows 7

Then scroll down in the list and check the box next to “Telnet Client” and click OK. Windows will then install telnet, and you’ll be able to run it from a command prompt as normal.

You could, of course, download PuTTY and use that instead of the Windows version of telnet, and benefit from a wide range of additional features.

How do you “Show Desktop” in Windows 7?

With no Quick Launch bar enabled by default, how do you show the desktop in Windows 7?

Well, there are two ways – one using the mouse, and one using a keyboard shortcut.

The Windows Shortcut is “Windows Key + D” – so if you press those two, then you’ll get to see the desktop.

The other way, is using the Taskbar button.  This has now moved, but you’ll see it at the far right of the bar:

Show Desktop Button on the Windows 7 Taskbar
Show Desktop Button on the Windows 7 Taskbar

There are two ways to use this button – one is the usual way of clicking it, and all windows will minimise.  The other way, is if you simply hover over the button, and you’ll see the desktop – if you move the mouse away, all of the windows will return.  This is called “Peek at desktop”, incase you just want to see the desktop but not actually minimise any applications.  You can also “Peek at desktop” using the keyboard shortcut above, by simply pressing “Windows Key + D” again, straight after you’ve minimised them all.

Burning/Writing an ISO Image Under Windows 7

Finally, Microsoft have incorporated ISO Image burning/writing to disc in Windows 7!

It’s also very easy to do.

On any .iso image you have, you can now right click on it and go to:  Burn disc image.

You’ll then get a simple screen where you can select the burner, whether you want to run a verify afterwards, and that’s it!

Burn ISO Image Under Windows 7
Burn ISO Image Under Windows 7

If you want to mount the image without burning, then please check out:  http://droptips.com/mount-an-iso-image-under-windows-7

Using SCP Aliases to Upload Files Quicker (OS X, BASH)

If like me, you have a particular path on a server you always upload files to, via SCP, then you’ll probably want a better way than typing the full path into the scp command everytime you upload a file!

This command has been tested on OS X, but there’s no reason it wouldn’t work on a Linux or BSD machine running BASH, either.

I personally have a “stuff” directory on a web server, where I put random files to share with people, but it’s path is pretty long on the remote web server, and I have to type it everytime I run the scp command – not quick or great!

There’s a way around it, though, by using bash aliases.  By editing the ~/.bash_profile file (.bash_profile in your home directory), we can alias common scp commands.

So, for example, if I have a file called screenshot.png and I want it to go to /var/www/stuff on a remote server called server.example.com, I would normally have to do:

scp screenshot.png server.example.com:/var/www/stuff

This can get boring quick, especially if you do it a lot during the day.  We can, however, alias this to a command called whatever we want (take care though not to use an alias of an already existing command/application!)  So, if I wanted just a command of “scpstuff” I could do that by editing the ~/.bash_profile file by adding:

alias scpstuff="scp $1 server.example.com:/var/www/stuff"

You will need to close the terminal and reopen it for the alias to take affect, after saving the file.

What this will do is, take the first argument to “scpstuff” (represented by $1), and run the command with it in, so, to upload something to the /var/www/stuff directory on server.example.com, all I would need to do now is:

scpstuff screenshot.png

You will be prompted for your SSH password as normal (unless you use SSH keys) but it’s much quicker than typing the whole line out each time!

Of course, you could set up lots of aliases, such as scpstuff, scpimage, scpscreenshot – anything you do a lot would be useful!

SSH Client: Saving Server Configuration (Alias, Port, Username)

There may be occasions where you want to connect to a host with a long host name, for example ssh servername.example.com – now it’s not massive, but it’s not as quick as ssh servername

If you’ve been following droptips.com, you’ll have noticed my other post about setting the port number in the SSH config file (~/.ssh/config for individual users) – you can also use this config file to connect to shortened hostnames (aliases).

So, if you want to be able to ssh into servername.example.com but just doing ssh servername, you would add the following to the ~/.ssh/config file:

Host servername
  HostName servername.example.com

Now that’s great if you login to your local machine with the same username as the remote server, but what if it isn’t?  You’d have to do ssh remoteusername@servername but we can also get around this by adding User username to the host section:

Host servername
  HostName servername.example.com
  User remoteusername

You can also tie this into having the port number as per my other post like so:

Host servername
  HostName servername.example.com
  User remoteusername
  Port 1234

Once you’ve done this, whatever you put on the Host line, will work by just doing the following with whatever options the configuration file says:

ssh host

Hopefully this will allow you to speed up connecting to servers you connect to a lot!

SSH Client: Automatically Connect to a Servers’ Non-Standard Port

If you run an SSH server, or many SSH servers, then you may have set the SSH daemon to run on a non-standard port. SSH normally listens on port 22, but with the large amount of script/bot attacks now on this port, attempting random logins, changing it to something different is a quick way to stop the majority of these automated attacks.  I’ve detailed this in another post here.

Once you’ve done this, though, you probably get bored with having to specify the port every time you connect by typing ssh -p 1234 hostname or scp -P 1234 hostname (where 1234 is the port SSH is running on hostname) – I know I do!

You can get around this problem, by using the ~/.ssh/config file (config in the .ssh directory in your home directory).

You can add multiple hosts to this file, along with their port, so you can simply ssh hostname and it’ll connect  using whatever port is set in that file.

The entry you need to add is:

Host host.example.org
  Port 1234

Where host.example.org is the hostname you SSH too (if you SSH to an IP address, then this will need to be set here) and Port 1234 is the port number SSH is running on hostname.

Once this is done, you’ll be able to:

ssh host.example.org

… and it’ll know that you need to connect on the port set in the file.

You can add multiple hosts to this file, if you access multiple SSH servers:

Host host.example.org
  Port 1234
Host host2.example.com
  Port 4567

Give it a try – it’s certainly saved me some time!

You may also want to checkout another post on droptips.com with further options for the ~/.ssh/config file:  http://droptips.com/ssh-client-saving-server-configuration-alias-port-username