VMware Communities
raywood
Enthusiast
Enthusiast
Jump to solution

Error while powering on: The physical drive is already in use

I am using Player 15.5.7 on a Windows 10 host. The guest is Ubuntu 21.04. I am trying to add a physical drive (USB flash) as a second hard drive within the VM. The USB drive contains a multipartitioned bootable (not live) Ubuntu 21.04 installation. The purpose of this exercise is to use commands (e.g., dd) and tools (e.g., Systemback) installed on the USB drive to make images and clones of the guest system when it is not running.

A previous answer suggests that using a physical disk in a VM requires that no drive letters be assigned. This is not a problem: Windows diligently reminds me, every time I plug in the Ubuntu USB drive, that it must reformat that drive before it can assign drive letters. The previous answer also states that the disk should be flagged as offline in diskmgmt.msc. This is apparently not an option for a Linux drive.

I can set up the USB drive as a second hard drive in Player's Settings, assigned to PhysicalDrive4 (its entry in diskmgmt.msc). But when I run the VM, I get this:

Error while powering on: The physical drive is already in use

Cannot open the disk 'W:\Ubuntu-0.vmdk' or one of the snapshot disks it depends on.

Module 'Disk' power on failed.

Failed to start the virtual machine.

Reply
0 Kudos
1 Solution

Accepted Solutions
bluefirestorm
Champion
Champion
Jump to solution

I am not sure if this will help what you are trying to achieve. You could also have a writeable ISO mounted as a USB device of the VM.

Have a look at this thread/post.

https://communities.vmware.com/t5/VMware-Workstation-Pro/Idea-Feature-Suggestion-Useful-to-have-vmdk...

In the same thread, there is also a method to mount VMDK as a USB device (but this is probably not what you want).

View solution in original post

11 Replies
RaSystemlord
Expert
Expert
Jump to solution

I cannot answer your question, but the purpose interest me.

If you want to "make a clone of the guest when it is not running", why don't you just use Windows robocopy to create, in a reliable manner, an identical copy (which can be called a clone)? It stops being identical when you open it and answer "I copied it". When you run it, it also stops being identical, for networking purposes, if you don't have a static network configuration - otherwise, it will be indentical for networking ... which behavior you may or may not want to achieve.

I think that a reliable OS copy is more reliable than "dd", which does not handle possible disk errors.

But yeah, you might mean something else altogether?

Reply
0 Kudos
raywood
Enthusiast
Enthusiast
Jump to solution

Thanks for your reply.

For more on the purpose, see https://raywoodcockslatest.wordpress.com/2021/08/18/vmware-v2p. Basically, this is a V2P effort. I can't see my original message in this reply page; not sure if my question stated that explicitly.

I wasn't aware that Windows robocopy could clone the Linux guest's ext4 or swap partitions as a solution internal to the VM. Most Windows tools seem unable to see such filesystems. But without the desired physical drive solution, I would still need to run Windows from an ISO inside the VM to run its robocopy command against the VM's Ubuntu installation. I don't have a bootable Windows ISO, but I welcome links to good guidance on how to create one.

Maybe you mean that I should run robocopy in the Windows host, as an external solution. That would copy the VM. But I don't believe that would get me any closer to creating a bootable Linux ISO or physical clone of the VM.

Reply
0 Kudos
RaSystemlord
Expert
Expert
Jump to solution

@raywood 

I meant strictly the latter. However, your term "physical clone of the VM", only now got my attention. You meant to achieve a physical computer, which meaning I missed. I don't know what a generic solution to that would be. However, back in the day, I created physical computers into a bootable CD/DVD (where bootable ISO was the intermediate step, if I remember right), using Puppy Linux distro. It had "mastering" built in. On top of that, you could use more extreme editors for changing the "boot initialization files" (for instance control what the OS loads initially). I haven't seen such mastering anywhere else. Puppy Linux is still there with many different variations (where Ubuntu compatible version is one of them). Maybe you can Master a Puppy Linux ISO with Ubuntu software, too - not sure - barebone, Puppy, sure it can be Mastered.

The above doesn't obviously give you Ubuntu Linux mastered version.

As for Windows ISOs, you can freely download them from Microsoft. For activation you need a license, but almost everything works without activation (on Windows 10).

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

Sounds like the disk is mounted by Windows anyways, even while it cannot read the partition... and if you can't set it as "off line" then I"m not sure if there's anything you can do about it.

Perhaps you can set it to be assigned to the VM automatically... I'm not sure how helpful that would be as that setting is AFAICR per host.
The "use a USB disk to access physically from a VM via a (RDM) raw device mapping" is a bit of an exercise that is bound to be a painful one.

