Occasionally the while loop can exit with no data (Probably recieving an EOF) before receiveing CMDline data from the certial port. Continue looping until cmdline is populated

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
CLOUDSTACK-7412: Can't create proper template from VM on S3 secondary storage environment

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>