Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdrom funtionality missing or unclear how to use it #308

Closed
mrndev opened this issue Jul 3, 2023 · 2 comments
Closed

cdrom funtionality missing or unclear how to use it #308

mrndev opened this issue Jul 3, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mrndev
Copy link

mrndev commented Jul 3, 2023

Description

I want to create a VM with a cdrom. With the cdrom I want to boot an ISO image that I uploaded to the IONOS cloud. I however cannot figure out how to create the CD drive. According to the API documentation, "a cdrom device is attached to a server or it does not exists" (https://api.ionos.com/docs/cloud/v6/#tag/Servers/operation/datacentersServersCdromsPost). Still the attach command has the CDROM device ID as a required parameter. What should I give as an ID if the cdrom device does not exist yet. There is also no "cdrom create" command

Expected behavior

Attaching a CDROM

Environment

Ionosctl version:
  ionosctl --version
  ionosctl version v6.6.3

OS: Linux
Shell: Bash

How to Reproduce

# Trying first without the cdrom ID
~/iso$ ionosctl server cdrom attach  --datacenter-id "$DCID"  --server-id "$SERVERID" -w
Error: "ionosctl server cdrom attach" requires at least 3 options.

Usage: ionosctl server cdrom attach --datacenter-id DATACENTER_ID --server-id SERVER_ID --cdrom-id CDROM_ID

For more details, see 'ionosctl server cdrom attach --help'.

# I created a dummy ID
$ ionosctl server cdrom attach         --datacenter-id "$DCID"         --server-id "$SERVERID"         --cdrom-id c67f4b77-2dc3-4f7a-82e0-789b3ba133b8         -w
Error: 422 Unprocessable Entity {
  "httpStatus" : 422,
  "messages" : [ {
    "errorCode" : "151",
    "message" : "[(root)] Resource referenced by 'c67f4b77-2dc3-4f7a-82e0-789b3ba133b8' does not exist"
  } ]
}


What am I missing?

@mrndev mrndev added the bug Something isn't working label Jul 3, 2023
@avirtopeanu-ionos
Copy link
Contributor

Hi, yes, it seems like there is no way to use the command without providing a CD-ROM ID, and instead providing properties for a CD-ROM. I am still debating on how to implement this, but I'm leaning towards keeping the "attach CD-ROM to server via properties" use case in a new command (ionosctl server cdrom create <with_CD-ROM_properties>) separate to the existing "attach CD-ROM via Image ID with type CD-ROM" use case (ionosctl server cdrom attach <with_CD-ROM_ID>). Also, yes, the documentation could definitely be improved.

it also seems like the --cdrom-id flag's completions for this command were broken. Upon fixing it (locally), I have to say that I don't consider them (overly) useful because of their large number, and we will also be rolling out incremental changes to all commands to include help texts for each flag completions:

 % io s cd attach --datacenter-id <ID> --server-id <ID> --cdrom-id (tab)
Completing completions
010a8c06-6028-11ed-a67c-fe6d461d20e1  -- ClearOS-DVD-x86_64_7.7.0.iso (fr/par):
012cf206-09d5-11ed-b441-96ff36bbb3ad  -- windows-VirtIO-drivers-1.217-1.iso (us/ewr): windows:virtiodriver_iso
018b05d4-59ed-11e9-b7e8-525400f64d8d  -- Microsoft-SQL-2017-full-trial-english.iso (de/fra): mssql:2017_trial_iso

@mrndev
Copy link
Author

mrndev commented Jul 10, 2023

Thanks for the update. It would be great to have a fix since automated testing of ISO images is not possible with ionosctl without the cdrom functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants