Linux VirtualBox booting the installed Windows 8 system on the physical hard disk

Source: Internet
Author: User
Tags passthrough

Create a virtual machine

1. Create a Windows virtual machine that does not have a hard disk, consistent with the system that is installed on the physical hard disk.
2. Create a virtual hard disk on a physical hard disk by creating a virtual machine directory from the command line
Vboxmanage internalcommands createrawvmdk-filename/path/to/file.vmdk-rawdisk/dev/sda-partitions 1,2,3,4,5,8- Relative
3. Load the VMDK virtual hard disk that you just created in the virtual machine that you created.
4. Start the virtual machine normally, everything is done.
5. Of course, in the virtual machine to use the cool, you need to do a good job, and install the guest additions in the extension package.

Problems in the process
Seemingly simple process, there are some problems will appear.
1. The created VMDK virtual hard disk cannot be used, and the verr_access_denied error is reported.
solution : First found the article http://blog.csdn.net/dewafer/article/details/41366441 under Windows, which mentions the same error. But the problem under Windows is that bloggers did not create virtual hard disks with administrator privileges, and bloggers solved his problems by creating them with administrator privileges. And I'm using Linux, and it's sudo created (after the creation will be two people files, one is the file name you created plus. VMDK, the other is the file name plus-pt, and then the. VMDK, I wonder what each of these two files is? ), the owning user is already root. But I also changed the user to themselves, the file group to the Vboxusers (VirtualBox user group), and set the 664 permissions, the problem remains. Looking at the official documents again, I found myself not exactly as written in the document, I wrote the Vboxmanage internalcommands CREATERAWVMDK-FILENAME/PATH/TO/FILE.VMDK-RAWDISK/DEV/SDA -partitions 1,2,3,4,5,8 less-relative Parameters! Plus, run VirtualBox again, everything is OK!

P.S.
To enable the system to use the physical hard disk directly after the Windows, to add to the system load read and write access to these physical disks, under/ETC/UDE/RULES.D Create a new file 61-vbox-vmdk.rules, the content is

# full disk needs to being readable by vboxusers
env{id_serial_short}== "TF655BWH163KLR", env{devtype}== "Disk", group= "Vboxusers", mode= "0640"
# sda2, 6 need to being r/w by vboxusers
env{id_serial_short}== "TF655BWH163KLR", env{devtype}== "Partition", env{id_part_entry_number}== "1", GROUP= " Vboxusers ", mode=" 0660 "
env{id_serial_short}== "TF655BWH163KLR", env{devtype}== "Partition", env{id_part_entry_number}== "2", GROUP= " Vboxusers ", mode=" 0660 "
env{id_serial_short}== "TF655BWH163KLR", env{devtype}== "Partition", env{id_part_entry_number}== "3", GROUP= " Vboxusers ", mode=" 0660 "
env{id_serial_short}== "TF655BWH163KLR", env{devtype}== "Partition", env{id_part_entry_number}== "4", GROUP= " Vboxusers ", mode=" 0660 "
env{id_serial_short}== "TF655BWH163KLR", env{devtype}== "Partition", env{id_part_entry_number}== "5", GROUP= " Vboxusers ", mode=" 0660 "
env{id_serial_short}== "TF655BWH163KLR", env{devtype}== "Partition", env{id_part_entry_number}== "8", GROUP= " Vboxusers ", mode=" 0660 "

Where the TF655BWH163KLR is the identity of the hard disk, the following commands can be used to obtain

Hdparm-i/DEV/SDA | grep Serial

And the number represents the partition of the hard disk, 1 means the first partition, SDA1, and so on.

Reference Links:
https://cnzhx.net/blog/opensuse-tw-virtualbox/#i-5
https://cnzhx.net/blog/boot-linux-partition-on-physical-hd-with-vm-in-windows/
Http://www.virtualbox.org/manual/ch09.html#rawdisk

P.s.p.s.
In fact, this time the purpose is to VirtualBox in the passthrough to achieve the physical machine in VirtualBox smooth operation, but when buying a computer only pay attention to whether the CPU support vt-d (AMD called IOMMU) and ignored the host to Vt-d (North Bridge chip , see Http://download.intel.com/technology/computing/vptech/Intel (R) _vt_for_direct_io.pdf) for support, and the results are Intel's HM77 ( http://ark.intel.com/products/64339), officials have confirmed that vt-d is not supported. It was later learned that even if the motherboard chipset supports this feature, there is no relevant open entry in the manufacturer's BIOS, and disconsolate, unless the vt-d feature is turned on by the host by default. So it really takes a bit of thought to use this advanced feature of vt-d. Of course, using vt-d, you have to have two video card (the general single display can be satisfied with it, one is the CPU set, one is unique) and two monitors (if not, you can use VNC remote, it is said to lose only 5% of the performance). Well, if you have the opportunity to change to a full-featured computer, then a passthrough article.

Finally, give a semi-virtualized article for extended reading.

http://smilejay.com/2012/11/kvm-vtd-overview/

Linux VirtualBox booting the installed Windows 8 system on the physical hard disk

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.