Automatic Virtual Machine Activation

One of the news in Hyper-V 2012 R2 is Automatic Virtual Machine Activation (AVMA), which lets you install virtual machines on a properly activated Windows server (running Windows Server 2012 R2 Datacenter) without having to manage product keys for each individual virtual machine. It works even in disconnected Environments. AVMA binds the virtual machine activation to the licensed virtualization server and activates the virtual machine (running Windows Server 2012 R2 Datacenter, Standard or Essential) when it starts. Real-time reporting and tracking data is available on the virtualization server.

AVMA is easy to implement, use one of the following AVMA keys when installing a new virtual machine in Hyper-V:

Edition AVMA key
Datacenter Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW
Standard DBGBW-NPF86-BJVTX-K3WKJ-MTB6V
Essentials K2XGM-NMBT3-2R6Q8-WF2FK-P36R2

More information is available on Technet: http://technet.microsoft.com/en-us/library/dn303421.aspx

Advertisements

Check Database Size

There is a standard SQL report that shows how much space a database is using. In SQL Server Management Studio for SQL Server 2008 R2 and newer, right-click on the database you are interested in and select Reports->Standard Reports->Disk Usage.

There is a good description of this report, including information about how to resize a Operations Manager database in the SCOMfaq.ch blog: http://blog.scomfaq.ch/2012/06/26/scom-check-size-of-databases-sql-standard-reports/

Use Windows 7 as Wireless Access Point

The fiberconverter for our Internet connection broke this weekend and I had to provide Internet access for the rest of my family until the converter was repaired. What to do?

My Windows 7 laptop has an internal 3G modem, maybe I could share that?

I found the following description that was very useful:
https://blogs.ncl.ac.uk/isg/?p=437

Following the description I created a temporary Wireless Access Point as described in the following steps:

  1. I started an elevated command prompt.
  2. Then I executed the following command to configure the new wireless network:
    netsh wlan set hostednetwork mode=allow ssid=temp key=mysecretkey
  3. I opened up the “Network and connection sharing center” and clicked on “change settings for network adapters”.
  4. Then I looked for the Wireless Networkconnection with the highest number and that was configured with the Microsoft Virtual WiFi Miniport Adapter. In my case that network connection was called Wireless Network Connection 3.
  5. I renamed the connection to WLAN Hotspot and deselected all objects except Internet Protocol Version 4 (TCP/IPv4).
  6. When the Wireless connection was renamed I opened up properties for the 3G connection.
  7. On the Sharing tab I selected “Allow other network users to connect through this computer’s Internet connection”, in the “Home networking connection” textbox I entered “WLAN hotspot”.
  8. To start the hotspot I executed the following command in the already open command prompt:
    netsh wlan start hostednetwork

To remove the settings and cleanup the configuration, just do as follows:

  1. Stop the hotspot by executing the following in an alevated command prompt:
    netsh wlan stop hostednetwork
  2. Go to the “Network and connection sharing center” and click on “change settings for network adapters”.
  3. Right-click on the 3G connection and select properties.
  4. On the “sharing” tab, deselect the checkbox next to “Allow other network users to connect through this computer’s Internet connection” and click OK.
  5. Finally execute the following command in an elevated command prompt:
    netsh wlan set hostednetwork mode=disallow

How to install pfSense 2.0.2 on Hyper-V (Windows Server 2012)

When you are installing pfSense on Hyper-V there are some things to consider:

  • Use Legacy Network Adapters.
  • You need to reset all network adapters in pfSense every time the system boots.
  • If running on AMD CPU you must set hw.clflush_disable=1 att boot-time.
  • pfSense 2.0.x on Hyper-V is not recommended for production environments and should only be used for lab or test purposes.

The following steps is a description of how to install pfSense on Hyper-V in a successful way:

  1. Download pfSense-LiveCD-2.0.2-RELEASE-amd64.iso.gz from one of the pfSense mirrors at http://www.pfsense.org/mirror.php?section=downloadsVerify
  2. Verify the file hash of the downloaded file using your favourite hashing tool (Personally I like HashTab which is freely available for personal use at http://implbits.com/HashTab.aspx).
  3. Extract the ISO-file from the downloaded tarball using a file archiver of your choice (I like 7-Zip which is an open source file archiver. It is available at http://www.7-zip.org/).
  4. Create a Hyper-V VM with two Legacy Network Adapters and remove any network adapter already present. The VM should have a small IDE harddrive (typically 1GB) and at least 128MB of RAM.
  5. Boot the VM on the ISO-file. If you are using a AMD CPU in your windows host you must set the boot parameter hw.clflush_disable=1 at boot time. To do that press 7 at the boot menu and enter the following commands (also shown in the following picture):
    OK set hw.clflush_disable=1
    OK boot
    set hw.clflush_disable=1
  6. Select the option to install pfSense otherwise you wil just boot the LiveCD.
    Select the Install option
  7. Change video font, screenmap and keymap appropriate to your video monitor, keyboard and language. Then select “Accept these Settings”.
    Accept these Settings
  8. Select Quick/Easy install to use the first hard disk and “automatically” install pfSense.
    Quick/Easy Install
  9. Confirm by pressing OK.
    Confirm
  10. Select to install a standard kernel.
    Standard kernel
  11. When the installation is finished, choose to reboot the VM, power it off and eject the ISO.
    Reboot
  12. Start the VM again (remember to set the parameter hw.clflush_disable=1 at boot-time if using a AMD CPU).
  13. Configure VLANs if appropriate for your environment.
    Configure VLANs
  14. Assign interfaces as appropriate for your configuration, confirm by pressing y and enter.
    Assig interfaces.
  15. Enter option 8 to get to the shell.
    Shell
  16. Create simple script that resets all your network adapters at boot by entering the following commands (add more interfaces depending on your configuration and start dhclient on all interfaces that should receive IP-configuration dnyamically):
    # touch /etc/rc.local
    # touch /etc/rc.local.running
    # chmod 755 /etc/rc.local
    # echo “ifconfig de0 down” >> /etc/rc.local
    # echo “ifconfig de0 up” >> /etc/rc.local
    # echo “ifconfig de1 down” >> /etc/rc.local
    # echo “ifconfig de1 up” >> /etc/rc.local
    # echo “dhclient de0” >> /etc/rc.local
    Script
  17. If using an AMD CPU, enter the following command to permanently set the parameter hw.clflush_disable=1 at boot time:
    # echo “hw.clflush_disable=1” >> /boot/loader.conf.local
  18. Reboot to test your configuration.
    # reboot

Reference: http://forum.pfsense.org/index.php?topic=44568.0