[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt-users] correct way to hot-add cdrom ?



Alexandr писал 2013-12-02 09:36:
Good day to all. i have problems with cdrom hot adding code. currently
i using virDomainAttachDevice with type=file, device=cdrom, dev=hdc,
this code works for machine with one ide hdd and one ide cdrom, but
this not work for machine with only one ide hdd, and i looking for
solution to hot add cdrom to machine independent of existing devices
or i need way to determinate which target device can be attached to
vm. thanks in advance for any help.

_______________________________________________
libvirt-users mailing list
libvirt-users redhat com
https://www.redhat.com/mailman/listinfo/libvirt-users

i have tested following

evil-desktop sss # virsh -d 0 attach-disk fuck /home/sss/cd/mhdd32ver4.6.iso vdb --type cdrom
attach-disk: domain(optdata): fuck
attach-disk: source(optdata): /home/sss/cd/mhdd32ver4.6.iso
attach-disk: target(optdata): vdb
attach-disk: type(optdata): cdrom
attach-disk: found option <domain>: fuck
attach-disk: <domain> trying as domain NAME
error: Failed to attach disk
error: internal error: No device with bus 'virtio' and target 'vdb'

evil-desktop sss # virsh -d 0 attach-disk fuck /home/sss/cd/mhdd32ver4.6.iso vda --type cdrom
attach-disk: domain(optdata): fuck
attach-disk: source(optdata): /home/sss/cd/mhdd32ver4.6.iso
attach-disk: target(optdata): vda
attach-disk: type(optdata): cdrom
attach-disk: found option <domain>: fuck
attach-disk: <domain> trying as domain NAME
error: Failed to attach disk
error: internal error: No device with bus 'virtio' and target 'vda'

evil-desktop sss # virsh -d 0 attach-disk fuck /home/sss/cd/mhdd32ver4.6.iso sda --type cdrom
attach-disk: domain(optdata): fuck
attach-disk: source(optdata): /home/sss/cd/mhdd32ver4.6.iso
attach-disk: target(optdata): sda
attach-disk: type(optdata): cdrom
attach-disk: found option <domain>: fuck
attach-disk: <domain> trying as domain NAME
error: Failed to attach disk
error: internal error: No device with bus 'scsi' and target 'sda'

evil-desktop sss # virsh -d 0 attach-disk fuck /home/sss/cd/mhdd32ver4.6.iso sda --type cdrom --mode readonly
attach-disk: domain(optdata): fuck
attach-disk: source(optdata): /home/sss/cd/mhdd32ver4.6.iso
attach-disk: target(optdata): sda
attach-disk: type(optdata): cdrom
attach-disk: mode(optdata): readonly
attach-disk: found option <domain>: fuck
attach-disk: <domain> trying as domain NAME
error: Failed to attach disk
error: internal error: No device with bus 'scsi' and target 'sda'

evil-desktop sss # virsh -d 0 attach-disk fuck /home/sss/cd/mhdd32ver4.6.iso vda --type cdrom --mode readonly
attach-disk: domain(optdata): fuck
attach-disk: source(optdata): /home/sss/cd/mhdd32ver4.6.iso
attach-disk: target(optdata): vda
attach-disk: type(optdata): cdrom
attach-disk: mode(optdata): readonly
attach-disk: found option <domain>: fuck
attach-disk: <domain> trying as domain NAME
error: Failed to attach disk
error: internal error: No device with bus 'virtio' and target 'vda'

evil-desktop sss # virsh -d 0 attach-disk fuck /home/sss/cd/mhdd32ver4.6.iso hda --type cdrom --mode readonly
attach-disk: domain(optdata): fuck
attach-disk: source(optdata): /home/sss/cd/mhdd32ver4.6.iso
attach-disk: target(optdata): hda
attach-disk: type(optdata): cdrom
attach-disk: mode(optdata): readonly
attach-disk: found option <domain>: fuck
attach-disk: <domain> trying as domain NAME
error: Failed to attach disk
error: internal error: Removable media not supported for cdrom device

evil-desktop sss # virsh -d 0 attach-disk fuck /home/sss/cd/mhdd32ver4.6.iso hdb --type cdrom --mode readonly
attach-disk: domain(optdata): fuck
attach-disk: source(optdata): /home/sss/cd/mhdd32ver4.6.iso
attach-disk: target(optdata): hdb
attach-disk: type(optdata): cdrom
attach-disk: mode(optdata): readonly
attach-disk: found option <domain>: fuck
attach-disk: <domain> trying as domain NAME
error: Failed to attach disk
error: internal error: No device with bus 'ide' and target 'hdb'

evil-desktop sss # virsh -d 0 attach-disk fuck /home/sss/cd/mhdd32ver4.6.iso hdc --type cdrom --mode readonly
attach-disk: domain(optdata): fuck
attach-disk: source(optdata): /home/sss/cd/mhdd32ver4.6.iso
attach-disk: target(optdata): hdc
attach-disk: type(optdata): cdrom
attach-disk: mode(optdata): readonly
attach-disk: found option <domain>: fuck
attach-disk: <domain> trying as domain NAME
Disk attached successfully

with no luck...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]