vRO Extend VirtualDisk Workflow
https://vbombarded.wordpress.com/2015/02/20/vrealize-orchestrator-extend-virtual-disk-workflow/
var devices = vm.config.hardware.device;
System.log(devices) for (i in devices){
if (devices[i].deviceInfo.label == diskString){
var disk = devices[i]
System.log("Disk = " + disk.deviceInfo.label)
}
} var newSizeKB = disk.capacityInKB + (increaseSizeGB * 1024 * 1024)
System.log("New Size KB = " + newSizeKB) var spec = new VcVirtualMachineConfigSpec();
spec.changeVersion = vm.config.changeVersion;
spec.deviceChange = System.getModule("com.vmware.onyx").array(VcVirtualDeviceConfigSpec, 1);
spec.deviceChange[0] = new VcVirtualDeviceConfigSpec();
spec.deviceChange[0].operation = VcVirtualDeviceConfigSpecOperation.edit;
spec.deviceChange[0].device = new VcVirtualDisk();
spec.deviceChange[0].device.key = disk.key;
spec.deviceChange[0].device.deviceInfo = new VcDescription();
spec.deviceChange[0].device.deviceInfo.label = disk.deviceInfo.label;
spec.deviceChange[0].device.deviceInfo.summary = disk.deviceInfo.summary;
spec.deviceChange[0].device.backing = new VcVirtualDiskFlatVer2BackingInfo();
spec.deviceChange[0].device.backing.fileName = disk.backing.fileName;
spec.deviceChange[0].device.backing.diskMode = disk.backing.diskMode;
spec.deviceChange[0].device.backing.split = disk.backing.split;
spec.deviceChange[0].device.backing.writeThrough = disk.backing.writeThrough;
spec.deviceChange[0].device.backing.thinProvisioned = disk.backing.thinProvisioned;
spec.deviceChange[0].device.backing.uuid = disk.backing.uuid;
spec.deviceChange[0].device.backing.contentId = disk.backing.contentId;
spec.deviceChange[0].device.backing.digestEnabled = disk.backing.digestEnabled;
spec.deviceChange[0].device.controllerKey = disk.controllerKey;
spec.deviceChange[0].device.unitNumber = disk.unitNumber;
spec.deviceChange[0].device.capacityInKB = newSizeKB;
spec.deviceChange[0].device.shares = new VcSharesInfo();
spec.deviceChange[0].device.shares.shares = disk.shares.shares;
spec.deviceChange[0].device.shares.level = disk.shares.level;
spec.deviceChange[0].device.storageIOAllocation = new VcStorageIOAllocationInfo();
spec.deviceChange[0].device.storageIOAllocation.limit = disk.storageIOAllocation.limit;
spec.deviceChange[0].device.storageIOAllocation.shares = new VcSharesInfo();
spec.deviceChange[0].device.storageIOAllocation.shares.shares = disk.storageIOAllocation.shares.shares;
spec.deviceChange[0].device.storageIOAllocation.shares.level = disk.storageIOAllocation.shares.level; return vm.reconfigVM_Task(spec);
vRO Extend VirtualDisk Workflow的更多相关文章
- 创建一个dynamics CRM workflow (一) - Introduction to Custom Workflows
Workflow: Use this process to model and automate real world business processes. These processes can ...
- [转]Reducing script compile time or a better workflow to reduce excessive recompiling
http://forum.unity3d.com/threads/148078-Reducing-script-compile-time-or-a-better-workflow-to-reduce- ...
- $.extend()的实现源码 --(源码学习1)
目标: $.extend({ add:function(a,b){ return a + b; } }) console.log($.a ...
- Mac 词典工具推荐:Youdao Alfred Workflow(可同步单词本)
想必大家都有用过 Mac 下常见的几款词典工具: 特性 系统 Dictionary 欧路词典 Mac 版 有道词典 Mac 版 在线搜索 ✗ ✔ ✔ 屏幕取词 ☆☆☆ ★★☆ ★☆☆ 划词搜索 ★★★ ...
- 图片放大功能插件及jquery.extend函数理解
前端时间,产品提出社区评论中的图片需要有放大功能.感觉可以共用,所以就想整合一个插件,过程中也借鉴了一些例子. 分析下自己的代码思路: var scaleImg = function(opts) { ...
- $.extend({},defaults, options) --(初体验三)
1.$.extend({},defaults, options) 这样做的目的是为了保护包默认参数.也就是defaults里面的参数. 做法是将一个新的空对象({})做为$.extend的第一个参数, ...
- jquery.fn.extend与jquery.extend--(初体验二)
1.jquery.extend(object); 为扩展jQuery类本身.为类添加新的方法. jquery.fn.extend(object);给jQuery对象添加方法. $.extend({ a ...
- SharePoint 2013 create workflow by SharePoint Designer 2013
这篇文章主要基于上一篇http://www.cnblogs.com/qindy/p/6242714.html的基础上,create a sample workflow by SharePoint De ...
- Install and Configure SharePoint 2013 Workflow
这篇文章主要briefly introduce the Install and configure SharePoint 2013 Workflow. Microsoft 推出了新的Workflow ...
随机推荐
- Unity3D学习笔记——NGUI之Localization system
Localization system(国际化系统) 实现的就是用户选择不同的语言,切换我们游戏文字的显示. 一:创建一个CVS文件.可以用Google Docs, Excel等软件工具. 我这里用的 ...
- Eigen求矩阵行列式 及 行列式本质
转置.伴随.行列式.逆矩阵 小矩阵(4 * 4及以下)eigen会自动优化,默认采用LU分解,效率不高 #include <iostream> #include <Eigen/Den ...
- [NSDate distantPast]使用
本文转载至 http://blog.sina.com.cn/s/blog_5f1967e00101ge0i.html 使用下面的方法: 关闭定时器不能使用invalidate方法,应该使用下面的方法 ...
- 《从零开始学Swift》学习笔记(Day 50)——扩展计算属性、方法
原创文章,欢迎转载.转载请注明:关东升的博客 可以在原始类型上扩展计算属性,包括实例计算属性和静态计算属性.添加计算属性的定义,与普通的计算属性的定义是一样的. 实例计算属性示例:在网络编程时,为了减 ...
- SharePoint服务器端对象模型 之 访问网站和列表数据(Part 3)
(三)视图 与传统意义上的数据视图类似,SharePoint中的列表视图指定了列表中数据的筛选条件.排序条件.分组条件.显示栏/字段.显示条目数.显示样式等内容.在SharePoint中,使用SPVi ...
- 【Windows下DLL查找顺序 】
一.写作初衷 在Windows下单个DLL可能存在多个不同的版本,若不特别指定DLL的绝对路径或使用其他手段指定,在应用程序加载DLL时可能会查找到错误的版本,进而引出各种莫名其妙的问题.本文主要考虑 ...
- random生成六位随机数验证码
需求: 生成一个六位随机验证码 # 傻瓜式纯数字实现import randomran = random.randint(100000, 999999) # ran = random.randrange ...
- ORACLE中RECORD、VARRAY、TABLE的使用具体解释
1 说明 1.1 RECORD 定义记录数据类型. 它类似于C语言中的结构数据类型(STRUCTURE).PL/SQL提供了将几个相关的.分离的.基本数据类型的变量组成一个总 ...
- always on 技术
always on 技术系列:https://blog.csdn.net/dba_huangzj/article/details/54015470 MSSQL 2014 /WIN SERVER 200 ...
- nginx 与 lua 开发笔记
Nginx入门 本文目的是学习Nginx+Lua开发,对于Nginx基本知识可以参考如下文章: nginx启动.关闭.重启 http://www.cnblogs.com/derekchen/archi ...