VMware Communities
monkeymoon
Contributor
Contributor

booting on a physical drive (installation made with Workstation 15.5.6)

hi

i would like to understand something about boot efi

i made a virtual machine debian with workstation pro 15.5.6 on a physical hard drive (usb3 key 32G)

i tried to boot on it on my netbook, the key appears in the boot options but won't start

is there something to do ?

thanks for reply

Reply
0 Kudos
13 Replies
Alex_Romeo
Leadership
Leadership

Hi,

Sure! it does not work like this.

You cannot run a virtual machine when booting a physical machine. To run a virtual machine you always need a virtualizer, in your case wmware workstation.

Using EFI/UEFI firmware in a VMware Virtual Machine

ARomeo

Blog: https://www.aleadmin.it/
Reply
0 Kudos
monkeymoon
Contributor
Contributor

thanks for reply

it seems to me that i did that some years ago with mbr disk, but perhaps i made a mistake in my memory

so is there a solution to simply modify the disk to make it run on a netbook ?

Reply
0 Kudos
monkeymoon
Contributor
Contributor

thanks for the documentation

i would just like to say that it's not a vmdk file, the installation and the partitions seems to be like on a physical machine

i have just made an experiment, i booted with supergrub and i manage to boot on this key

so perhaps it's possible to boot with just by modifying something in the efi partition ?

Reply
0 Kudos
Mits2020
Hot Shot
Hot Shot

It seems to me that all information provided by VMware regarding V2P is rather outdated (6+ years old). In addition, the legalese in the Note of this VMware Knowledge Base article is quite frightening. Could some Moderator please enlighten us whether V2P is some sort of a taboo issue (and perhaps a non-desirable topic to raise in this Community) and whether performing V2P is actually legal or not and under which circumstances?

Reply
0 Kudos
Alex_Romeo
Leadership
Leadership

I only recommended reading those posts. I have not added actions to do.

I don't think there is anything else to add.

ARomeo

Blog: https://www.aleadmin.it/
Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

It’s not for moderators to say one way or another. We “police” what we know is illegal, such as running MacOS on a Windows PC with a hacked copy of Workstation, but I personally see no reason for us to get involved in this topic - perhaps another moderator will think differently though.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
monkeymoon
Contributor
Contributor

sorry, i didn't know it was illegal

it was just a question to make an experiment

it's true that nowodays, virtualization is probably sufficent in most of case

so it's not a problem at all

thanks for your answers

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

I did not say what you were trying to do was illegal, my reply was not to your comment but to user Mits2020.

Many years ago I was a technical trainer and used to teach my students on a product Platespin PowerConvert, it was a P2V tool that also supported V2P - it definitely was not illegal back then.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
dariusd
VMware Employee
VMware Employee

Wow, what a confusing thread!

It sounds like you have created a VM in Workstation, then attached a physical USB stick to the VM, booted the Debian installer inside the VM and installed it to the USB stick, and you are now trying to boot that installed OS directly on a physical machine, is that correct?

The USB stick should generally be bootable on a physical PC too.  The part that is most likely to cause trouble is the EFI Boot Configuration.  You might need to go into your physical host's firmware setup and add a Boot Option to use the correct bootloader.

Here's what happens:

The EFI specification defines a "removable media" boot path, which is EFI\BOOT\BOOTX64.EFI for the more common 64-bit x64-compatible EFI firmware and is EFI\BOOT\BOOTIA32.EFI for the less-common 32-bit x86-compatible EFI firmware.

The "removable media" boot path is usually only used to boot OS installers from CD/DVD/USB.  The expectation is that the OS installer will then configure the system's EFI firmware to boot from the installed OS (on your hard disk's EFI\Microsoft\winload.efi or EFI\Debian\grubx64.efi or whatever), and that firmware configuration will be used for future installations.

The problem with what you are doing is that only the virtual machine's firmware has been configured to boot from your USB drive's EFI\Debian\grubx64.efi (or similar)... the host on which you are running does not know how to find the bootloader.  When the USB stick shows up in the boot menu, the system is most likely only going to look in the "removable media" path (EFI\BOOT\BOOTX64.EFI or EFI\BOOT\BOOTIA32.EFI) on the USB drive, and there will probably be nothing at that location... after all, it is often only present on OS installation media.

This is an architectural quirk of EFI firmware... It did not happen with MBR disks, but that was because MBR disks lacked any sensible mechanism for allowing the machine owner to choose between multiple bootloaders for different OSes.  It is not unique to virtual-to-physical migrations – It is going to become a common problem when moving EFI-installed OSes from one system to another.

Your host's firmware may have an option to do a one-off boot from a specific file on the USB drive (in which case you can point it to some bootloader in EFI\Debian) or it might even allow you to add your own boot option so that the machine can boot from that drive "automatically" in future.

Another possibility: If you can get Debian to boot on that host (either using an OS installer booted in EFI mode or using another bootloader or an EFI Shell), is to use the efibootmgr tool inside Debian to reconfigure the host's firmware with the correct boot path.

More recent versions of the EFI specification allow for an OS to install its own bootloader in the removable media boot path, which allows the system firmware to automatically detect and boot the OS in situations like this one, but at the cost of once again making things uncertain when there are multiple OSes installed on one hard disk, just like it was back in the days of MBR disks with only one default boot record.

Hope this helps!

--

Darius

Reply
0 Kudos
dariusd
VMware Employee
VMware Employee

This is not a legal opinion, just my personal thoughts on the matter:

I don't feel there is any taboo around V2P.

BUT: To the best of my knowledge we do not test VMware Tools on physical machines, and because of the hypervisor-specific way in which VMware Tools and guest components do their work, there is a risk of unintended consequences if they are run on a physical machine, up to and including causing a malfunction of hardware attached to the host or a malfunction of the operating system itself, either of which could cause data loss or other harm.  There could be licensing concerns for some OSes and applications.  There may be other aspects of the OS's configuration which are suitable for the virtual machine environment but which are not suitable for a physical environment, and remediating all of those during the V2P migration could be challenging.  There might be other things I'm not even aware of.

I would be OK with trying V2P as an experiment (and, for a Linux guest, I would not anticipate any explosions, nor hordes of lawyers descending) and have previously done this sort of "V2P migration via USB stick" for Linux and for ESXi, but I personally would not contemplate doing an ad-hoc V2P for a customer's production environment.

--

Darius

Reply
0 Kudos
monkeymoon
Contributor
Contributor

thanks a lot for your explanations, it's really clear

i will give a try to "efibootmgr" wich it's probably the best solution

i'm not a professionnal, so for me it's just a way to experiment for fun

i thought that perhaps it could be an easier way to install an OS on a usb stick (without the vmwaretools...)

thanks again

monk

Reply
0 Kudos
Mits2020
Hot Shot
Hot Shot

Very informative and well articulated answer, dariusd​, thank you very much!

Reply
0 Kudos