Score:1

How to clone a virtual machine (.vdi) to a physical system?

US flag

I've spent 3 weeks trying to solve this, but to no avail. I'm aware of the many posts on this topics.

I've already read and tried at least:

Migrate from a virtual machine (VM) to a physical system
Convert VirtualBox (VM) Machine TO Physical Drive
DD tutorial - how to clone, backup and restore disks and partitions
restore using dd will not boot

I've created a lubuntu 20.04 with certain packages and files in a VM. But I can't install it into a physical laptop (need to make many identical laptops with same configs). I can wipe all drives so I don't need to worry about dual boot.

Steps I've taken: VM system: virtual box 7.0 (created a lubuntu 20.04), 10Gb
Laptop system: 125Gb (want to install lubuntu 20.04 with files/packages)

  1. Created a lubuntu VM with fixed partition (not dynamic allocation)
  2. I've created an .img and tried both with VBoxManage... and dd within the VM.
  3. Booted into a Live usb installed lubuntu on the laptop disk then dd the img file into sda (the disk not sda1)

When I run lsblk the boot partition is missing unlike the results of Convert VirtualBox (VM) Machine TO Physical Drive.

  1. I've tried to offset and install the MBR but the VM does not have a boot partition only sda1
  2. I've tried install-mbr (but not in depth)

At this point and age I feel that this is important enough that there's a tool. It looks like that this question has been asked for over a decade.

Thanks : )

in flag
This plan seems suboptimal for a number of reasons. A tool like [FAI](https://fai-project.org/) will make rapid deployments (and device reassignments) child’s play while also taking into account device-specific drivers that need to be installed on different models of hardware. Cloning a VBox image will just lead to excessive post-image work to clean up the remnants of the VM intermediary layer
C.S.Cameron avatar
cn flag
As I recall, you need to start VBox before using the `VBoxManage clonemedium` command.
Score:1
us flag

I have done it successfully on a non-UEFI machine (not claiming that it won't work on a UEFI machine, I just haven't tried it).

I used my go-to tool for such things, Clonezilla. I booted the VM using a Clonezilla .iso and cloned the disk to a shared drive on my server.

I then booted the physical machine using a Clonezilla thumbdrive and restored the clone off the server.

It worked fine. I did go in and remove the Guest Additions from the physical machine by going to /opt/VBoxGuestAdditions-(version) and running the uninstall.sh with sudo. (Guest Additions were causing a message to appear somewhere - I forget the details) I probably could have done that before cloning had I thought of it.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.