Our forum's expert @continuum might have some ideas about it.
He certainly is the one who can give you tips for the P2V/V2P scenario, if he has the time.

I'd say that his old live CDs would be the better option here.

https://sanbarrow.com/moa.html

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
raywood
Enthusiast
Enthusiast
Jump to solution

I think you guys are right. Having glanced at those old live CDs, it does seem that this may require remastering. I know the word. I know less of what it might entail. It could get out of my depth pretty quickly.

I think the only bootable ISOs from Microsoft are installers, not systems ready-to-run.

It appears the best step at this point may be to retry with the Ubuntu VM on a Linux host. At least there won't be the problem that the host prevents the VM from seeing the physical drive.

Thanks for your quick replies and suggestions.

Reply
0 Kudos
RaSystemlord
Expert
Expert
Jump to solution

@raywood 

OK, your target is actually a mastered live-Ubuntu version. I can see many different possibilities in this:

a) Edit the current Ubuntu ISO. Not sure how this is going to work - not in my expertise at all. Anyway, Ubuntu ISO is both: live and installable.

b) Use a project which was said to be "How you create your own Linux distro from scratch". I haven't tried that, but the idea seems relevant. Not sure if they are targeting from both live and installable.

c) Use some other distro, which is really targeted for live use. Ubuntu live is only so and so compared to Puppy Linux. In comparison, Ubuntu live is very slow and cumbersome. Puppy is lightning fast on any computer, because it works from RAM and is very small to load. Ubuntu live uses the media a lot - obviously, if USB-3 is supported, Ubuntu live might be bearable, with a slow media, it is not.

With a live distro, you also have the problem how you save your data from a live session. Puppy has that all figured out with many possibilities. (One being that the boot media is completely safe from outside hacks). In my remastering, I was also shielding the computer hard disks from the Puppy live user.

I'm very disappointed with current Ubuntu versions from the perspective of an average or newbie user ... they don't even try to fix (within same LTS version anyway) obvious bugs and missing functionality that was there with previous versions and there any many such things. So, depending on your audience, a different distro might be better.

Puppy has its shortcomings, like, in short, a missing user-model, but I'm not sure if any of that matters on a live-boot (every user can have their own boot media anyway, as one example).

d) Not sure if the Ubuntu VM is the correct source. It is NOT working on the physical computer, but on VMware - for instance, all the drivers are wrong. Not really my expertise, but that seems to be the case. So, that's why I didn't first understand that you are trying to create a physical-computer-compatible boot from a VM-computer.

(And yes, sorry, my reference to Microsoft ISOs was installation ISOs, so a wrong reference.)

Reply
0 Kudos
raywood
Enthusiast
Enthusiast
Jump to solution

You're right - I have noticed Puppy responsiveness. But I'm using a fast USB flash drive or SSD via USB 3.2, so it's tolerable.

Clones of the Ubuntu VM are operating OK so far on my laptop. But I haven't demanded much of them yet. We'll see how they fare with continued use.

It's Ubuntu for now, just because there's a relatively wealth of community support. At least until I work out the kinks, I'd rather minimize the instances of posting questions, when I'm stumped, and getting no replies.

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,


@raywood wrote:

I think the only bootable ISOs from Microsoft are installers, not systems ready-to-run.

Almost... there's WinPE and that's ready to run.

This is what the old BART PE CD's imitated and I think also what Ulli used for the MOA CD's.

For more on WinPE: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-intro

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
bluefirestorm
Champion
Champion
Jump to solution

I am not sure if this will help what you are trying to achieve. You could also have a writeable ISO mounted as a USB device of the VM.

Have a look at this thread/post.

https://communities.vmware.com/t5/VMware-Workstation-Pro/Idea-Feature-Suggestion-Useful-to-have-vmdk...

In the same thread, there is also a method to mount VMDK as a USB device (but this is probably not what you want).

raywood
Enthusiast
Enthusiast
Jump to solution

That VMDK suggestion is interesting. It sounds like the reverse of what I was looking for, but to the same effect.

I was looking for a way to run a physical USB drive as an interloper, a temporary intrusion to run commands (in e.g., Lubuntu) against the VM's primary (in my case, Ubuntu) installation.

As I understand it, the VMDK suggestion is (or at least could be) to run (in my example) a Lubuntu VM, then mount the target (Ubuntu) VMDK as a USB drive. Different approach, same effect: I could run a command or tool in Lubuntu to clone the target VMDK to a separate drive or folder.

I will look into this. Thanks for the suggestion.

Reply
0 Kudos
raywood
Enthusiast
Enthusiast
Jump to solution

Update: I have looked into it. It works. See my writeup.

Reply
0 Kudos