[vbox-dev] VM Migration

James Lucas jimmy at secsme.org.au
Thu Sep 17 08:13:46 GMT 2009


Hi Klaus,

I wasn't able to see in the documentation about moving snapshots etc in 
the documentation, however thank you very much for your response because 
you at least let me know it was possible and today I was able to get out 
environment to warm migrate virtual machines between hosts without the 
need to shut them down. Please correct me if there is a easier better 
way to do this but this is how I got it working (for all those that want 
to do something similar).

vmname running on host 1 with VBoxHeadless

On Host 1
-----
# VBoxManage controlvm <vmname> savestate
... state must be copied to the second host first before discarding it 
on first host. If save state is on a shared storage server then you just 
need to make a copy of the file
# scp <snapshotfolder>/{SAVE STATE UUID}.sav newmachine:<snapshotfolder>
# VBoxManage discardstate <vmname>
... unregister harddrives and close media
# VBoxManage unregistervm <vmname>

On Host 2
----
# VBoxManage registervm <vm.xml>
... open and attach hard drives
... modify vrdp port if there is another vm on the old/default port. 
Make modification before adopting saved state otherwise machine will 
abort on restart
# VBoxManage modifyvm <vmname> --vrdpport <newrdpport>
# VBoxManage adoptstate <vmname> <snapshotfolder>/{SAVE STATE UUID}.sav
# VBoxHeadless -s <vmname>


Klaus Espenlaub wrote:
> James Lucas wrote:
>> Sun currently advertises a Suspend/Resume migration for Virtual Box 
>> hosts
>> enabling you to move a Virtual machine without powering it off (They use
>> Shutdown/Restart to describe cold migration).
>> http://wikis.sun.com/display/VDI3dot1/VDI+3.1+Release+Notes
>
> It's playing clever tricks with snapshots.
>
>> Can someone from Sun please detail how this is currently achieved? I 
>> know this
>> isn't the new Live Migration feature being worked on, this is something
>> different and has appear in Sun blogs and now the VDI documentation 
>> without
>> similar documentation on the Virtual Box side explaining how do do it.
>
> The documentation is all there, it mentions how to associate a 
> snapshot with an existing VM. In the VDI context this is all pretty 
> straightforward with the information on a separate storage server, but 
> that's all ifs and buts in the generic context. There are lots of 
> pitfalls, and having a generic description of the manual would add 
> many pages of which most readers won't understand a word.
>
> Klaus


--
UTS CRICOS Provider Code:  00099F
DISCLAIMER: This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.  If
you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly, and
with authority, states them to be the views the University of Technology,
Sydney. Before opening any attachments, please check them for viruses and
defects.




More information about the vbox-dev mailing list