sethostname cause reboot make sysprep failed and vm crashed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloudbase-init |
Incomplete
|
Undecided
|
Adrian Vladu |
Bug Description
I have read cloudbase-init source code, I found it will work until "HKEY_LOCAL_
sysprep process:
finish making image,then run sysprep.exe /oobe /generalize /shutdown /unattend:
because I have installed cloudbase-init, it start when SysprepStatus is 7, In this moment, sysprep is working and cloudbase-init is working too, when cloudbase-init finish running sethostname plugin, it will reboot vm, but this moment, sysprep is doing important system setting. So the VM will crash.
environment:
vm: windows 2012 R2 64bit, installed cloudbase-init (2014.12.08)
host: RHEL 6.4 64bit
I propose a way to solve this problem, set a flag in a flag_file, if flag_file is not exist or the content is 0, cloudbase-init should not run. set the flag 1, and cloudbase-init stop. if flag is 1, It can work. I have modify the source code:
def wait_for_
path = CONF.sysprep_
print path
is_exist = os.path.
if not is_exist:
try:
fp = os.open(path, os.O_CREAT | os.O_RDWR)
except Exception, e:
return -1
else:
try:
fp = os.open(path, os.O_RDWR)
except Exception, e:
if data == "0":
else:
description: | updated |
Changed in cloudbase-init: | |
status: | Incomplete → Opinion |
Changed in cloudbase-init: | |
status: | Opinion → Incomplete |
thanks for the report, we're checking it