This rather odd error is happening during a scripted mirror/start/suspend process.
I am developing a script to mirror (using rsync) a virtual machine to a remote server, then connecting to the remote server and resuming the virtual machine. Basically I do the following:
suspend
rsync to remote
resume
remote: start
remote: answer questions
remote: suspend
remote: rsync live backup
Typically ... there are two questions that needs answering before the virutal machine can be resumed:
The VM has been moved, what do you want to do about the UUID one, and one about the processor features not being the same. I have some perl code that executes after the inital start instruction which loops and picks up the pending questions, does a text match on the question text and auto-answers with the appropriate answer.
I have tested this and it has been working fine, but in last nights actual backup run when it tries to answer the first question about the VM having moved and creating a new UUID or not it errors. Here is what the perl code is doing (error checks removed for compactness):
my $q = $vm->get_pending_question();
my @choices = $q->get_choices();
print "Question:\n\n" . $text . "\n\n";
for (my $i = 0; $i <= $#choices; $i++) {
print "\t" . ($i + 1) . ". $choices\[$i]\n";
}[/i]
The location of this virtual machine's configuration file has changed since it was last powered on.
If the virtual machine has been copied, you should create a new unique identifier (UUID). If it has been moved, you should keep its old identifier.
If you are not sure, create a new identifier.
What do you want to do?
1. Cancel
2. Create
3. Keep
4. Always Create
5. Always Keep
The perl code then works out which answer to give, in this case its 2
then it calls:
$op_ok = $vm->answer_question($q, $answer-1);
unless ($op_ok) {
my ($err, $errstr) = $vm->get_last_error();
undef $vm;
die "Could not answer pending question; error $err: $errstr\n";
}[/i]
but $vm->answer_question($q, $answer-1);[/b] is failing with:
-16: Virtual machine requires user input to continue
Which seems a silly error for it to be returning - as I know the VM needs user input, that's why I am calling answer_question() in the first place.