VM fail to run OS in raw hard disk

Discussions related to using VirtualBox on Linux hosts.
Post Reply
moderation
Posts: 3
Joined: 17. Apr 2024, 10:29

VM fail to run OS in raw hard disk

Post by moderation »

Hi, everybody

I have stuck in running VM windows in host Debian 11. Both are installed in a separate hard disk such as NVMe and SATA SSD for Debian and Windows, respectively, and each is well running from the choice in the GRUB. Now, I want to open Windows as guest in VB.
As written in manual I made vmdk file by

VBoxManage internalcommands createrawvmdk -filename /home/joonho/VirtualBox\ VMs/Windows10_2 -rawdisk /dev/sda

And mount it in VB-VM, but it looks that it cannot load the operating system, which complains that a missing OS or misconfigured boot order.
VBoxlog.zip
(35.52 KiB) Downloaded 1 time
I would be very grateful if you solve or advise my problem.

Belows are some additional information and the log file is attached.
$sudo fdisk -l --> shows shortly
Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SAMSUNG MZVLQ256HAJD-000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B501FBF6-41CC-4556-A74B-8A5BDCA1410D

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1953791 1951744 953M Linux filesystem
/dev/nvme0n1p2 1953792 21485567 19531776 9.3G Linux swap
/dev/nvme0n1p3 21485568 412110847 390625280 186.3G Linux filesystem
/dev/nvme0n1p4 412110848 498049023 85938176 41G Linux filesystem
/dev/nvme0n1p5 498049024 500117503 2068480 1010M EFI System
=== For Debian << end
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 870
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3B2DFF9C-FE1B-4D01-B4CB-8B67DA67F800

Device Start End Sectors Size Type
/dev/sda1 2048 34815 32768 16M Microsoft reserved
/dev/sda2 34816 976773119 976738304 465.7G Microsoft basic data
=== For Windows 10 << end

The vmdk file shows,
# Disk DescriptorFile
version=1
CID=c3a18751
parentCID=ffffffff
createType="fullDevice"

# Extent description
RW 976773168 FLAT "/dev/sda" 0

# The disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.adapterType="ide"
ddb.geometry.cylinders="16383"
ddb.geometry.heads="16"
ddb.geometry.sectors="63"
ddb.uuid.image="03d217bb-2b88-4ec9-8a13-acab64637be0"
ddb.uuid.parent="00000000-0000-0000-0000-000000000000"
ddb.uuid.modification="d3e0104a-a813-4210-866b-cfd6015efc1a"
ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000"
ddb.geometry.biosCylinders="1024"
ddb.geometry.biosHeads="255"
ddb.geometry.biosSectors="63"
=== End of vmdk file
Attachments
VB-missingOS-error.png
VB-missingOS-error.png (162.39 KiB) Viewed 413 times
moderation
Posts: 3
Joined: 17. Apr 2024, 10:29

Re: VM fail to run OS in raw hard disk

Post by moderation »

I have found an other issue.
Previously there was a problem of "stuck at UEFI Interacitve Shell mode" in case activate EFI in setting. So, by deactivating EFI, I could pass the Interactive Shell mode issue and confront the present issue that VM cannot run OS in raw hard disk. So, which problem should I deal with?

The document says that the Guest OS is installed with EFI, the EFI option in setting should be checked. Then, I should solve UEFI Interactive shell stuck issue. Is this right?

I might have passed history of my system. With the same strategy, VB runs well in host debian 10 and guest Windows 10. I cannot remember how to make vmdk file using VMware or VB. And I have changed SATA SSD (250G)of Windows to new one with size of 500G and installed Windows 10 again with linux NVMe SSD is connected. I am not sure this is right method. Then, linux is not bootable so using liv-debian OS usb, I have fixed grub then Windows and linux are well booted in both the OS selecting stage of CMOS and grub-selection stage. Now, it is and VB cannot run Windows through VM made from VBoxManage. Thank you for your reading.
granada29
Volunteer
Posts: 718
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: VM fail to run OS in raw hard disk

Post by granada29 »

If you are running VirtualBox 7.0.x then your syntax for creating the vmdk is incorrect. What you have pasted looks like the syntax from releases prior to VirtualBox 7.0.x

See https://www.virtualbox.org/manual/UserM ... age-config for the current documentation.
moderation
Posts: 3
Joined: 17. Apr 2024, 10:29

Re: VM fail to run OS in raw hard disk

Post by moderation »

Thank you for your concern, but, rather than figuring out the status of my system, I decided to reinstall debian. During that once I installed debian with no EFI partition which destroyed Windows booting sector and cannot be repaired. So, I reinstall windows with UEFI, and carefully reinstall debian with UEFI, and then, now VM made in VB with UEFI option works with the vmdk file made by VBoxManage. So, I can run Windows in booting stage or as guest OS in VM of VB. Thank you.
Post Reply