← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1291741] [NEW] VMWare: Resize action does not change disk

 

Public bug reported:

In "nova/virt/vmwareapi/vmops.py"

def finish_migration(self, context, migration, instance, disk_info,
                         network_info, image_meta, resize_instance=False,
                         block_device_info=None, power_on=True):
        """Completes a resize, turning on the migrated instance."""
        if resize_instance:
            client_factory = self._session._get_vim().client.factory
            vm_ref = vm_util.get_vm_ref(self._session, instance)
            vm_resize_spec = vm_util.get_vm_resize_spec(client_factory,
                                                        instance)
            reconfig_task = self._session._call_method(
                                            self._session._get_vim(),
                                            "ReconfigVM_Task", vm_ref,
                                            spec=vm_resize_spec)
.....................

finish_migration uses vm_util.get_vm_resize_spec() to get resize
parameters.

But in "nova/virt/vmwareapi/vm_util.py"

def get_vm_resize_spec(client_factory, instance):
    """Provides updates for a VM spec."""
    resize_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
    resize_spec.numCPUs = int(instance['vcpus'])
    resize_spec.memoryMB = int(instance['memory_mb'])
    return resize_spec

the get_vm_resize_spec action does not set up disk size to resize.

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: resize vmware

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1291741

Title:
  VMWare: Resize action does not change disk

Status in OpenStack Compute (Nova):
  New

Bug description:
  In "nova/virt/vmwareapi/vmops.py"

  def finish_migration(self, context, migration, instance, disk_info,
                           network_info, image_meta, resize_instance=False,
                           block_device_info=None, power_on=True):
          """Completes a resize, turning on the migrated instance."""
          if resize_instance:
              client_factory = self._session._get_vim().client.factory
              vm_ref = vm_util.get_vm_ref(self._session, instance)
              vm_resize_spec = vm_util.get_vm_resize_spec(client_factory,
                                                          instance)
              reconfig_task = self._session._call_method(
                                              self._session._get_vim(),
                                              "ReconfigVM_Task", vm_ref,
                                              spec=vm_resize_spec)
  .....................

  finish_migration uses vm_util.get_vm_resize_spec() to get resize
  parameters.

  But in "nova/virt/vmwareapi/vm_util.py"

  def get_vm_resize_spec(client_factory, instance):
      """Provides updates for a VM spec."""
      resize_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
      resize_spec.numCPUs = int(instance['vcpus'])
      resize_spec.memoryMB = int(instance['memory_mb'])
      return resize_spec

  the get_vm_resize_spec action does not set up disk size to resize.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1291741/+subscriptions


Follow ups

References