Beispiel #1
0
        public void SetDataDisk(string vmName, string serviceName, HostCaching hc, int lun)
        {
            SetAzureDataDiskConfig config = new SetAzureDataDiskConfig(hc, lun);

            config.Vm = GetAzureVM(vmName, serviceName).VM;
            UpdateAzureVM(vmName, serviceName, SetAzureDataDisk(config));
        }
 public static OSVirtualHardDisk OSDiskFromLink(Uri mediaLink, OperatingSystemType osType, string label = null, HostCaching caching = HostCaching.ReadWrite)
 {
     return new OSVirtualHardDisk
     {
         HostCaching = caching,
         DiskLabel = label,
         MediaLink = mediaLink,
         OSType = osType
     };
 }
 public static OSVirtualHardDisk OSDiskFromVirtualDisk(string diskName, OperatingSystemType osType, string label = null, HostCaching caching = HostCaching.ReadWrite)
 {
     return new OSVirtualHardDisk
     {
         HostCaching = caching,
         DiskLabel = label,
         DiskName = diskName,
         OSType = osType
     };
 }
 public static OSVirtualHardDisk OSDiskFromImage(string imageName, OperatingSystemType osType, Uri targetBlob, string label = null, HostCaching caching = HostCaching.ReadWrite)
 {
     return new OSVirtualHardDisk
     {
         HostCaching = caching,
         DiskLabel = label,
         SourceImageName = imageName,
         OSType = osType,
         MediaLink = targetBlob
     };
 }
Beispiel #5
0
 public void VerifyVM(PersistentVM vm, OS ImageFamily, HostCaching hostCaching, int LogicalDiskSizeInGB, int noOfDataDisks)
 {
     //Verify OS Disk
     Console.WriteLine("VM OS Virtual Hard Disk properties:");
     Utilities.PrintContext(vm.OSVirtualHardDisk);
     Assert.AreEqual(HostCaching.ReadWrite.ToString(), vm.OSVirtualHardDisk.HostCaching, "Os disk Property HostCaching is not matching.");
     Assert.AreEqual(ImageFamily.ToString(), vm.OSVirtualHardDisk.OS, "ImageFamily property is not matching.");
     //Verify Data Disk
     Console.WriteLine("VM Data Hard Disk properties:");
     Utilities.PrintContext(vm.DataVirtualHardDisks[0]);
     Assert.AreEqual(hostCaching.ToString(), vm.DataVirtualHardDisks[0].HostCaching, "Data disk Property HostCaching is not matching.");
     Assert.AreEqual(LogicalDiskSizeInGB, vm.DataVirtualHardDisks[0].LogicalDiskSizeInGB, "Data disk size is not matching.");
     Assert.AreEqual(noOfDataDisks, vm.DataVirtualHardDisks.Count, "Data disks count is not matching.");
 }
        public SetAzureOSDiskCmdletInfo(HostCaching? hs, PersistentVM vm, int? resizedSize)
        {
            cmdletName = Utilities.SetAzureOSDiskCmdletName;

            if (hs != null)
            {
                this.cmdletParams.Add(new CmdletParam("HostCaching", hs.ToString()));
            }
            this.cmdletParams.Add(new CmdletParam("VM", vm));
            if (resizedSize != null)
            {
                this.cmdletParams.Add(new CmdletParam("ResizedSizeInGB", resizedSize));
            }
        }
        internal static string ToSerializedValue(this HostCaching value)
        {
            switch (value)
            {
            case HostCaching.None:
                return("None");

            case HostCaching.ReadOnly:
                return("ReadOnly");

            case HostCaching.ReadWrite:
                return("ReadWrite");
            }
            return(null);
        }
