<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi All,<br><br>I made the updates based on the suggestions ... with those updates, teleporting any VM has been working reliably in all scenarios regardless of load or performance of the source and target systems.<br><br>An observation I have made:  The 'teleporterEnabled' flag is still set on the 'source' VM.  I'm guessing it would be my responsibility to reset that flag.  Hmmm ... not a big deal ... I can do that.<br><br>The interesting part however is:  The target machine, once it is shut-down (at any point after it was teleported), seems to believe it is still in 'to-be-teleported' mode.  Therefore, trying to start a target VM that was previously teleported shows the teleporting-in modal dialog.  At this point, the VM is not start-able.<br><br>Problem is ...
 once the teleport has happened ... I will not be able to make any updates to the target VM to reset the teleporterEnabled flag.  To do this ... it implies I would have to persist this information somehow so that after the VM is shutdown or just before an attempt to restart, try to reset the flag.  Though clunky, this would work OK with my UI ... but would still be a problem for users that use the QT UI also.<br><br>I would think the resetting of the teleporterEnabled flag on both the source and target VMs should be part of the teleport request itself if the teleport was successful.<br><br>Any suggestions on how to 'reset' the target VM teleporterEnabled flag so a restart does not cause it to want to teleport-in again ?<br><br>Am I missing something ?  Is this a bug ?<br><br><br>Thanks,<br>Joe<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new
 york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Joseph Smith <joseph1962smith@yahoo.com><br><b><span style="font-weight: bold;">To:</span></b> Knut Osmundsen <knut.osmundsen@oracle.com><br><b><span style="font-weight: bold;">Cc:</span></b> vbox-dev@virtualbox.org<br><b><span style="font-weight: bold;">Sent:</span></b> Sun, September 19, 2010 1:15:18 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [vbox-dev] SOLVED: VirtualBox Teleporting and SOAP API "waitForCompletion"<br></font><br>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hi Bird,<br><br>Thank you very much for the feedback.  Though I did read (and re-read many times) the sections you have identified, I think because I incorrectly called IProgress::waitForCompletion (-1) hoping it would come back when all was 'good-to-go' ... and it never came back ... I misunderstood what was being stated.<br><br>From your comments, if I understand correctly, I believe the correct way in a teleport scenario then is to monitor the IProgress object to ensure that the result of (IProgress::operationCount - IProgress::operation) is less-than or equal to 2 before initiating the IConsole::teleport command on the source.<br><br>Is that correct?  If you agree ... I'll modify my approach as noted above.<br><br>That said ... It seems I've been getting 'lucky' as I've not yet
 had a case where a teleport has failed (since changing to the approach I described in my earlier note).  It appears that the preparation to teleport must attain penultimate state rather quickly.<br><br><br>Thanks,<br>Joe<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Knut Osmundsen <knut.osmundsen@oracle.com><br><b><span style="font-weight: bold;">To:</span></b> Joseph Smith <joseph1962smith@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> vbox-dev@virtualbox.org<br><b><span style="font-weight: bold;">Sent:</span></b> Sun, September 19, 2010 9:55:19 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [vbox-dev] SOLVED: VirtualBox Teleporting and SOAP API "waitForCompletion"<br></font><br>
<base><br><div><div>On Sep 19, 2010, at 3:18 AM, Joseph Smith wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><div><div style="margin: 0px; font-family: times,serif; font-size: 12pt;"><div style="margin: 0px;">Hi All,<br><br>I had the chance to follow-up and do some very extensive testing and with Klaus's insight via our discussion on IRC, have found the error of my ways ... Thanks Klaus.  Your feedback was instrumental in helping me find the problem!!!<br><br>For anyone else that might be interested, I'll describe the mistake I made and outline the steps that through testing I have confirmed works every
 time.<br><br><span style="text-decoration: underline;">First:  What am I trying to do and why:</span><br>On occasion, though not often, I need to take a live host off-line (to upgrade memory, replace/change internal hardware, etc).  These live hosts can have anywhere from 9 - 15 VMs running at a time.  To take this host offline without powering-down the VMs, the VirtualBox teleport feature is ideal.  My goal then was to teleport each of the VMs from the existing host to another host (must be on the same network and have access to the same networked storage subsystem where the virtual drives are).  VBoxManage does provide a command line option to initiate the teleport request but does require coordinating the execution on both the source and target hosts.  As I have control of all the VirtualBox hosts via the SOAP Webservice APIs, I decided to automate the entire process.<br><br><span style="text-decoration: underline;">What
 I was doing wrong:</span><br>The steps I outline in the original message (see below) are actually correct except for Step #7.  The call to power-up the VM with a new Session via the IConsole object returnes a progressRef object and I assumed it was necessary to wait for completion before moving forward.  THIS IS WRONG!  In reality, the correct way to determine the VM is ready for the teleport-in step is to watch the state of the target VM and wait for the state to change to 'TELEPORTINGIN'.  Once in this state, the teleport step on the source VM can be done.<br></div></div></div></span></blockquote><div><br></div><div><span><span>If you are using IVirtualBox::openRemoteSession (renamed on trunk) it's NOT the right way either. Take a look at what <a target="_blank"
 href="http://www.virtualbox.org/sdkref/interface_i_virtual_box.html#915f7609a00e888a15cbf74aef743bcc">http://www.virtualbox.org/sdkref/interface_i_virtual_box.html#915f7609a00e888a15cbf74aef743bcc</a>  and <a target="_blank" href="http://www.virtualbox.org/sdkref/interface_i_console.html#0191f0ffb739504065c05f6e33a65a7c">http://www.virtualbox.org/sdkref/interface_i_console.html#0191f0ffb739504065c05f6e33a65a7c</a> says about teleportation. Before attempting call IConsole::teleport() you should wait for the progress object to reach the penultimate operation (IProgress::OperationCount - 2).</span></span></div></div><div><br></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><div style="word-wrap: break-word;"><div><div>-- <br><br>Kind regards / Mit freundlichen Gruessen / Vennlig hilsen,<br> bird<br><br>--<br><br>ORACLE Deutschland B.V. & Co. KG  Knut St. Osmundsen<br>Werkstrasse 24
                    Senior Staff Engineer, VirtualBox<br>71384 Weinstadt, Germany          <a rel="nofollow" ymailto="mailto:bird@sun.com" target="_blank" href="mailto:bird@sun.com">mailto:bird@sun.com</a><br><br>Hauptverwaltung: Riesstr. 25, D-80992 Muenchen<br>Registergericht: Amtsgericht Muenchen, HRA 95603<br><br>Komplementaerin: ORACLE Deutschland Verwaltung B.V.<br>Rijnzathe 6, 3454PV De Meern, Niederlande<br>Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697<br>Geschaeftsfuehrer: J. Kunz, M. van de Molen, A. van der Ven</div></div></div></span></span>
</div>
<br></div></div>
</div><br>







      </div></div>
</div><br>







      </body></html>