The nova.virt.xenapi.volumeops Module

Management class for Storage-related functions (attach, detach, etc).

class VolumeOps(session)

Bases: object

Management class for Volume-related tasks.

attach_volume(connection_info, instance_name, mountpoint, hotplug=True)

Attach volume to VM instance.


Attach volume to hypervisor, but not the VM.


Detach all cinder volumes.

detach_volume(connection_info, instance_name, mountpoint)

Detach volume storage to VM instance.


Find any volumes with their connection severed.

Certain VM operations (e.g. VM.start, VM.reboot, etc.) will not work when a VBD is present that points to a non-working volume. To work around this, we scan for non-working volumes and detach them before retrying a failed operation.


Previous topic

The nova.virt.xenapi.volume_utils Module

Next topic

The nova.vnc.xvp_proxy Module

Project Source

This Page