VirtualBox physical mapping: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "</source" to "</syntaxhighlight")
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Kategorie:Virtualbox]
[[category:VirtualBox|Physical mapping]]


==Create a virtual mapping to your physical Windows==
==Create a virtual mapping to your physical Windows==
Line 6: Line 6:


===Create a dummy mbr===
===Create a dummy mbr===
<source lang=bash>
<syntaxhighlight lang=bash>
# apt install mbr
# apt install mbr
# install-mbr /var/data/VMs/dev/mbr.img
# install-mbr /var/data/VMs/dev/mbr.img
Line 12: Line 12:


===Create the mapping as a VMDK file===
===Create the mapping as a VMDK file===
<source lang=bash>
<syntaxhighlight lang=bash>
# VBoxManage internalcommands createrawvmdk -filename /var/data/VMs/dev/Windows-physical.vmdk -rawdisk /dev/sda -partitions 1,2 -mbr /var/data/VMs/dev/mbr.img
# VBoxManage internalcommands createrawvmdk -filename /var/data/VMs/dev/Windows-physical.vmdk -rawdisk /dev/sda -partitions 1,2 -mbr /var/data/VMs/dev/mbr.img
</syntaxhighlight>
</syntaxhighlight>


After that create a VM and use this special VMDK file.
After that create a VM and use this special VMDK file.

Latest revision as of 10:21, 2 March 2022


Create a virtual mapping to your physical Windows

In my example it is on partitions 1 and 2 of the disk.
This helps me to work around problems with installing Windows updates and grub. Some Windows updates are failing if you have grub in your MBR.

Create a dummy mbr

# apt install mbr
# install-mbr /var/data/VMs/dev/mbr.img

Create the mapping as a VMDK file

# VBoxManage internalcommands createrawvmdk -filename /var/data/VMs/dev/Windows-physical.vmdk -rawdisk /dev/sda -partitions 1,2 -mbr /var/data/VMs/dev/mbr.img

After that create a VM and use this special VMDK file.