← Back to team overview

openstack team mailing list archive

Re: Is m1.tiny instance type supported for Xen?


Grazie di cuore, Armando!

On 01/19/2012 04:27 PM, Armando Migliaccio wrote:
Is this what you're looking for?



-----Original Message-----
From: openstack-bounces+armando.migliaccio=eu.citrix.com@xxxxxxxxxxxxxxxxxxx
bounces+armando.migliaccio=eu.citrix.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of
Alessio Ababilov
Sent: 17 January 2012 16:12
To: openstack@xxxxxxxxxxxxxxxxxxx
Subject: [Openstack] Is m1.tiny instance type supported for Xen?


OpenStack Nova allows to run instances with local_gb = 0 for m1.tiny
instance type if libvirt is used. As I see, m1.tiny is not supported
when using Xen. Am I right?

I think it would be better to unify behavior for different backends.

Here are code examples.

Generic code allows local_gb == 0 (nova/compute/manager.py):

              # NOTE(jk0): Since libvirt uses local_gb as a secondary
drive, we
              # need to handle potential situations where local_gb is 0.
This is
              # the default for m1.tiny.
              if allowed_size_gb == 0:

Libvirt backend handles m1.tiny in special way

          if inst_type['name'] == 'm1.tiny' or suffix == '.rescue':
              size = None

Xen backend just checks the size (nova/virt/xenapi/vm_utils.py)

      def _check_vdi_size(cls, context, session, instance, vdi_uuid):
          size_bytes = cls._get_vdi_chain_size(context, session, vdi_uuid)

          # FIXME(jk0): this was copied directly from compute.manager.py,
          # refactor this to a common area
          instance_type_id = instance['instance_type_id']
          instance_type = db.instance_type_get(context,
          allowed_size_gb = instance_type['local_gb']
          allowed_size_bytes = allowed_size_gb * 1024 * 1024 * 1024

          LOG.debug(_("image_size_bytes=%(size_bytes)d, allowed_size_bytes="
                      "%(allowed_size_bytes)d") % locals())

          if size_bytes>  allowed_size_bytes:
              LOG.info(_("Image size %(size_bytes)d exceeded"
                         " instance_type allowed size "
                         % locals())
              raise exception.ImageTooLarge()

Alessio Ababilov
Software Engineer
Grid Dynamics

Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Alessio Ababilov
Software Engineer
Grid Dynamics