Created attachment 805987 [details] engine.log, vdsm.log Description of problem: cloud-init fake-cdrom is attached even during normal Run action. New Vm -> Run... # ps aux | grep '[q]emu.*never-cloud-init' | sed 's/ /\n/g' | grep /var/run/vdsm/payload file=/var/run/vdsm/payload/7e37afb8-058e-4543-8a47-4ee80995cb36.b6e1cd534ad800471d2431a8041f050d.img,if=none,media=cdrom,id=drive-ide0-1-1,readonly=on,format=raw,serial= Version-Release number of selected component (if applicable): is17 How reproducible: 100% Steps to Reproduce: 1. have rhevm33/is17 2. create a rhel 6 x86_64 vm with a disk (1gb) 3. run vm Actual results: cloud-init iso is attached Expected results: cloud-init iso should be attached only when explicitly requested by run once Additional info:
Related problem also happens during migration of such a VM (with attached cloud-init image). Reproducer: 1. follow steps in comment#0 2. migrate the VM Actual results: Error message in Webadmin: "VM linux-vm01 is down. Exit message: [Errno 2] No such file or directory: '/tmp/tmpog0BvS/openstack/latest/meta_data.json'." Traceback in VDSM log (attached): RuntimeError: migration destination error: {{{ Thread-239668::ERROR::2013-10-02 13:08:18,096::vm::318::vm.Vm::(run) vmId=`2dee662a-ba8f-4a26-834f-1ccdce1158a9`::Failed to migrate Traceback (most recent call last): File "/usr/share/vdsm/vm.py", line 305, in run self._startUnderlyingMigration() File "/usr/share/vdsm/vm.py", line 341, in _startUnderlyingMigration response['status']['message']) RuntimeError: migration destination error: Error creating the requested VM }}}
Created attachment 806391 [details] vdsm.log (VM migration)
from vdsm's point of view it seems that the cloud-init is explicitly requested by engine (vmCreate received additional payload openstack/latest/meta_data.json) - need someone from engine side to look into why is this being sent in the create command without user's explicit request
cloud init is used on first run of vm with linux-type os. this is done to be parallel to vms with windows os, which on first run attach the sysprep floppy. on second run this should not happen. currently it looks useless, as cloud-init info can be set only on run-once, but WIP to save this info with the vm/template just as sysprep. unless im wrong (the cd is attached also on next runs), or you don't agree, we can close this bug as not a bug.
well, it's still wrong though, we should not send the image on regular Run even on the first run as there is no configuration (and we indeed send a sort of empty config for cloud-init) indeed on second run it's not being sent would be nice to fix since this is a new feature and such a CD might be quite surprising
Verified in rhevm-3.3.0-0.35.beta1.el6ev.noarch (is24). Verification steps: 1. Create new RHEL 6 VM `vm-rhel6` with a bootable disk. 2. Run the VM. 3. Check the qemu process on the host for attached cloud-init cdrom image file. Results: no cloud-init cdrom image is attached (`ps aux | grep '[q]emu.*vm-rhel6' | sed 's/ /\n/g' | grep /var/run/vdsm/payload` returns nothing).
Closing - RHEV 3.3 Released