Social Icons

twitter google plus linkedin rss feed

Pages

23.10.14

Surface 3 WiFi and Hyper V


Looks like something is not fully compatible between the surface and the Hyper V.

And if you have installed the latest Visual Studio you have probably noticed that it takes longer than usual for the Wi-Fi to connect let alone that you don't have the sleep mode anymore.

In order to workaround this issue I have created a couple of shortcuts in the desktop, one for turning off Hyper V and one for turning it back on when you really need it.

Pretty simple stuff:
Right click on your desktop and select New > Shortcut
You'll see the window for selecting the program to which the shortcut is going to be pointing at.
Right after that we will find bcdedit.exe in the system32 folder.


 

 And finally we will name the shortcut something meaningful.

Now the tricky part. We will right click on the newly created shortcut and select properties.


For the HyperV On shortcut you'll need this text I the Target box:
C:\Windows\System32\bcdedit.exe /set hypervisorlaunchtype auto
For the HyperV Off you'll need this:
C:\Windows\System32\bcdedit.exe /set hypervisorlaunchtype off
After that click on the Advanced properties and select Run as administrator.



And finally select a nice icon for the shortcut


Remember to do the HyperV On and the HyperV Off icons.


And finally remember that after you execute these shortcuts, in order for the change to take effect you'll have to restart the computer.

No comments:

Post a Comment

27.8.14

Cannot access my Azure VM (And how I solved it)

Cannot access my Azure VM (And how I solved it) I was creating a new firewall rule in one of my azure VMs and I went a tad greedy when it came to blocking IPs... I blocked ALL the traffic.

What to do?

  • My first thought was to download the VM, make the change locally and upload it again... but it's 250GB.
  • I tried changing the firewall rule through powershell from the azure subscription but Get-AzureWinRMUri was not working.
  • Finally after asking a friend who asked a friend of his I was told it was possible to edit the registry of a windows OS disk form a different windows. Wow! That was the answer!


And, in fact, once I knew it could be done I found a detailed post about how to do it.

So I deleted my beloved VM, attached the VHD to another VM and from the registry I deleted the firewall rule that was blocking all the traffic.

Then I detached the VHD and created a new VM with it and ¡listo! we had the VM up and running and accessible.

No comments:

Post a Comment

29.7.14

Azure VM Snapshots Even Simpler

I have been thinking about taking and restoring snapshots of my Azure Virtual Machines for a while but never had the time to do it... until today.

It is extremely easy when you know how to do it but it could be a bit daunting when you have to start from scratch and as I have to write a post explaining it and it was about time for me to write another post in my blog I thought it could be a good idea to do it here.

From the beginning:
Luckily by now you will have it working.

Now the real thing. Chris Clayton has created a set of scripts that work wonderfully for managing Azure VM Screenshots and that is what I am using right now. If you are too lazy to go to the page and find the link you can get the scripts from here.
The only thing you need to configure is the Subscriptions.csv file. It's a CSV file so in the first line you have the column names and in the rest of them you have the data. It looks like this:
SubscriptionName,SubscriptionId,CertificateThumbprint
"IT","XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
This file will make the executing the commands easier as it has all the information about the subscription(s) that you are going to use. Yes, cool but... where to I get the data? look.

First, to get all the information we need about our subscription in PowerShell we can run:
Get-AzureSubscription
That will give us a screen like this one:
 Those are the parameters you need to fill in. Simple stuff.

Finally in order to run the commands you will have to provide data about which subscription to use and inside it which virtual machine. Simple stuff, we get the list of virtual machines we have in our subscription executing Get-AzureVM and we will get a screen like this one:


Now we have all the parameters we need. Just for testing it we will launch the script for getting the list of snapshots in a virtual machine.


./GetSnapshotList.ps1 -subscriptionName "NameOfTheSubscription" -cloudServiceName "ServiceName" -virtualMachineName "Name" -maximumDays 15
Where:
  • -subscriptionName is the SubscriptionName you got from Get-AzureSubscription and then wrote in Subscriptions.csv
  • -cloudServiceName is the ServiceName column you can see at Get-AzureVM
  • -virtualMachineName is the Name column you can see at Get-AzureVM

And that's it.

Things to remember:
  • The VM should be shut down before taking the snapshot (there's a handy parameter for that in the PowerShell command)
  • The data in your "Temporary Storage" drives will not be backed up or restored because they are temporary. Yes I knew it was going to work that way but I had to try.

As a test I took a snapshot of one of my SharePoint development machines, made some changes, restored it and so how the changes were reverted, just as expected. And I would even say faster than I expected.

No comments:

Post a Comment