PREVIR304 Notes from the field: Practical advice on adoption, deployment and migration

1 / 35
About This Presentation
Title:

PREVIR304 Notes from the field: Practical advice on adoption, deployment and migration

Description:

Practical advice on adoption, deployment and migration. Ronald Beekelaar ... Swith boot disk from IDE to SCSI adapter. Virtual PC can still boot from disk as IDE ... –

Number of Views:56
Avg rating:3.0/5.0
Slides: 36
Provided by: downloadM
Category:

less

Transcript and Presenter's Notes

Title: PREVIR304 Notes from the field: Practical advice on adoption, deployment and migration


1
PRE-VIR304Notes from the fieldPractical advice
on adoption, deployment and migration
  • Ronald Beekelaar
  • Consultant, Beekelaar Consultancy
  • ronald_at_beekelaar.com

2
Agenda
  • Disk
  • Networking
  • Clustering
  • Backup VMs
  • Performance

3
About the Presenter
  • Consultant and trainer
  • Virtualization
  • Security, ISA Server and Forefront
  • Virtualization background
  • Microsoft MVP for Virtual Machine Technology
  • Whitepaper at microsoft.com "Virtual PC for
    Developers"
  • Manage all Virtual PC / Virtual Server-based
    labsat TechEd / IT Forum and other international
    TechEds
  • Create and optimize many VMs
  • Create virtualization tools (Virsoft)
  • Tools to analyse and optimize VMs
  • Tools to handle VHD-files
  • Contact
  • Beekelaar Consultancyronald_at_beekelaar.com

4
Disks
  • Data store in virtual hard disk (.vhd) files
  • File format is the same
  • Virtual PC 2004
  • Virtual Server 2005
  • Windows Server Virtualization (future)
  • Max sizes
  • IDE (VPC2004) 130,557 MB ( 127.5 GB)
  • IDE (VS2005) 130,048 MB ( 127.0 GB)
  • SCSI (VS2005) 2,088,960 MB ( 2040.0 GB)

5
DisksVHD Format
  • Free license from Microsoft
  • www.microsoft.com/windowsserversystem/virtualserve
    r/techinfo/vhdspec.mspx
  • 45 vendors signed up (April 2006)
  • Examples
  • Diskeeper
  • PlateSpin
  • WinImage
  • XenSource
  • From 17-Oct-2006
  • Unregistered download available

Virtual Hard Disk Format Specification
Introductions Overview of Virtual Hard Disk
Types Virtual hard disk Footer Format
Dynamically expanding .VHD Header Format Block
Allocation Table and Data Blocks Implementing a
Dynamically expanding .VHD Mapping a Disk
Sector to a Sector in the Block Splitting
virtual hard disks Implementing a Differencing
virtual hard disk CHS Calculation
6
VHD Types
2TB
1GB
Host
2TB
Guest
2TB
Host
2TB
Guest
Session
SP1
SP2
Host
7
VHD Test Drive Program
  • New announced 6-Nov-2006
  • Fully configured VHD-files
  • Downloadable from Microsoft's Web site
  • Evaluation versions
  • Expires after 30 days
  • Partners can also provide their applications
  • See www.microsoft.com/vhd for more information

8
VHD Mount ToolAccess VHD content offline
  • VHDMount tool is included with VS2005 R2 SP1
  • Can install separate
  • Use as command-line tool
  • Use for copying or injecting files, inspecting,
    virus-scanning
  • Do not use for offline patching (yet)

C\gt msiexec.exe /i "Virtual Server 2005
Install.msi" /qn ADDLOCALVHDMount
C\Program Files\Microsoft Virtual
Server\Vhdmountgt vhdmount.exe Usage VHDMOUNT /p
VHDFileName - mounts
vhd-file VHDMOUNT /m VHDFileName DriveLetter -
mounts vhd-file, assign drive letters VHDMOUNT /u
VHDFileName All - unmounts vhd-file or
all VHDMOUNT /q VHDFileName All -
lists mounted vhd-file or all
9
VHD EnhancementsWindows Server Virtualization
  • While VM is running
  • Compact VHD-file
  • Create new diff-disk (snapshotting)
  • Create VHD-chain
  • Schedule snapshot every 10 minutes
  • Merge
  • Hot add VHD-file
  • Add VHD-file notes
  • Think 1000s of VHD-files on network
  • Pass-through VHD - map to SAN

10
Differencing disks
  • VHD files use blocks of 2 MB

Virtual Server service
Link toparent
1
2
4
Read only
3
File-a.doc
File-b.doc
File-d.doc
11
DisksRead/write zero-filled files
  • VHD file format optimizes read/write
    ofzero-filled blocks
  • Best example empty pagefile.sys

