I am using Proxmox VE 4.4 and I am puzzled how to eject a CD/DVD drive that is currently configured. Assume that the ID of the guest VM is set as the environment variable vmid
.
Currently the configuration qm config $vmid|grep ^ide
gives the following:
ide2: iso-storage:iso/SLE-12-SP2-Server-DVD-x86_64-GM-DVD1.iso,media=cdrom,size=3188M
and I'd like to "eject" that drive such that no media is in that drive anymore, but it still exists as CD/DVD drive to the guest (i.e. without removing the drive!).
How can I achieve that from the shell of the Proxmox VE machine (i.e. the host)?
NB: qm cdrom <vmid> eject
does not exist in this version of Proxmox VE, but it does appear to have existed in the past.
What I tried:
# qm set $vmid -ide2 media=cdrom
400 Parameter verification failed.
ide2: invalid format - format error
ide2.file: property is missing and it is not optional
qm set <vmid> [OPTIONS]
and
# qm set $vmid -ide2 media=cdrom,file=
400 Parameter verification failed.
ide2: invalid format - missing key in comma-separated list property
qm set <vmid> [OPTIONS]
and
# qm set $vmid -ide2 media=cdrom,file=/dev/null
update VM $vmid: -ide2 media=cdrom,file=/dev/null
volume /dev/null does not exists
I figured it out on my own.
While almost any value for the
<volume>
in-ide[n] [file=]<volume>
failed (seeqm(1)
), the undocumented valuenone
did the trick.I only stumbled across that, because one of the virtual machines in my PVE clustered happened to have that value. So I gave it a try and lo and behold:
does the trick.