Convert VirtualDisk to PhysicalDisk

This is for discussing general topics about how to use VirtualBox.
hamoo
Posts: 4
Joined: 26. Mar 2019, 18:49

Convert VirtualDisk to PhysicalDisk

Post by hamoo »

everyone wants to take their boot material to virtualization, but i want to do the contrapositive, which is to take my virtual machine and make it real. how do i image my virtual machine onto a physical partition ?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Copy/Clone physical partition into virtual hard disk

Post by mpack »

Run a disk imaging tool inside the virtual PC, same as you'd do with any other PC.
hamoo
Posts: 4
Joined: 26. Mar 2019, 18:49

Re: Copy/Clone physical partition into virtual hard disk

Post by hamoo »

mpack wrote:Run a disk imaging tool inside the virtual PC, same as you'd do with any other PC.
i would like to say something derogatory here, but the forum rules prohibit me from expressing my thoughts. i am of the understanding that the virtual machine's hard drive is only a file in the host system. if this is the case, then how, exactly is that going to work ? i believe "same as you'd do with any other pc" is misleading. i have absolutely no issues with creating an image disk the old way, but i don't believe that, because of the hard drive mapping and access, it will be anywhere close to being the 'same'

it is possible that you may be able to reimage the image back to the machine, but it will definitely not reimage the image to a blank partition on the host drive. would you care to provide more information, because i'm not picking up what you are putting down
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Copy/Clone physical partition into virtual hard disk

Post by mpack »

What would you use as the target drive when imaging a physical PC? I assume you would use a USB drive, or a network drive. Do that.

Also I said to image the drive. Not a partition.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Convert VirtualDisk to PhysicalDisk

Post by socratis »

@hamoo
You posted on two threads, one from 2009 (viewtopic.php?f=1&t=12785) and one from 2011 (viewtopic.php?f=7&t=39239). I have removed the duplicate post from the 2011 thread, since mpack already replied to you on this thread.

And I've split your posts and mpack's replies to a new thread. It's easy enough to create your own, new thread, no need to wake up the dead... Especially if the dead thread was talking about the opposite problem to begin with...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Convert VirtualDisk to PhysicalDisk

Post by BillG »

Just as well you did not make that derogatory remark and reveal your own ignorance.

If you run a disk imaging program within a vm, it will image the hard drive of that vm. The fact that it looks like a file on your host machine to you makes no difference at all. All that matters is that the OS and the software inside the vm sees it as a hard drive, and the image it creates can be transferred to a physical hard drive.
Bill
hamoo
Posts: 4
Joined: 26. Mar 2019, 18:49

Re: Convert VirtualDisk to PhysicalDisk

Post by hamoo »

i need clarification as clear as an unmuddied lake, billg. as clear as an azure sky of deepest summer. i need everything to be laid out like you're writing an english paper for your composition class, otherwise known as a walkthrough
  1. i have iso install images. i do not have usb or dvd. i vm the iso using virtualbox and the operating system runs. it runs on a virtual drive; /dev/sda
  2. when i tell it to install, it will only install on /dev/sda. however, i want it to install to nvme0n1p2. this is not an option.
    this defeats the purpose of having a vm. i mean, wtf use is it if i can't use it to install operating systems ? this is a dead end
  3. there is a file on my physical drive, a .vdi
    i can not image the .vdi to nvme0n1p2. there are no topics on how to do this. if i can not run the iso and install to a local drive, or copy the image to a local drive, then this is a dead end
  4. i get a not just lame, but very lame and ambiguous reply to my post telling me to use an imaging program. like, 'duh'. i download the clonezilla iso and virtualbox it. it is running, but can not see the .vdi file, nor can it see the nvme0n1p2 partition. it only sees /dev/sda which has no images on it. as i foresaw this coming, i was actually not disappointed. this is a dead end
  5. i am looking for a walkthrough on virtualbox.org or some useful suggestions. there should be a whole chapter on how to reimage .vdi files to disk, or how to install an operating system to disk, but there isn't one.
  6. i am not running operating systems from virtual box. it's dysfunctional. i can not read the tiny icons and text inside the small box. i can not even use the copy / paste feature, even though i installed the right packages and enabled bidirectional mouse use. i can not install devices to the virtual box. virtualbox runs the iso images that i give it, but i need to move beyond this. and clonezilla is not even able to create a bootable usb in virtualbox