Virtual Server service
12
Compact VHD Files
  • Steps
  • Note Does not work on differencing disks
  • In VM - Cleanup
  • Startup VM without Undo disks
  • 1 Defragment disk
  • 2 Zero-fill all unallocated spaces
  • Use Precompactor.iso
  • Shutdown VM
  • On host - Compact
  • 3 Use VPC Disk Wizard or VS Inspect Disk to
    compact

13
Networking
  • Create .vnc-files to define "virtual switches"
  • Three settings per vnc-file
  • - Network name
  • - Connected to which host network adapter
    or to None (guest-only)
  • - DHCP settings for this switch
  • Pre-defined vnc-files
  • Internal network.vnc
  • Separate vnc-file for each host network adapter
  • Unique MAC-address assigned
  • Unlimited network speed (not max 10/100 Mbps)

14
Virtual Server Clustering
  • Three different options
  • Virtual Machine (Guest) Clustering - Shared SCSI
  • Cluster VMs on same host
  • Virtual Machine (Guest) Clustering - iSCSI
  • Cluster VMs on different hosts
  • Virtual Server Host Clustering
  • Cluster VS on different hosts

15
Clustering
16
ClusteringVirtual Machine (Guest) Clustering
  • VM (Guest) is the cluster node
  • Application in guest is a resource group
  • Application is cluster-aware (or Generic)
  • Protects against failure of Guest
  • If VM or application fails,then failover to
    other VMon same host or on another host

17
Out-of-the-Box High AvailabilityHost Updating
WSUS server
  • Administrator wants to update node 1 with Windows
    Server Update Services
  • Microsoft Cluster Administration Console saves
    the state of virtual machines and restores them
    on another node
  • Node 1 is ready for update installation

Shared Storage
Node 1
Node 2
Node 3
18
Out-of-the-Box High AvailabilityUnplanned
downtime
Shared Storage
  • Node 1 suffers a power outage or a network
    failure
  • A simple script attached to the Microsoft Cluster
    Administration Console notices the lack of
    heartbeat and starts the virtual machines
    associated with node 1 on other nodes

Node 1
Node 2
Node 3
X
19
ClusteringVirtual Server Host Clustering
  • Host is the cluster node
  • Each VM (Guest) is a resource group
  • Generic Script havm.vbs makes VM"cluster-aware"
  • Protects against failure of Host
  • Application in guest is not monitored by cluster

Function Open() .. 'starts Virtual
Server service Function Online() .. 'send
start control to VM Function LooksAlive() ..
'quick check if VM is alive Function IsAlive()
.. 'thorough check if VM is alive Function
Offline() .. 'send save state control to
VM Function Terminate() .. 'best attempt to
take offline
20
ClusteringVirtual Server Host Clustering
  • Benefits
  • Move VMs before scheduled host maintenance
  • Hardware upgrades
  • Software updates on host
  • Steps Saves state VM1 - failover - restore state
    in VM2
  • Protect against unscheduled host failure
  • Steps (Oops) - failover - startup VM2
  • Run legacy operating systems in a "clustered" way

21
ClusteringVirtual Server Host Clustering
  • Deploy
  • Hosts run Cluster service
  • Uses iSCSI or SCSI/Fibre Channel to shared
    storage
  • Note Disable Cluster service when installing
    VS2005
  • Each VM is in a Resource Group
  • Or multiple VMs in same Resource Group
  • Implemented as Physical Disk resource
  • Containing vmc-file, vhd-file and vsv-file
  • Add havm.vbs as Generic Script in Resource Group
  • Resource dependencies
  • Script havm.vbs ? OS disk ? Data disk

22
Virtual Server Backup and Recovery
  • Do you need to backup VMs?
  • Because a VM is a single file (.vhd), it is very
    easy to use backup methods that you cannot safely
    restore
  • Issues are
  • Running state of vhd-file
  • Restore unusable "snapshot" of a database
  • Best example Active Directory database

23
Backup of VM
  • Three methods
  • ? - Inside VM, run backup application
  • Treat VM as a normal physical machine
  • ? - Stop VM (save state)- On host, backup
    vhd/vsv files- Start up VM
  • Only short VM downtime
  • ? Not supported for DCs in VM !
  • ? - Needs Virtual Server 2005 R2 SP1- On host,
    run backup application- Copy 'open' vhd files -
    uses VSS and VS Writer
  • VS Writer ensures vhd-file is in consistent state
  • ? Do NOT use without Virtual Server 2005 R2 SP1

24
Backup of VMsVSS explained
  • Roles
  • VSS Requestor backup application
  • Initiates backup action
  • VSS Writer Virtual Server 2005 R2 SP1
  • Ensures data consistency

