Skip to content

Commit a7a923e

Browse files
committed
Fix: Qemu was not the default hypervisor for instances.
1 parent 07c20e8 commit a7a923e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/aleph/sdk/client/authenticated_http.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -535,15 +535,17 @@ async def create_instance(
535535
timeout_seconds = timeout_seconds or settings.DEFAULT_VM_TIMEOUT
536536

537537
payment = payment or Payment(chain=Chain.ETH, type=PaymentType.hold)
538-
hypervisor = hypervisor or HypervisorType.firecracker
538+
539+
# Default to the QEMU hypervisor for instances.
540+
selected_hypervisor: HypervisorType = hypervisor or HypervisorType.qemu
539541

540542
content = InstanceContent(
541543
address=address,
542544
allow_amend=allow_amend,
543545
environment=InstanceEnvironment(
544546
internet=internet,
545547
aleph_api=aleph_api,
546-
hypervisor=hypervisor,
548+
hypervisor=selected_hypervisor,
547549
),
548550
variables=environment_variables,
549551
resources=MachineResources(

tests/unit/test_asynchronous.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def test_create_instance_no_hypervisor(mock_session_with_post_success):
157157
hypervisor=None,
158158
)
159159

160-
assert instance_message.content.environment.hypervisor == HypervisorType.firecracker
160+
assert instance_message.content.environment.hypervisor == HypervisorType.qemu
161161

162162
assert mock_session_with_post_success.http_session.post.assert_called_once
163163
assert isinstance(instance_message, InstanceMessage)

0 commit comments

Comments
 (0)