The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

Posts Tagged ‘Hyper-V’

Nice to know: optimize-vhd in Windows Server 2012

Posted by Mikael Nystrom on August 2, 2012

I needed to compress a bunch of VHD’s and of course that means PowerShell so I did a (very simple) script for it. Its easy to use, just remember to set execution policy correctly before you use it otherwise the script does not run. So here it is


Param
(
[parameter(mandatory=$true,HelpMessage="Please, Give a folder to start from, ok?")][ValidateNotNullOrEmpty()]$VHDPath,
[parameter(mandatory=$true,HelpMessage="Please, Give the mode, quick or full?")][ValidateNotNullOrEmpty()]$Mode
)
get-childitem $VHDPath -recurse -filter *.vhd | ForEach-Object {optimize-vhd -Path $_.FullName -Mode $Mode}

The script takes to parameters, –VHDPath and –Mode
  • The VHDPath is the starting point from where to start search for VHD and VHDx files in the form of –VHDPath C:\VMs
  • The Mode is also simple to use, it takes Full, Quick, Retrim, Pretrimmed and Prezeroed. Now that does require some understanding I believe. So here is the explanation from TechNet:

Specifies the mode in which the virtual hard disk is to be optimized. For a VHD disk, the default mode is Full. For a VHDX disk, the default mode is Quick. Retrim – sends down retrims without scanning for zero blocks or reclaiming unused blocks. (Allowable only if the virtual hard disk is mounted read-only.) Quick – reclaims unused blocks, but does not scan for zero blocks. (Allowable only if the virtual hard disk is mounted read-only.) Full – scans for zero blocks and reclaims unused blocks. (Allowable only if the virtual hard disk is mounted read-only.) Pretrimmed – performs as Quick mode, but does not require the virtual hard disk to be mounted read-only. The unused space detection will be less effective than quick mode where the virtual hard disk had been mounted read-only as the scan will be unable to query information about free space in the NTFS file system within the virtual hard disk. Useful when the VHDX has been used by OS instances which are Win8 or greater or the VHDX has already been the target of this cmdlet in Retrim mode. Prezeroed – performs as Quick mode, but does not require the virtual hard disk to be mounted read-only. The unused space detection will be less effective than if the virtual hard disk had been mounted read-only as the scan will be unable to query information about free space in the NTFS file system within the virtual hard disk. Useful if a tool was run previously to zero all the free space on the virtual disk as this mode of compaction can then reclaim that space for subsequent block allocations. This form of compaction can also be useful in handling virtual hard disk containing file systems other than NTFS.

/mike

Posted in Hyper-V | Tagged: , | Leave a Comment »

Microsoft iSCSI Software Target 3.3 for Windows Server 2008 R2 available for public download

Posted by Mikael Nystrom on April 4, 2011

YES !!!

Microsoft is releasing the iSCSI Target Server and that means that you now can use a Windows Server 2008 R2 x64 OS as a SAN by adding this download, it is so cool!!!.

The Microsoft iSCSI Software Target 3.3 provides storage (disks) over a TCP/IP network. It turns a computer running Windows Server into a storage device which provides shared block storage. You can use Microsoft iSCSI Software Target 3.3 to perform a variety of storage-related tasks, including the following:

  • Provide shared storage for Hyper-V to enable high availability and live migration
  • Consolidate storage for multiple application servers (i.e. Microsoft SQL Server or Hyper-V)
  • Provide shared storage for applications hosted on a Windows failover cluster
  • Enable diskless computers to boot remotely from a single operating system image using iSCSI

The Microsoft iSCSI Software Target 3.3 is an economical solution suited for a development or test environment and a small, medium, or branch office production environment. It enables storage consolidation and sharing on a Windows Server by implementing the iSCSI (Internet Small Computer Systems Interface) protocol, which supports SCSI-block access to a storage device over a TCP/IP network. For details on how to manage iSCSI targets, see http://technet.microsoft.com/en-us/library/gg232606(WS.10).aspx.

Read more here and get the download

Blog: http://blogs.technet.com/b/josebda/archive/2011/04/04/microsoft-iscsi-software-target-3-3-for-windows-server-2008-r2-available-for-public-download.aspx

TechNet: http://technet.microsoft.com/en-us/library/gg232597.aspx

Download: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=45105d7f-8c6c-4666-a305-c8189062a0d0

Posted in Hyper-V, iSCSI, Windows Server 2008 R2 | Tagged: , , | 1 Comment »

System Center Virtual Machine Manager 2008 R2 SP1

Posted by Mikael Nystrom on April 3, 2011

Yes, it is finally here and the major “thing” is that it fully supports Dynamic Memory and RemoteFX (included in SP1 for Windows Server 2008 R2). In most cases you download the Service Pack, apply it and you are done, but that is NOT the case this time. What you do is to download the complete ISO image and install that. There are reasons, one being that once you have installed SP1 you cannot go back to RTM, since the database has been modified and Microsoft would like to be sure that you have the complete package (the ISO) so that you can perform a disaster recovery operation. Well, ok, but still I think it would have been better if they did release it as a SP trough WSUS, but that is me. Anyway, here are the steps:

Download System Center Virtual Machine Manager 2008 R2 SP1 (read more about different locations and different licensed version here)

  • Perform a backup of the SCVMM Database (just to be safe)
  • Mount the ISO on the server
  • Install SCVMM 2008 R2 SP1 (It will detect that you are running RTM and upgrade itself)
  • Stop the SCVMM service
  • Uninstall the Console
  • Install the SP1 Console
  • Start the SCVMM Service
  • Done

To be honest, not sure that you need to uninstall/re-install the console, but if I did not do that I could not use/see the new features. When I did, it worked like a charm.

List of features in SCVMM 2008 R2 SP1

  • Dynamic Memory
  • RemoteFX
  • Live migration
  • Clustered Shared Volume (CSV) support that enables multiple Highly Available Virtual Machines (HAVM) per LUN.
  • Hot add of storage
  • Support for VMware vSphere 4 (VMware VI3 feature parity only)
  • SAN Migration into and out of clustered hosts
  • Processor flexibility
  • Network optimization
  • Quick storage migration
  • Maintenance mode for hosts
  • Support for third party cluster file system, Sanbolic Melio FS
  • Support for third party storage class resource, Veritas Storage Foundation for Windows
  • Expanded support for iSCSI SANs
  • Support for VMware port groups for virtual switches
  • Support for Virtual Machine permissions assigned in Hyper-V
  • Dynamic policy based load balancing

Read more:

/mike

Posted in Hyper-V, SCVMM | Tagged: , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 1,655 other followers