Beispiel #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="vm"></param>
 /// <param name="expOS"></param>
 /// <param name="expHC"></param>
 /// <returns></returns>
 internal static bool AzureOsDisk(PersistentVM vm, string expOS, HostCaching expHC)
 {
     try
     {
         OSVirtualHardDisk osdisk = vmPowershellCmdlets.GetAzureOSDisk(vm);
         Console.WriteLine("OS Disk: Name - {0}, Label - {1}, HostCaching - {2}, OS - {3}", osdisk.DiskName, osdisk.DiskLabel, osdisk.HostCaching, osdisk.OS);
         Assert.IsTrue(osdisk.Equals(vm.OSVirtualHardDisk), "OS disk returned is not the same!");
         Assert.AreEqual(expOS, osdisk.OS);
         Assert.AreEqual(expHC.ToString(), osdisk.HostCaching);
         return(true);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
         if (e is AssertFailedException)
         {
             return(false);
         }
         else
         {
             throw;
         }
     }
 }
 public static string ToSerialString(this HostCaching value) => value switch
 {
Beispiel #10
0
        public void VerifyVMImage(string vmImageName, OS ImageFamily, string imageLabel, string osState, HostCaching hostCaching, int LUN, int LogicalDiskSizeInGB, int noOfDataDisks)
        {
            var vmImages = vmPowershellCmdlets.GetAzureVMImageReturningVMImages(vmImageName);

            Assert.IsTrue(vmImages.Count >= 1);
            var vmImageInfo = vmImages[0];

            Utilities.PrintContext(vmImageInfo);
            Utilities.PrintContext(vmImageInfo.OSDiskConfiguration);
            Utilities.PrintContext(vmImageInfo.DataDiskConfigurations[0]);
            //Verify ImageName
            Assert.IsTrue(vmImageName.Equals(vmImageInfo.ImageName));
            Assert.IsTrue(vmImageInfo.Label.Equals(imageLabel));
            //Verify Category
            Assert.IsTrue("User".Equals(vmImageInfo.Category, StringComparison.CurrentCultureIgnoreCase));
            //Verify LogicalDiskSizeInGB, HostCaching
            Assert.AreEqual(hostCaching.ToString(), vmImageInfo.OSDiskConfiguration.HostCaching, "Property HostCaching is not matching.");
            Assert.AreEqual(hostCaching.ToString(), vmImageInfo.DataDiskConfigurations[0].HostCaching, "Data disk HostCaching iproperty is not matching.");
            //Verify LogicalDiskSizeInGB,
            Assert.AreEqual(LogicalDiskSizeInGB, vmImageInfo.DataDiskConfigurations[0].LogicalDiskSizeInGB);
            //Verify OSstate
            Assert.AreEqual(osState, vmImageInfo.OSDiskConfiguration.OSState, "OsState is not matching.");
            //Verify OS
            Assert.AreEqual(ImageFamily.ToString(), vmImageInfo.OSDiskConfiguration.OS, "Os Family is not matching.");
            //Verify  LUN
            Assert.AreEqual(LUN, vmImageInfo.DataDiskConfigurations[0].Lun);
            //Verify the no of the data disks
            Assert.AreEqual(noOfDataDisks, vmImageInfo.DataDiskConfigurations.Count);
        }
 public SetAzureDataDiskConfig(HostCaching hostCaching, int lun)
 {
     this.hostCaching = hostCaching;
     this.lun = lun;
 }
        public PersistentVM SetAzureOSDisk(HostCaching hc, PersistentVM vm)
        {
            SetAzureOSDiskCmdletInfo setAzureOSDiskCmdletInfo = new SetAzureOSDiskCmdletInfo(hc, vm);
            WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(setAzureOSDiskCmdletInfo);

            Collection<PSObject> result = azurePowershellCmdlet.Run();
            if (result.Count == 1)
            {
                return (PersistentVM)result[0].BaseObject;
            }
            return null;
        }
 public SetAzureOSDiskCmdletInfo(HostCaching hs, PersistentVM vm)
 {
     cmdletName = Utilities.SetAzureOSDiskCmdletName;
     this.cmdletParams.Add(new CmdletParam("HostCaching", hs.ToString()));
     this.cmdletParams.Add(new CmdletParam("VM", vm));
 }
Beispiel #14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="vm"></param>
 /// <param name="expOS"></param>
 /// <param name="expHC"></param>
 /// <returns></returns>
 internal static bool AzureOsDisk(PersistentVM vm, string expOS, HostCaching expHC)
 {
     try
     {
         OSVirtualHardDisk osdisk = vmPowershellCmdlets.GetAzureOSDisk(vm);
         Console.WriteLine("OS Disk: Name - {0}, Label - {1}, HostCaching - {2}, OS - {3}", osdisk.DiskName, osdisk.DiskLabel, osdisk.HostCaching, osdisk.OS);
         Assert.IsTrue(osdisk.Equals(vm.OSVirtualHardDisk), "OS disk returned is not the same!");
         Assert.AreEqual(expOS, osdisk.OS);
         Assert.AreEqual(expHC.ToString(), osdisk.HostCaching);
         return true;
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
         if (e is AssertFailedException)
         {
             return false;
         }
         else
         {
             throw;
         }
     }
 }
Beispiel #15
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="vm"></param>
        /// <param name="expLabel"></param>
        /// <param name="expSize"></param>
        /// <param name="expLun"></param>
        /// <param name="hc"></param>
        /// <returns></returns>
        internal static bool AzureDataDisk(PersistentVM vm, string expLabel, int expSize, int expLun, HostCaching hc)
        {
            bool found = false;

            foreach (DataVirtualHardDisk disk in vmPowershellCmdlets.GetAzureDataDisk(vm))
            {
                if (CheckDataDisk(disk, expLabel, expSize, expLun, hc))
                {
                    found = true;
                    break;
                }
            }
            return(found);
        }
 private bool CheckDataDisk(string vmName, string serviceName, AddAzureDataDiskConfig dataDiskInfo, HostCaching hc)
 {
     bool found = false;
     foreach (DataVirtualHardDisk disk in vmPowershellCmdlets.GetAzureDataDisk(vmName, serviceName))
     {
         Console.WriteLine("DataDisk - Name:{0}, Label:{1}, Size:{2}, LUN:{3}, HostCaching: {4}", disk.DiskName, disk.DiskLabel, disk.LogicalDiskSizeInGB, disk.Lun, disk.HostCaching);
         if (disk.DiskLabel == dataDiskInfo.DiskLabel && disk.LogicalDiskSizeInGB == dataDiskInfo.DiskSizeGB && disk.Lun == dataDiskInfo.LunSlot)
         {
             if (disk.HostCaching == hc.ToString())
             {
                 found = true;
                 Console.WriteLine("DataDisk found: {0}", disk.DiskLabel);
             }
         }
     }
     return found;
 }
        /// <summary>
        /// Gets the Xml tree for the custom serialiser
        /// </summary>
        /// <returns>An XElement </returns>
        public override XElement GetXmlTree()
        {
            var element = new XElement(Namespaces.NsWindowsAzure + "DataVirtualHardDisk",
                                       new XElement(Namespaces.NsWindowsAzure + "LogicalUnitNumber",
                                                    LogicalUnitNumber.ToString(CultureInfo.InvariantCulture)),
                                       new XElement(Namespaces.NsWindowsAzure + "LogicalDiskSizeInGB",
                                                    LogicalDiskSizeInGB.ToString(CultureInfo.InvariantCulture)),
                                       new XElement(Namespaces.NsWindowsAzure + "MediaLink", MediaLink),
                                       new XElement(Namespaces.NsWindowsAzure + "HostCaching", HostCaching.ToString()));

            if (DiskLabel != null)
            {
                element.Add(new XElement(Namespaces.NsWindowsAzure + "DiskLabel", DiskLabel));
            }
            if (DiskName != null)
            {
                element.Add(new XElement(Namespaces.NsWindowsAzure + "DiskName", DiskName));
            }
            return(element);
        }
Beispiel #18
0
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="HostCaching" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => HostCaching.CreateFrom(sourceValue);
 public SetAzureDataDiskConfig(HostCaching hostCaching, int lun)
 {
     this.hostCaching = hostCaching;
     this.lun         = lun;
 }
Beispiel #20
0
        private bool CheckDataDisk(string vmName, string serviceName, AddAzureDataDiskConfig dataDiskInfo, HostCaching hc)
        {
            bool found = false;

            foreach (DataVirtualHardDisk disk in vmPowershellCmdlets.GetAzureDataDisk(vmName, serviceName))
            {
                Console.WriteLine("DataDisk - Name:{0}, Label:{1}, Size:{2}, LUN:{3}, HostCaching: {4}", disk.DiskName, disk.DiskLabel, disk.LogicalDiskSizeInGB, disk.Lun, disk.HostCaching);
                if (disk.DiskLabel == dataDiskInfo.DiskLabel && disk.LogicalDiskSizeInGB == dataDiskInfo.DiskSizeGB && disk.Lun == dataDiskInfo.LunSlot)
                {
                    if (disk.HostCaching == hc.ToString())
                    {
                        found = true;
                        Console.WriteLine("DataDisk found: {0}", disk.DiskLabel);
                    }
                }
            }
            return(found);
        }
Beispiel #21
0
 public SetAzureOSDiskCmdletInfo(HostCaching hs, PersistentVM vm)
 {
     cmdletName = Utilities.SetAzureOSDiskCmdletName;
     this.cmdletParams.Add(new CmdletParam("HostCaching", hs.ToString()));
     this.cmdletParams.Add(new CmdletParam("VM", vm));
 }
Beispiel #22
0
        private static bool CheckDataDisk(DataVirtualHardDisk disk, string expLabel, int expSize, int expLun, HostCaching hc)
        {
            Console.WriteLine("DataDisk - Name:{0}, Label:{1}, Size:{2}, LUN:{3}, HostCaching: {4}",
                              disk.DiskName, disk.DiskLabel, disk.LogicalDiskSizeInGB, disk.Lun, disk.HostCaching);

            try
            {
                Assert.AreEqual(expLabel, disk.DiskLabel);
                Assert.AreEqual(expSize, disk.LogicalDiskSizeInGB);
                Assert.AreEqual(expLun, disk.Lun);
                if (disk.HostCaching == null && hc == HostCaching.None || disk.HostCaching == hc.ToString())
                {
                    Console.WriteLine("DataDisk found: {0}", disk.DiskLabel);
                }
                else
                {
                    Assert.Fail("HostCaching is not matched!");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                if (e is AssertFailedException)
                {
                    return(false);
                }
                else
                {
                    throw;
                }
            }
            return(true);
        }
Beispiel #23
0
 public PersistentVM SetAzureOSDisk(HostCaching hc, PersistentVM vm)
 {
     return(RunPSCmdletAndReturnFirst <PersistentVM>(new SetAzureOSDiskCmdletInfo(hc, vm)));
 }
        private void UpdateVMImageOsAndDataDiskAnderifyChanges( DataDiskConfigurationList diskConfig, out string disk1Name,out string disk2Name)
        {
            //Update Azure VM image disk 1 hostcaching to read write
            cahcing = GetAlternateHostCachingForOsDisk(cahcing.ToString());
            Utilities.PrintHeader(string.Format("Update Azure VM image data disk 1 hostcaching to ReadWrite, data disk 2 hostcaching to ReadOnly and OS disk host cahching to {0}. ", cahcing.ToString()));
            var vmImageContext = vmPowershellCmdlets.GetAzureVMImageReturningVMImages(vmImageName);
            Utilities.PrintCompleteContext(vmImageContext);
            var vmImageInfo = vmImageContext[0];
            disk1Name = vmImageInfo.DataDiskConfigurations[0].Name;
            disk2Name = vmImageInfo.DataDiskConfigurations[1].Name;
            var disk1HostCaching = HostCaching.ReadWrite;
            var disk2HostCaching = HostCaching.ReadOnly;
            // get disk 1 configuration from vm image 
            var diskConfigSet = vmPowershellCmdlets.GetAzureVMImageDiskConfigSet(vmImageInfo);
            // set disk1 host caching to read write 
            diskConfigSet = vmPowershellCmdlets.SetAzureVMImageDataDiskConfig(diskConfigSet, disk1Name, 0, disk1HostCaching.ToString());
            //set disk 2 host caching to None
            diskConfigSet = vmPowershellCmdlets.SetAzureVMImageDataDiskConfig(diskConfigSet, disk2Name, 1, disk2HostCaching.ToString());
            // set os disk host caching to a differnt value.
            diskConfigSet = vmPowershellCmdlets.SetAzureVMImageOSDiskConfig(diskConfigSet, cahcing.ToString());
            //update Azure VM image.
            vmPowershellCmdlets.UpdateAzureVMImage(vmImageName, vmImageName, diskConfigSet);
            Utilities.PrintFooter(string.Format("Update Azure VM image data disk 1 hostcaching to ReadWrite, data disk 2 hostcaching to ReadOnly and OS disk host cahching to {0}. ", cahcing.ToString()));

            // Verify that the vm image disk 1 host caching is "ReadWrite".
            Utilities.PrintHeader("Verify the vm image.");
            diskConfig[0].HostCaching = disk1HostCaching.ToString();
            diskConfig[1].HostCaching = disk2HostCaching.ToString();
            VerifyVMImage(vmImageName, OS.Windows, vmImageName, "Specialized", cahcing, diskConfig);
            Utilities.PrintFooter("Verify the vm image.");
        }
Beispiel #25
0
        private static bool CheckDataDisk(DataVirtualHardDisk disk, string expLabel, int expSize, int expLun, HostCaching hc)
        {
            Console.WriteLine("DataDisk - Name:{0}, Label:{1}, Size:{2}, LUN:{3}, HostCaching: {4}",
                disk.DiskName, disk.DiskLabel, disk.LogicalDiskSizeInGB, disk.Lun, disk.HostCaching);

            try
            {
                Assert.AreEqual(expLabel, disk.DiskLabel);
                Assert.AreEqual(expSize, disk.LogicalDiskSizeInGB);
                Assert.AreEqual(expLun, disk.Lun);
                if (disk.HostCaching == null && hc == HostCaching.None || disk.HostCaching == hc.ToString())
                {
                    Console.WriteLine("DataDisk found: {0}", disk.DiskLabel);
                }
                else
                {
                    Assert.Fail("HostCaching is not matched!");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                if (e is AssertFailedException)
                {
                    return false;
                }
                else
                {
                    throw;
                }
            }
            return true;
        }
 public void VerifyVMImage(string vmImageName, OS ImageFamily, string imageLabel, string osState, HostCaching hostCaching, DataDiskConfigurationList diskConfigs)
 {
     var vmImages = vmPowershellCmdlets.GetAzureVMImageReturningVMImages(vmImageName);
     Assert.IsTrue(vmImages.Count >= 1);
     var vmImageInfo = vmImages[0];
     Utilities.PrintContext(vmImageInfo);
     Utilities.PrintContext(vmImageInfo.OSDiskConfiguration);
     foreach (var disk in vmImageInfo.DataDiskConfigurations)
     {
         Utilities.PrintContext(disk);
     }
     //Verify ImageName
     Assert.IsTrue(vmImageName.Equals(vmImageInfo.ImageName));
     Assert.IsTrue(vmImageInfo.Label.Equals(imageLabel));
     //Verify Category
     Assert.IsTrue("User".Equals(vmImageInfo.Category, StringComparison.CurrentCultureIgnoreCase));
     //Verify LogicalDiskSizeInGB, HostCaching
     Assert.AreEqual(hostCaching.ToString(), vmImageInfo.OSDiskConfiguration.HostCaching, "Property HostCaching is not matching.");
     //Verify the no of the data disks 
     Assert.AreEqual(diskConfigs.Count, vmImageInfo.DataDiskConfigurations.Count);
     //Verify Data disks.
     VerifyDataDiskConfiguration(diskConfigs, vmImageInfo);
     //Verify OSstate
     Assert.AreEqual(osState, vmImageInfo.OSDiskConfiguration.OSState, "OsState is not matching.");
     //Verify OS
     Assert.AreEqual(ImageFamily.ToString(), vmImageInfo.OSDiskConfiguration.OS, "Os Family is not matching.");
 }
Beispiel #27
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="vm"></param>
 /// <param name="expLabel"></param>
 /// <param name="expSize"></param>
 /// <param name="expLun"></param>
 /// <param name="hc"></param>
 /// <returns></returns>
 internal static bool AzureDataDisk(PersistentVM vm, string expLabel, int expSize, int expLun, HostCaching hc)
 {
     bool found = false;
     foreach (DataVirtualHardDisk disk in vmPowershellCmdlets.GetAzureDataDisk(vm))
     {
         if (CheckDataDisk(disk, expLabel, expSize, expLun, hc))
         {
             found = true;
             break;
         }
     }
     return found;
 }
 public void VerifyVM(PersistentVM vm, OS ImageFamily, HostCaching hostCaching, int LogicalDiskSizeInGB, int noOfDataDisks)
 {
     //Verify OS Disk
     Console.WriteLine("VM OS Virtual Hard Disk properties:");
     Utilities.PrintContext(vm.OSVirtualHardDisk);
     Assert.AreEqual(HostCaching.ReadWrite.ToString(), vm.OSVirtualHardDisk.HostCaching, "Os disk Property HostCaching is not matching.");
     Assert.AreEqual(ImageFamily.ToString(), vm.OSVirtualHardDisk.OS,"ImageFamily property is not matching.");
     //Verify Data Disk
     Console.WriteLine("VM Data Hard Disk properties:");
     Utilities.PrintContext(vm.DataVirtualHardDisks[0]);
     Assert.AreEqual(hostCaching.ToString(), vm.DataVirtualHardDisks[0].HostCaching, "Data disk Property HostCaching is not matching.");
     Assert.AreEqual(LogicalDiskSizeInGB, vm.DataVirtualHardDisks[0].LogicalDiskSizeInGB,"Data disk size is not matching.");
     Assert.AreEqual(noOfDataDisks, vm.DataVirtualHardDisks.Count, "Data disks count is not matching.");
 }
        private void UpdateVmImageUsingDiskConfigSetAndVerifyChanges(DataDiskConfigurationList diskConfig, string disk1Name, string disk2Name)
        {
            cahcing = GetAlternateHostCachingForOsDisk(cahcing.ToString());
            Utilities.PrintHeader("Update Azure VM image data disk 1 hostcaching to ReadOnly, data disk 2 hostcaching to None and OS disk host cahching to" + cahcing.ToString());
            var diskConfigSet = vmPowershellCmdlets.NewAzureVMImageDiskConfigSet();
            diskConfigSet.OSDiskConfiguration = new OSDiskConfiguration() { HostCaching = cahcing.ToString() };
            diskConfigSet.DataDiskConfigurations = new DataDiskConfigurationList();
            diskConfigSet.DataDiskConfigurations.Add(new DataDiskConfiguration()
            {
                Name = disk1Name,
                HostCaching = HostCaching.ReadOnly.ToString(),
                Lun = 0
            });
            diskConfigSet.DataDiskConfigurations.Add(new DataDiskConfiguration()
            {
                Name = disk2Name,
                HostCaching = HostCaching.None.ToString(),
                Lun = 1
            });
            //update Azure VM image.
            vmPowershellCmdlets.UpdateAzureVMImage(vmImageName, vmImageName, diskConfigSet);
            Utilities.PrintFooter(string.Format("Update Azure VM image data disk 1 hostcaching to ReadWrite, data disk 2 hostcaching to ReadOnly and OS disk host cahching to {0}. ", cahcing.ToString()));

            // Verify that the vm image disk 1 host caching is "ReadWrite".
            Utilities.PrintHeader("Verify that the vm image.");
            diskConfig[0].HostCaching = diskConfigSet.DataDiskConfigurations[0].HostCaching.ToString();
            diskConfig[1].HostCaching = diskConfigSet.DataDiskConfigurations[1].HostCaching.ToString();
            VerifyVMImage(vmImageName, OS.Windows, vmImageName, "Specialized", cahcing, diskConfig);
            Utilities.PrintFooter("Verify that the vm image.");
        }
 public void SetDataDisk(string vmName, string serviceName, HostCaching hc, int lun)
 {
     SetAzureDataDiskConfig config = new SetAzureDataDiskConfig(hc, lun);
     config.Vm = GetAzureVM(vmName, serviceName).VM;
     UpdateAzureVM(vmName, serviceName, SetAzureDataDisk(config));
 }