DiskDef iso = new DiskDef();
iso.defISODisk(isoPath);
isoXml = iso.toString();
} else {
DiskDef iso = new DiskDef();
iso.defISODisk(null);
isoXml = iso.toString();
}
List<DiskDef> disks = resource.getDisks(conn, vmName);
String result = attachOrDetachDevice(conn, true, vmName, isoXml);