Skip to content

VMware-to-KVM Resize Support for Instances Using Ephemeral Root Disks - #652

Draft
anokfireball wants to merge 7 commits into
stable/2023.2-m3from
kvmotion-eph-support
Draft

VMware-to-KVM Resize Support for Instances Using Ephemeral Root Disks#652
anokfireball wants to merge 7 commits into
stable/2023.2-m3from
kvmotion-eph-support

Conversation

@anokfireball

Copy link
Copy Markdown
Member

No description provided.

Cross-HV resize can use an image/local root only after conductor has a
chance to convert it to BFV. The old utility-level BFV check rejected those
instances before scheduling, so validate the root BDM in MigrationTask
instead.

Allow image/local and */volume roots. Reject blank/local, missing root BDMs,
and cross-cell selections because the prep and abort RPCs run against the
source cell.

Change-Id: Ib66d7de2da1865437b0db9a2127cfd928c3ab073
KVM cannot boot a Nova-managed VMDK from a VMware ephemeral datastore, so an
image/local root must be imported into Cinder before the existing BFV resize
path runs.

The conductor prep step powers off the source VM, detaches the root VMDK,
imports it with manage_existing using source-name, size_gb, and optional
source-id, creates a reserved attachment, and mutates the root BDM to
volume-backed.

The conversion is permanent across revert. Abort is only safe before Cinder
relocates the disk; later code reports that through structured safe_to_abort
metadata.

Change-Id: I7e991b5da895b059a5b9f459c44ad3e4d5f93c3d
Cross-HV conversion needs a reversible source-side prep step around Cinder
manage_existing. Add VMwareVMOps prep and abort helpers that detach the root
VMDK and, when abort is safe, attach it back.

Prep discovers the root disk before changing power state, accepts already
shutdown guests, and powers the VM back on after detach failure only when Nova
powered it off in this attempt. It returns the VMDK path, size, Cinder host,
rollback device data, and optional FCD id needed by conductor.

Abort is retry-tolerant: it skips reattach if the disk is already present and
skips power-on if the VM is already running.

Change-Id: I5b8057f8797d714c1e33f782a3b9f72a47f50407
Expose source-side prep and abort through compute RPC so conductor can drive
VMware conversion without reaching into virt code.

Bump compute RPC to 6.2.1, add driver stubs, delegate the VMware driver to
VMops, and leave unsupported drivers on NotImplementedError.
prep_cross_hv_conversion preserves DiskNotFound and InstanceInvalidState as
expected RPC exceptions; abort failures remain unexpected and surface to the
caller.

Change-Id: I277618423e1fe881e56a36cd277b713bcc7a6cda
[cross_hv] fcd_volume_type has no default because the VMware FCD volume type
is deployment-specific. Missing config must fail before conductor powers off
or detaches the source VM.

Register the [cross_hv] group, add manage_existing_timeout with a 600 second
default, and validate fcd_volume_type before VMware prep.

Change-Id: Icbda4fbc2760e26f495bcc161197121727a1084a
Add the Nova-side Cinder manage_existing wrapper used by cross-HV root disk
conversion. It uses the request context, submits volumes.manage(), polls Cinder
every 5 seconds until available, and uses [cross_hv] manage_existing_timeout
by default.

CrossHvVolumeManageFailed carries safe_to_abort, volume_id, and volume_status
so conductor can decide whether VMware prep may be rolled back. Synchronous
Cinder rejection, client connection errors, and Keystone discovery failures are
safe to abort because Cinder has not accepted the disk. Polling treats error as
safe, error_managing as unsafe, and timeout as unsafe unless the latest state is
error.

Relax translate_volume_exception so this keyword-based API can run before a
Cinder volume id exists while preserving NotFound mapping for existing volume
calls.

Change-Id: Ie375421d381ed7dcfca5992d5cde261c02bfb84e
Keep abort orchestration in conductor, where the VMware prep payload is still
available. manage_existing now reports structured failure metadata only.

On CrossHvVolumeManageFailed with safe_to_abort=True, call
abort_cross_hv_conversion with the original prep response and re-raise the
manage failure. If abort itself fails, log that failure and preserve the manage
exception. Unsafe manage failures and generic exceptions do not abort.

Remove the temporary rollback argument from the volume API call.

Change-Id: I4260e6521daf3faf25c1629c921c9528c848eb70
@anokfireball
anokfireball force-pushed the kvmotion-eph-support branch from 1e40dce to 81fb3c1 Compare July 31, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant