[Python] 500 response on a launch_instance in OCI SDK for Python [closed]

Discussão em 'Python' iniciado por Stack, Maio 19, 2025.

  1. Stack

    Stack Membro Participativo

    I get a 500 "InternalError" on compute_client.launch_instance(launch_instance_details = details) call.

    here is my details object:

    details = LaunchInstanceDetails(
    compartment_id=TENANCY_OCID,
    availability_domain=availability_domain,
    shape="VM.Standard.A1.Flex",
    shape_config=LaunchInstanceShapeConfigDetails(
    ocpus=ocpus, memory_in_gbs=memory_in_gbs
    ),
    display_name=display_name,
    source_details=InstanceSourceViaImageDetails(
    source_type="image", image_id=image_id
    ),
    create_vnic_details=CreateVnicDetails(
    subnet_id=subnet_id, assign_public_ip=True
    ),
    metadata={"user_data": b64_ud}
    )


    Everything should be set correctly, TENANCY_OCID is pulled straight from the config. The only thing I could think of is running out of OCPU/Memory slots for the Oracle Cloud Instance free tier, but I recently deleted an instance which gives me 1 OCPU and 4gbs of RAM. Passing 1 OCPU and 1GB of ram still gives the 500 response.

    I thought the servers could've been busy, but I've been trying for hours and still nada. It works through the website console with the same exact settings so it's not a service outage or too much traffic (I don't think).

    Any ideas?

    Here's the request payload in case it's needed (OCIDs are replaced with #):

    {
    "availability_domain": "TeNh:US-#-1-AD-1",
    "capacity_reservation_id": null,
    "compartment_id": #,
    "create_vnic_details": {
    "assign_ipv6_ip": null,
    "assign_public_ip": true,
    "assign_private_dns_record": null,
    "defined_tags": null,
    "display_name": null,
    "freeform_tags": null,
    "security_attributes": null,
    "hostname_label": null,
    "ipv6_address_ipv6_subnet_cidr_pair_details": null,
    "nsg_ids": null,
    "private_ip": null,
    "skip_source_dest_check": null,
    "subnet_id": #,
    "vlan_id": null
    },
    "dedicated_vm_host_id": null,
    "defined_tags": null,
    "security_attributes": null,
    "display_name": "MC-Server",
    "extended_metadata": null,
    "fault_domain": null,
    "cluster_placement_group_id": null,
    "freeform_tags": null,
    "compute_cluster_id": null,
    "hostname_label": null,
    "image_id": null,
    "ipxe_script": null,
    "launch_options": null,
    "instance_options": null,
    "availability_config": null,
    "preemptible_instance_config": null,
    "metadata": {
    "user_data": #
    },
    "agent_config": null,
    "shape": "VM.Standard.A1.Flex",
    "shape_config": {
    "ocpus": 1,
    "vcpus": null,
    "memory_in_gbs": 1,
    "baseline_ocpu_utilization": null,
    "nvmes": null
    },
    "source_details": {
    "source_type": "image",
    "boot_volume_size_in_gbs": null,
    "image_id": #,
    "kms_key_id": null,
    "boot_volume_vpus_per_gb": null,
    "instance_source_image_filter_details": null
    },
    "subnet_id": null,
    "launch_volume_attachments": null,
    "is_pv_encryption_in_transit_enabled": null,
    "platform_config": null,
    "instance_configuration_id": null,
    "licensing_configs": null
    }


    I tried changing the instance details and image.

    Continue reading...

Compartilhe esta Página