i need to either:
  1. be able to use the install iso to install to my desktop computer, or
  2. be able to reimage the .vdi to a physical partition and add that partition to grub for a boot option
are you picking up what i'm putting down billg ?
Last edited by socratis on 28. Mar 2019, 07:53, edited 1 time in total.
Reason: Fixed formatting.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Convert VirtualDisk to PhysicalDisk

Post by BillG »

Frankly, no. More words do not amount to more clarity, unfortunately. And it really has very little in common with your original post.

I am not at all familiar with Linux, so I will bow out.
Last edited by BillG on 29. Mar 2019, 03:03, edited 1 time in total.
Bill
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Convert VirtualDisk to PhysicalDisk

Post by mpack »

My first response was a short and precise answer to the question posed. It was in no sense ambiguous.

Listen. I'm trying to ignore your rudeness, but you are not making it easy. Keep it up and you'll end up banned, with no answer.

Next. The fact that a simple answer from an expert threw you should make it obvious that your understanding differs from that of the expert. I.e. you have invalid preconceptions that interfere with your understanding of both the problem and solution. Your reaction should have been to reconsider your own understanding, not question that of the expert.

Finally. I'm a Scot. We can use florid language too if we care to, but we usually don't. We prize simple, direct language instead. If you want a longer answer, ask a more difficult question.
hamoo
Posts: 4
Joined: 26. Mar 2019, 18:49

Re: Convert VirtualDisk to PhysicalDisk

Post by hamoo »

i have resigned myself to the fact that i will have to create a real bootable usb clonezilla device then create another bootable usb device for the install iso. it's a lot more work because now i have to juggle usb sticks, but i believe there is an old western idiom about "cutting corners". i should never have tried to use a tool to circumvent the paradigm
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Convert VirtualDisk to PhysicalDisk

Post by BillG »

What really confuses me it the opening statement of the original post - everyone wants to take their boot material to virtualization.

It sounds impressive (and quite interesting) but I don't even know what the statement means. I have been using vms for more years than I care to remember and I have never heard any mention of virtualizing boot material. What am I missing here?
Bill
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Convert VirtualDisk to PhysicalDisk

Post by socratis »

BillG wrote:It sounds impressive (and quite interesting) but I don't even know what the statement means
It means Physical-to-Virtual. That's where the OP posted in the beginning, a P2V thread, but they seem to be interested in the opposite, a V2P, Virtual-to-Physical, far more complex.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Convert VirtualDisk to PhysicalDisk

Post by mpack »

socratis wrote:far more complex.
? I'm not sure why you say that. Migration is migration. The complexity is the same both ways. Even the methods are often the same.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Convert VirtualDisk to PhysicalDisk

Post by socratis »

mpack wrote:The complexity is the same both ways. Even the methods are often the same.
Not really. If I want to go P2V, all I have to do for example, is:
  • 
    sudo VBoxManage convertfromraw /dev/disk<N> "MyPhysicalDeviceConverted.vdi"
Done. Now build a VM around the VDI and you're good to go.

Can't say that I've seen such an easy conversion for the V2P case, unless I'm missing something...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Convert VirtualDisk to PhysicalDisk

Post by mpack »

That is not a migration, that's just one kind of copying step (and a questionable choice I'd say: why go for a dumb imager when smart options such as Disk2VHD exist?).

Migration refers to the entire task of moving an OS image from one hardware platform to another and then dealing with the hardware driver issues. You have those same issues whether the mode is P2V, V2P, V2V or P2P.

For many years I upgraded my PC hardware and then migrated (P2P) my current XP Pro image onto the new hardware so I wouldn't have to reinstall anything or retune all my registry tweaks. To me it's just migration, I don't attach special significance to "moving what to what". Certainly XP had no special preference for types of hardware, provided it met the specs.
Post Reply