[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] xen-4.9.0 and cdrom block-attach/-detach
03 nov 2017 >> greetings xen-users@xxxxxxxxxxxxx, >> >> i ran into a problem adding and removing cdrom images from a >> xen-4.9.0 vm. i put a series of commands into a shell script, ran >> a script command, and captured the output from ksh -xv. >> >> i figure these errors propagate through to the vm so that it sees >> neither the disk removal nor the new disk attachment. :> >> i noticed the cdrom did NOT add a .../script = entry similar to the >> disk test, so i ran an experiment and manually added a similar >> xenstore entry. however, the block-detach commmand failed as >> before. >> >> any comments or suggestions? > Why do you want to add hdd as a cdrom? i cloned the cdrom (iso9660) to a disk image. for example, on domain0: dd if=/dev/sr0 of=linux.iso bs=1k cmp /dev/sr0 linux.iso the block-attach requires some variant of: <file path>, raw, hdd, ro, cdrom <file path>, raw, sdd, ro, cdrom <file path>, raw, xvdd, ro, cdrom i can then boot the vm from the cd image or install packages as necessary. i use variants of these commands to install linux into my vm's. i chose hdd/sdd/xvdd because i already attached two disks to the ata bus. i favor *d, because i prefer to put my disks on the ata bus at locations 0-0 (hda/sda/xvda), 0-1 (*b), and maybe 1-0 (*c). that leaves the last slot (1-1) for the cdrom. in rare situations, i sometimes attach a second cdrom at 1-0. i used *d as a test to log the errors from the attach and detach commands. to me, the important part came from the error dialog. WHY did the block-detach command fail for the cdrom image? why did it work when it thought it was a disk image? what did xen expect to happen that did not? did i set something up wrong? do i need to adjust an out-of-the-box xen script? what does it take to get a clean eject of the vm's cdrom device? from a guest os perspective, i'm not sure it makes much difference between hdd and sdd. however, it could make a great deal of difference with xvdd, assuming the guest os ran pv instead of hvm. > Could you add an empty cdrom to the domain config file, then use > `xl cd-insert` and `xl cd-eject` instead of block-attach and > block-detach? i suppose it would have made a difference, had i known about the xl cd-insert or cd-eject commands. somehow, that one slid completely by me. checking on that is VERY definitely on my todo list when i get home. i've tried an empty cdrom using a line similar to this: , raw, hdd, ro, cdrom with the block-detach/-attach commands, i usually have to detach the empty cdrom device, attach the flat file, and reboot the vm. oddly enough, the block-attach and -detach worked as expected for a while a couple of years ago, but it failed both before and after that short time window. no idea why, although your cd-eject and cd-insert commands might explain the recent observations. thank you for your comments and suggestions. frank smith _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx https://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |