throw new Exception("unmatched disk id " + diskId + " " + genDiskId);
}
VirtualDevice.BackingInfo disk1Bk = vm.getVirtualDevice(diskId).getBacking();
System.out.println("Remove a disk");
vm.detachVirtualDisk(diskId, false);
vm.dumpDevices();
System.out.println("Attach a new disk");
vm.attachVirtualDisk(new DeviceId("VirtualLsiLogicController", 0, 2),
VmConfigUtil.createVmdkBackingInfo(vm, "data.vmdk", DiskMode.persistent),