Freeze
VSSService
4
Snap
In guest (VM1)
3
"Backup files"
5
6
VS Writer
Virtual Server
SnapID
"Unfreeze"
2
Snap
7
"Backup VM1"
VSSService
VSSService
1
Copy files based on SnapID
On host
BackupApplication
BackupApplication
25
OperationsBest practices
  • Disable VM time synchronizationwhen VMs are in a
    domain
  • Does not use time zones !
  • When copying VMs
  • Run Sysprep, or Newsid (sysinternals.com)
  • Do not include save state (.vsv) file
  • Stop VS when shutting down host computer
  • Use script for UPS

26
Performance Optimizations
  • Virtual Server is usually faster thanVirtual PC
  • Except for video (screen) handling
  • Disk
  • Three possible disk drivers in guest(in order of
    speed)
  • 3. Windows SCSI driver (slowest)
  • 2. IDE driver (only option for Virtual PC)
  • 1. VM Additions SCSI driver (fastest)

27
Move disk from VPC to VSFrom IDE to SCSI
  • Issue How to boot IDE vhd as SCSI vhd
  • Steps
  • 1. In VS console
  • Add SCSI Adapter (ID 7) to VM
  • Leave boot disk as IDE disk
  • 2. Startup VM
  • Found new hardwareAdaptec AIC-7870 PCI SCSI
    Adapter
  • Needs Win2003 CD for aic78xx.sys (56 KB)
  • Now you can boot as SCSI,but this is a slow SCSI
    driver.

28
Move disk from VPC to VSFrom IDE to SCSI
  • 3. In running VM
  • Open Device Manager
  • Right-click Adaptec / Update Driver
  • Install from a specific location / Have Disk
  • Browse to C\Program Files\Virtual Machine
    Additions
  • Installs SCSI driverMicrosoft Virtual Machine
    PCI SCSI
  • Now the fast SCSI driver is loaded
  • 4. In VS console
  • Swith boot disk from IDE to SCSI adapter
  • Virtual PC can still boot from disk as IDE

29
PerformanceMost important tips
  • ? Install VM Additions in all VMs
  • Consider latest VM Additions
  • ? Use enough memory per VM
  • To avoid paging inside VM
  • ? Plan capacity of running VMs
  • Total disk usage
  • Total CPU usage
  • Total network bandwidth needed

30
PerformanceOn host
  • On host, for disks
  • Use multiple physical disks
  • Use SCSI host disks
  • Defragment host disk
  • Use NTFS
  • Use NTFS compression - maybe
  • On host, use multiple network adapters
  • Unbind Virtual Machine Network Servicefrom
    dedicated host adapter
  • On host, exclude .vhd from virus-scanning
  • On host, do not use /3GB in boot.ini
  • VMs use non-paged kernel memory

31
PerformanceIn guest
  • VM configuration
  • Use SCSI disk for vhd-file
  • Ensure VM Additions SCSI driver is used
  • Use fixed disk instead of dynamic disks
  • Guest configuration
  • Disable unnecessary services
  • Indexing, tracing, auto-search for network
    resources, etc
  • Defragment guest disk
  • Not when using differencing disk

32
For more informationUseful links
  • Weblogs
  • Virtual PC Guy (Ben Armstrong - MS)
  • http//blogs.msdn.com/Virtual_PC_Guy/
  • Virtual Vista (Mike Kolitz - MS)
  • http//blogs.msdn.com/mikekol/
  • Windows Server Virtualization (John Howard - MS)
  • http//blogs.technet.com/jhoward/
  • Scripts
  • TechNet
  • www.microsoft.com/technet/scriptcenter/scripts/vs/
    default.mspx

33
For more informationWhitepapers
  • Virtualization Licensing Brief
  • www.microsoft.com/licensing/resources/volbrief.msp
    x
  • Using iSCSI with Virtual Server 2005 R2
  • http//go.microsoft.com/fwlink/?LinkId55646
  • Virtual Server Host Clustering whitepaper and
    script
  • http//go.microsoft.com/fwlink/?LinkId55644
  • Virtual Server Guest Clustering
  • www.microsoft.com/technet/prodtechnol/virtualserve
    r/deploy/cvs2005.mspx
  • Virtual PC for Development and Debugging
  • www.microsoft.com/windows/virtualpc/techinfo/debug
    .mspx

34
For more informationDownload software
  • Virtual Server 2005 R2 EE
  • www.microsoft.com/windowsserversystem/virtualserve
    r/software/default.mspx
  • Virtual Server 2005 R2 SP1 Beta2
  • connect.microsoft.com - sign-up for beta
  • Virtual PC 2007 - including Additions 13.803
  • www.microsoft.com/virtualpc
  • Linux VM Additions
  • www.microsoft.com/windowsserversystem/virtualserve
    r/evaluation/linuxguestsupport/default.mspx
  • VSMT
  • http//go.microsoft.com/fwlink/?LinkId37030
  • Virtual Machine Manager (beta)
  • Sign up at connect.microsoft.com

35
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com