Moving .vbox and .vdi files

Setup with Virtualbox 4.2/4.3

  • Copy VM.vbox and VM.vdi to the new location/system
D:\VM>dir m:\vm\ns1
 Verzeichnis von m:\vm\ns1
02.07.2014  10:36    <DIR>          Logs
02.07.2014  10:36             9.003 ns1.vbox
02.07.2014  10:44    37.985.845.248 ns1.vdi

 

  • Change ns1.vbox file to reflect the changed ns1.vdi location
Change  location="D:/VM/ns1/ns1.vdi" to location="M:/VM/ns1/ns1.vdi"
  <Machine uuid="{1313b9af-1ecd-4c11-8d5e-024c3cd4e04d}" name="NameServer" OSType="Oracle_64"
        <HardDisk uuid="{857cbab7-aa01-4795-8186-743655d098be}" location="M:/VM/ns1/ns1.vdi" format="VDI" type="Normal"/>

 

  • Remove the VM: Maschine -> Remvoe – but don’t delete the VDI file
  • Add a NEW VM:   Maschine -> Add and selecting  the copied VBox file M:/VM/ns1/ns1.vbox
  • Check that new .vdi file is used in the VirtualBox manager:   M:\VM\ns1\ns1.vdi
  • Verify Config File and VDI File settings
D:\VM> VBoxManage showvminfo ns1
Name:            ns1
Groups:          /
Guest OS:        Oracle (64-bit)
UUID:            c173da78-3e4c-45ea-b140-2e69f783ce10
Config file:     M:\VM\NS1\ns1.vbox
Snapshot folder: M:\VM\NS1\Snapshots
Log folder:      M:\VM\NS1\Logs
..
IDE (0, 0): Empty
SATA (0, 0): M:\VM\NS1\ns1.vdi (UUID: 9a03ce8e-e547-44c0-8a9a-655317db447e)
  • Boot the new VM

Reference

Leave a Reply

Your email address will not be published. Required fields are marked *