Showing posts with label Hyper-V. Show all posts
Showing posts with label Hyper-V. Show all posts
Sunday, August 28, 2011
Hyper-V gotsas
Please the following article from Microsoft
Labels:
Hyper-V,
Hyper-V R2,
Windows Server 2008 R2
Thursday, September 9, 2010
How to configure pagefile in windows 2008 Server Core
From http://www.hyper-v.nu/blogs/jaapwess/?p=41 we read:
To configure the pagefile on a Hyper-V Server Core or Hyper-V Server you can use the following commands:
wmic computersystem set AutomaticManagedPagefile=False
wmic pagefileset where name="c:\\pagefile.sys" set InitialSize=4000,MaximumSize=6000
It is possible to check the pagefile settings using the following command:
wmic pagefile get /format:list
To configure the pagefile on a Hyper-V Server Core or Hyper-V Server you can use the following commands:
wmic computersystem set AutomaticManagedPagefile=False
wmic pagefileset where name="c:\\pagefile.sys" set InitialSize=4000,MaximumSize=6000
It is possible to check the pagefile settings using the following command:
wmic pagefile get /format:list
Labels:
Core,
Hyper-V,
Hyper-V R2,
Windows Server 2008,
Windows Server 2008 R2
Thursday, July 29, 2010
Hyper-V backup can cause slow system boot / large registry files
There is a bug in Windows 2008 and Windows 2008 R2. The startup time increases every time after you back up the data on all the disks of the computer in Windows Server 2008 R2, if the computer runs some virtual machines. For more details and a hotfix look at this KB article from Microsoft
http://support.microsoft.com/kb/982210
Also take a look at these posts
http://blogs.msdn.com/b/virtual_pc_guy/
http://garysgambit.blogspot.com/2010/05/windows-2008-hyper-v-vss-backup-bug.html
http://virtuallyaware.spaces.live.com/
http://support.microsoft.com/kb/982210
Also take a look at these posts
http://blogs.msdn.com/b/virtual_pc_guy/
http://garysgambit.blogspot.com/2010/05/windows-2008-hyper-v-vss-backup-bug.html
http://virtuallyaware.spaces.live.com/
Hyper-V resources in Microsoft
Please take a look at the following link from Microsoft
http://technet.microsoft.com/en-us/bb802511.aspx
http://technet.microsoft.com/en-us/bb802511.aspx
Wednesday, July 7, 2010
How to install and use PowerShell Management library for Hyper-V R2
Read the following posts:
http://trycatch.be/blogs/roggenk/archive/2010/02/08/powershell-management-library-for-hyper-v-r2.aspx
http://trycatch.be/blogs/roggenk/archive/2010/05/26/managing-windows-server-2008-r2-using-powershell.aspx
Examples:
# get default VHD path for server ariadne
Get-VHDDefaultPath -server ariadne
# get VM state for all VMs in server ariadne with a formated output
get-VMState -server ariadne | ft -property VMElementName,GuestOS,EnabledState,Name -auto
# Start a VM Session
New-VMConnectSession -vm strgsrv -server ariadne
# Start a VM
Start-VM -vm strgsrv -server ariadne
# Shutdown a VM
Invoke-VMShutdown -vm strgsrv -server ariadne -Force
# Shutdown all VMs in server ariadne
Invoke-VMShutdown (Select-VM -Server ariadne -Multiple) -Force
# Shutdown all VMs in server ariadne
Get-VM -Server ariadne -Running | Invoke-VMShutdown -Force
# List all stopped VMs in server ariadne
get-VM -Server ariadne -Stopped
# Start all VMs in server ariadne
get-VM -Server ariadne -Stopped | Start-VM
# Get a build script for VM strgsrv of server ariadne
Get-VMBuildScript -vm strgsrv -server ariadne
http://trycatch.be/blogs/roggenk/archive/2010/02/08/powershell-management-library-for-hyper-v-r2.aspx
http://trycatch.be/blogs/roggenk/archive/2010/05/26/managing-windows-server-2008-r2-using-powershell.aspx
Examples:
# get default VHD path for server ariadne
Get-VHDDefaultPath -server ariadne
# get VM state for all VMs in server ariadne with a formated output
get-VMState -server ariadne | ft -property VMElementName,GuestOS,EnabledState,Name -auto
# Start a VM Session
New-VMConnectSession -vm strgsrv -server ariadne
# Start a VM
Start-VM -vm strgsrv -server ariadne
# Shutdown a VM
Invoke-VMShutdown -vm strgsrv -server ariadne -Force
# Shutdown all VMs in server ariadne
Invoke-VMShutdown (Select-VM -Server ariadne -Multiple) -Force
# Shutdown all VMs in server ariadne
Get-VM -Server ariadne -Running | Invoke-VMShutdown -Force
# List all stopped VMs in server ariadne
get-VM -Server ariadne -Stopped
# Start all VMs in server ariadne
get-VM -Server ariadne -Stopped | Start-VM
# Get a build script for VM strgsrv of server ariadne
Get-VMBuildScript -vm strgsrv -server ariadne
Labels:
Hyper-V,
Hyper-V R2,
Powershell,
Windows Server 2008 R2
Monday, March 22, 2010
Wednesday, February 10, 2010
Things to know when you are imaging Linux to other hardware
This is especially useful when you are going to convert a Linux server to a virtual machine. Read the following post: http://forums.opensuse.org/archives/sf-archives/archives-tips-tricks-tweaks/343785-good-things-know-when-imaging-linux-different-hardware.html
Tuesday, February 9, 2010
How to Unregister and Register Virtual Machines without Deleting Them
Read the following articles: http://blogs.msdn.com/robertvi/archive/2008/12/19/howto-manually-add-a-vm-configuration-to-hyper-v.aspx and http://msmvps.com/blogs/virtualreality/archive/2009/03/26/how-to-manipulate-hyper-v-vm-symbolic-links-or-how-to-unregister-and-register-virtual-machines-without-deleting-them.aspx
Thursday, February 4, 2010
Thursday, December 17, 2009
Tuesday, November 10, 2009
Your credentials do not work in Hyper-V manager
When you try to connect to a Hyper-V server in Workgroup mode from a client that belongs in either a workgroup or a domain you receive the message:
Your system administrator does not allow the use of default credentials to log on to the remote computer (computer name) because its identity is not fully verified. Please enter new credentials.
The fix is to allow saved credentials with NTLM-only server authentication on the Hyper-V client machine. You can do this in the Local Group Policy Editor.
* Run gpedit.msc on the client machine (Windows Vista or Windows 7)
* Expand Local Computer Policy > Computer Configuration > Administrative Templates > System > Credentials Delegation
* Double-click Allow Saved Credentials with NTLM-only Server Authentication
* Enable the policy
* Add servers to the list by clicking the Show button and adding your Hyper-V hostname like this: */YourServerName
* Add other servers to the list using the same method
* Click OK twice and close Local Group Policy Editor
* Now run GPUPDATE on the Hyper-V client machine to apply the new settings.
* Use cmdkey to save the credentials you use to connect to the remote server using this command: cmdkey /add:ServerName /user:UserName /pass:password
Your system administrator does not allow the use of default credentials to log on to the remote computer (computer name) because its identity is not fully verified. Please enter new credentials.
The fix is to allow saved credentials with NTLM-only server authentication on the Hyper-V client machine. You can do this in the Local Group Policy Editor.
* Run gpedit.msc on the client machine (Windows Vista or Windows 7)
* Expand Local Computer Policy > Computer Configuration > Administrative Templates > System > Credentials Delegation
* Double-click Allow Saved Credentials with NTLM-only Server Authentication
* Enable the policy
* Add servers to the list by clicking the Show button and adding your Hyper-V hostname like this: */YourServerName
* Add other servers to the list using the same method
* Click OK twice and close Local Group Policy Editor
* Now run GPUPDATE on the Hyper-V client machine to apply the new settings.
* Use cmdkey to save the credentials you use to connect to the remote server using this command: cmdkey /add:ServerName /user:UserName /pass:password
How to backup virtual machines using powershell
from http://prosjekt.mindre.net/post/Powershell-script-for-snapshot-and-exporting%28backup%29-Virtual-Machines.aspx download the CreateVmBackups.ps1 Powershell script. Set Powershell scripts execution policy to RemoteSigned and create a scheduled task for this script. To run a Powershell script in Task Scheduler enter Powershell as program and "& 'C:\Hyper-V\CreateVmSnapshots.ps1'" as argument.
Monday, October 12, 2009
Thursday, August 27, 2009
Using Windows Server Backup and the Diskshadow for Hyper-V backup
Read the article http://searchstorage.techtarget.com.au/articles/34981-Using-Windows-Server-Backup-and-the-Diskshadow-for-Hyper-V-backup and also this http://technet.microsoft.com/de-de/library/cc772172%28WS.10%29.aspx
Example: (from http://serverfault.com/questions/55789/command-line-backup-of-running-hyper-v-images-using-volume-shadow-copies-vss-an)
Below are sample scripts used to backup Hyper-V using VSS to create a snapshot. Guest operating systems that do not support VSS will be put into a saved state during the snapshot period.
This sample backs up images located on the E:\VS directory to a local directory at F:\VS Backups. These locations will need to be adjusted to fit your needs. For each source drive, an additional volume will need to be added to the VSS snapshot.
Documentation on the diskshadow.exe command is available on Technet.
Copy each of these three files into a directory and run HyperVBackup.cmd.
HyperVBackup.cmd:
-----------------
REM Use the diskshadow command to support "live" Hyper-V backup
REM though VSS
diskshadow /s diskshadow_script.txt > HyperVBackup_LOG.txt
REM Remove CAB files which are generated to support the exporting
REM of disk shadow copies (not required here)
del *.cab /Q
iskshadow_script.txt:
---------------------
# Remove any existing shadow copies from crashed or errored scripts
# WARNING: this will conflict with other backup software if running
# at the same time.
delete shadows all
# Use a persistent context so we can "map" a drive
set context persistent
# Log everything
set verbose on
# ***TODO*** Change this drive letter to match the location of your
# VHD files
add volume E: alias HyperV1
# Add additional volumes if needed
#add add volume H: alias HyperV2
# Create the shadow copy
create
# Expose each shadowed volume as a drive
# ***TODO*** Make sure the exposed drive letter is available and used
# in the backup script
expose %HyperV1% S:
# Expose additional volumes as needed
#expose %HyperV2% T:
# Execute the backup script (robocopy)
exec HyperVBAckup_exec.cmd
# clean up the shadow copy images
delete shadows all
HyperVBackup_exec.cmd:
----------------------
REM This is the script to perform the actual copy of the files
REM Use robocopy with the source set to the expose shadow drives
REM The drives are read-only, so don't try to reset the archive bit
REM **TODO** Set the destination location for the backups
robocopy S:\VS "F:\VS Backup" /MIR /NP /XF *.ISO /R:2 /W:5
REM Dummy command to clear the robocopy errorlevel
verify >nul
Example: (from http://serverfault.com/questions/55789/command-line-backup-of-running-hyper-v-images-using-volume-shadow-copies-vss-an)
Below are sample scripts used to backup Hyper-V using VSS to create a snapshot. Guest operating systems that do not support VSS will be put into a saved state during the snapshot period.
This sample backs up images located on the E:\VS directory to a local directory at F:\VS Backups. These locations will need to be adjusted to fit your needs. For each source drive, an additional volume will need to be added to the VSS snapshot.
Documentation on the diskshadow.exe command is available on Technet.
Copy each of these three files into a directory and run HyperVBackup.cmd.
HyperVBackup.cmd:
-----------------
REM Use the diskshadow command to support "live" Hyper-V backup
REM though VSS
diskshadow /s diskshadow_script.txt > HyperVBackup_LOG.txt
REM Remove CAB files which are generated to support the exporting
REM of disk shadow copies (not required here)
del *.cab /Q
iskshadow_script.txt:
---------------------
# Remove any existing shadow copies from crashed or errored scripts
# WARNING: this will conflict with other backup software if running
# at the same time.
delete shadows all
# Use a persistent context so we can "map" a drive
set context persistent
# Log everything
set verbose on
# ***TODO*** Change this drive letter to match the location of your
# VHD files
add volume E: alias HyperV1
# Add additional volumes if needed
#add add volume H: alias HyperV2
# Create the shadow copy
create
# Expose each shadowed volume as a drive
# ***TODO*** Make sure the exposed drive letter is available and used
# in the backup script
expose %HyperV1% S:
# Expose additional volumes as needed
#expose %HyperV2% T:
# Execute the backup script (robocopy)
exec HyperVBAckup_exec.cmd
# clean up the shadow copy images
delete shadows all
HyperVBackup_exec.cmd:
----------------------
REM This is the script to perform the actual copy of the files
REM Use robocopy with the source set to the expose shadow drives
REM The drives are read-only, so don't try to reset the archive bit
REM **TODO** Set the destination location for the backups
robocopy S:\VS "F:\VS Backup" /MIR /NP /XF *.ISO /R:2 /W:5
REM Dummy command to clear the robocopy errorlevel
verify >nul
Wednesday, June 17, 2009
Install Linux IC in a Hyper-V VM
from http://itproctology.blogspot.com/2009/05/layers-to-linux-on-hyper-v.html we read
a) Obtain the LinuxIC.iso
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ab7f4983-93c5-4a70-8c79-0642f0d59ec2#tm
b) obtain the inputvsc.iso for the mouse driver
http://www.xen.org/download/satori.html
c) add the kernel-source and gcc-c++ packages
YaST can be used for this, either GUI or command line
Note: if an ISO was previously attached, you may need to detach, pause, then attach the desired ISO for SuSE auto-mount to pick up the change.
If that does not work, make a mount point ( mkdir /media/CDROM ) and mount /dev/hdc /media/CDROM
d) Install the linuxic drivers
a. Open a Terminal
b. attach the downloaded LinuxIC.iso through the Hyper-V manager
c. Create a folder and copy the contents to the folder
d. mkdir /tmp/linuxic
e. cp –rp /media/CDROM/* /tmp/linuxic
f. cd /tmp/linuxic
g. ./setup.pl drivers
e) Install the mouse driver
a. Attach the inputvsc.iso through the Hyper-V manager
b. Create a folder and copy the contents.
c. mkdir /tmp/inputvsc
d. cp –rp /media/CDROM/* /tmp/inputvsc
Note: you may need to mount again: mount /dev/hdc /media/CDROM
e. cd /tmp/inputvsc
f. ./setup.pl
f) Power down the VM, remove the Legacy Network Adapter, add a Synthetic Network adapter, power on the VM (you could also do a shutdown now –hP)
g) Using YaST (or YaST2), configure the newly installed synthetic network adapter.
a) Obtain the LinuxIC.iso
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ab7f4983-93c5-4a70-8c79-0642f0d59ec2#tm
b) obtain the inputvsc.iso for the mouse driver
http://www.xen.org/download/satori.html
c) add the kernel-source and gcc-c++ packages
YaST can be used for this, either GUI or command line
Note: if an ISO was previously attached, you may need to detach, pause, then attach the desired ISO for SuSE auto-mount to pick up the change.
If that does not work, make a mount point ( mkdir /media/CDROM ) and mount /dev/hdc /media/CDROM
d) Install the linuxic drivers
a. Open a Terminal
b. attach the downloaded LinuxIC.iso through the Hyper-V manager
c. Create a folder and copy the contents to the folder
d. mkdir /tmp/linuxic
e. cp –rp /media/CDROM/* /tmp/linuxic
f. cd /tmp/linuxic
g. ./setup.pl drivers
e) Install the mouse driver
a. Attach the inputvsc.iso through the Hyper-V manager
b. Create a folder and copy the contents.
c. mkdir /tmp/inputvsc
d. cp –rp /media/CDROM/* /tmp/inputvsc
Note: you may need to mount again: mount /dev/hdc /media/CDROM
e. cd /tmp/inputvsc
f. ./setup.pl
f) Power down the VM, remove the Legacy Network Adapter, add a Synthetic Network adapter, power on the VM (you could also do a shutdown now –hP)
g) Using YaST (or YaST2), configure the newly installed synthetic network adapter.
Thursday, May 14, 2009
Thursday, May 7, 2009
Subscribe to:
Posts (Atom)