Shahar Havivi has posted comments on this change. Change subject: v2v: Convert VM from external source to Data Domain ......................................................................
Patch Set 7: (5 comments) https://gerrit.ovirt.org/#/c/37509/7/vdsm/v2v.py File vdsm/v2v.py: Line 97: def get_converted_vm(jobId): Line 98: global _jobs Line 99: with _lock: Line 100: if jobId not in _jobs: Line 101: errCode['invalidV2VJob'] > ok but we need a 'return' here :) my bad, didn't verify yet Line 102: elif _jobs[jobId].status != 'done': Line 103: errCode['V2VJobNotDone'] Line 104: Line 105: try: Line 99: with _lock: Line 100: if jobId not in _jobs: Line 101: errCode['invalidV2VJob'] Line 102: elif _jobs[jobId].status != 'done': Line 103: errCode['V2VJobNotDone'] > same Done Line 104: Line 105: try: Line 106: file_name = os.path.join(_P_V2V_DIR, "%s.ovf" % jobId) Line 107: with open(file_name, 'r') as f: Line 196: self._vmProperties['vmName']) Line 197: Line 198: logging.info('import vm, (jobId %s) started, cmd: %r', self._job_id, Line 199: cmd) Line 200: proc = subprocess.Popen(cmd, env={'LIBGUESTFS_BACKEND': 'direct'}, > _handle_process_input() reads the process's output. But the process itself I will change the name (it was handling input and output before we use the password file). I will change it to execCmd (assumed utils.exeCmd) but what about the Shell=True, I cannot read the output without it... Line 201: shell=True, Line 202: stdout=subprocess.PIPE, Line 203: stderr=subprocess.PIPE) Line 204: Line 298: return ' '.join(images) Line 299: Line 300: def _get_domain_path(self): Line 301: ''' we are using the first disk since we are using only one storage Line 302: domain so any disk can be used for getting the domain path ''' > Can you help me here? What is the output of virt-v2v? where does it place t We do write directly to data domain and not to export domain to reduce the extra copy. (we patched virt-v2v as well) The engine prepare the images for virt-v2v (in size 0) and we pass the domain, volumes and image UUIDs to virt-v2v typical call should look like this: /usr/bin/virt-v2v -ic vpx://10.35.4.168/ovirt/10.35.5.45?no_verify=1 - o vdsm -of raw --vdsm-image-uuid e43f1bc2-0ec3-4593-97a1-2069b0555968 --vdsm-vol-uuid 62954926-01d4-4ea2-b36c-c4494f693d8a --password-file /var/run/vdsm/v2v/42350218-2e27-29b6-8b29-33886b877e24.tmp --vdsm-vm-uuid 42350218-2e27-29b6-8b29-33886b877e24 --vdsm-ovf-output /var/run/vdsm/v2v --machine-readable -os /rhev/data-center/00000002-0002-0002-0002-00000000019b/727e3ace-d14c-4ae2-a1b9-fd40a277541a windows7 Line 303: disk = self._vmProperties['disks'][0] Line 304: drive = {'device': 'disk', Line 305: 'poolID': self._vmProperties['poolID'], Line 306: 'domainID': self._vmProperties['domainID'], Line 306: 'domainID': self._vmProperties['domainID'], Line 307: 'imageID': disk['imageID'], Line 308: 'volumeID': disk['volumeID']} Line 309: Line 310: volPath = self._cif.prepareVolumePath(drive) > Please call Done Line 311: try: Line 312: return volPath.split('/images/')[0] Line 313: finally: Line 314: self._cif.teardownVolumePath(drive) -- To view, visit https://gerrit.ovirt.org/37509 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34bd86d5a87ea8c42113c4a732f87ddd4ceab9ea Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Shahar Havivi <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
