Need begin job before lookup disk in config, because it can be edited at this moment. Signed-off-by: Konstantin Neumoin <kneumoin@xxxxxxxxxxxxx> --- src/vz/vz_driver.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 8f94326..954ca6a 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -4000,12 +4000,6 @@ vzDomainBlockResize(virDomainPtr domain, size /= 1024; size /= 1024; - if (!(disk = virDomainDiskByName(dom->def, path, false))) { - virReportError(VIR_ERR_INVALID_ARG, - _("invalid path: %s"), path); - goto cleanup; - } - if (vzDomainObjBeginJob(dom) < 0) goto cleanup; job = true; @@ -4019,6 +4013,12 @@ vzDomainBlockResize(virDomainPtr domain, goto cleanup; } + if (!(disk = virDomainDiskByName(dom->def, path, false))) { + virReportError(VIR_ERR_INVALID_ARG, + _("invalid path: %s"), path); + goto cleanup; + } + ret = prlsdkResizeImage(dom, disk, size); cleanup: -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list