Skip to content

Commit

Permalink
kvm: set arch from capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed May 9, 2024
1 parent 9b41c02 commit f4d5c01
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions kvirt/providers/kvm/__init__.py
Expand Up @@ -238,12 +238,9 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt'
default_disksize = disksize
default_pool = pool
conn = self.conn
if 'arch' not in overrides and image is not None:
if ('aarch64' in image or 'arm64' in image):
overrides['arch'] = 'aarch64'
elif 's390x' in image:
overrides['arch'] = 's390x'
capabilities = self.get_capabilities(overrides.get('arch'))
if 'arch' not in overrides:
overrides['arch'] = capabilities['arch']
if 'emulator' in overrides and which(overrides['emulator']) is not None:
emulator = which(overrides['emulator'])
elif 'emulator' not in capabilities:
Expand Down

0 comments on commit f4d5c01

Please sign in to comment.