Results 1 to 3 of 3

Thread: Prepare a system in a VM, then move it to a real machine?

  1. #1
    Join Date
    Oct 2009
    Location
    England
    Beans
    47
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Question Prepare a system in a VM, then move it to a real machine?

    Hi,

    I basically want to do this:

    1. Install an Ubuntu Server system in a VM.
    2. Set up all the required packages and options.
    3. Move the VM partition to a physical partition on a real server.

    Can this be done? I have Googled around for an answer but most the answers I find are disappointing or plain ludicrous.

    The VirtualBox manual offers no help.

    Any help much appreciated!

  2. #2
    Join Date
    Jun 2012
    Beans
    6

    Re: Prepare a system in a VM, then move it to a real machine?

    Hello,

    there are some experimental features of vboxmanage: type in your terminal 'vboxmanage internalcommands' and you find useful commands like 'createrawvmdk' and 'converttoraw' that should help you.

    At the moment I don't find converttoraw in the manual, but maybe you have more luck. Otherwise, you can use createrawvmdk to get access on a physical hard disk, and copy your files.

    You may have problems with the rights to get access; one possibility to solve them is to get member of the group 'disk'. But you shouldn't be member of 'disk' all time, it's not sure.

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Prepare a system in a VM, then move it to a real machine?

    I'd use rsync after you've created the machine image you want.

    Start by installing the identical version of Ubuntu on the new machine. Make sure the image is up-to-date by running:
    Code:
    sudo apt-get update
    sudo apt-get upgrade
    after installation.

    Now make sure you can see the new machine over the network from inside the VM. Make sure it's also up-to-date then transfer the files by running:

    Code:
    cd /
    sudo apt-get update
    sudo apt-get upgrade
    sudo rsync -av . newserver_ip_address:/
    All the files in the VM will be copied over to the new server. I'd probably exclude /boot and the transient directories like /proc and /sys by using

    Code:
    sudo rsync -av . newserver_ip_address:/ --exclude=/boot --exclude=/proc --exclude=/sys
    Last edited by SeijiSensei; June 21st, 2012 at 03:20 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •