Red Hat Bugzilla – Bug 1014194
[ovirt-engine-backend] cloud-init fake-cdrom is attached even during normal Run action
Last modified: 2014-01-21 17:28:41 EST
Created attachment 805987 [details]
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
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. have rhevm33/is17
2. create a rhel 6 x86_64 vm with a disk (1gb)
3. run vm
cloud-init iso is attached
cloud-init iso should be attached only when explicitly requested by run once
Related problem also happens during migration of such a VM (with attached cloud-init image).
1. follow steps in comment#0
2. migrate the VM
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
File "/usr/share/vdsm/vm.py", line 341, in _startUnderlyingMigration
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).
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