vbox虚拟机像vm那样使用物理磁盘啊!

Kvm、VMware、Virtualbox、Xen、Qemu 等
回复
清 凉散 人
帖子: 89
注册时间: 2008-11-18 8:50

vbox虚拟机像vm那样使用物理磁盘啊!

#1

帖子 清 凉散 人 » 2009-03-25 22:00

vbox也是一款好用的虚拟,机而且而且还是开源的。windows 下用过。ubuntu下也用过。
好像没有发现能够使用虚拟磁盘的功能。网上有帖子说帮助文档的124页的第99节,有说明写可以用,但是英文的看不懂啊。
有没有用过的朋友帮助说一下。
清 凉散 人
帖子: 89
注册时间: 2008-11-18 8:50

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#2

帖子 清 凉散 人 » 2009-03-25 22:01

写错了,是使用物理磁盘。
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#3

帖子 自由建客 » 2009-03-27 22:59

用静态分配的映象文件是一样的,而且更安全,只是创建时费些时间而已
头像
吴广德
帖子: 347
注册时间: 2006-10-26 9:24
系统: Ubuntu 18.04 LTS
来自: 中国-广西-南宁

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#4

帖子 吴广德 » 2009-03-28 8:42

放弃吧楼主,Vbox现在是不能使用物理盘的...... :em04
Ubuntu 18.04 LTS使用中......

主板:MSI Z97 gaming 9 ACK
CPU:I7 4790K
内存:DDR3 8G x 4 = 32G
硬盘:60G SSD(/) + 1T HD(/home)
显示器:Philips 274E5Q
清 凉散 人
帖子: 89
注册时间: 2008-11-18 8:50

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#5

帖子 清 凉散 人 » 2009-03-31 18:02

谢谢,两位朋友。。
头像
photor
论坛版主
帖子: 11004
注册时间: 2008-04-26 12:41

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#6

帖子 photor » 2009-03-31 18:12

吴广德 写了:放弃吧楼主,Vbox现在是不能使用物理盘的...... :em04
当然可以用物理磁盘,这个坛子里就有帖,自己搜 :em09
头像
吴广德
帖子: 347
注册时间: 2006-10-26 9:24
系统: Ubuntu 18.04 LTS
来自: 中国-广西-南宁

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#7

帖子 吴广德 » 2009-03-31 18:54

9.10.1. Access to entire physical hard disk
While this variant is the simplest to set up, you must be aware that this will give a guest operating system direct and full access to an entire physical disk. If your host operating system is also booted from this disk, please take special care to not access the partition from the guest at all. On the positive side, the physical disk can be repartitioned in arbitrary ways without having to recreate the image file that gives access to the raw disk.
To create an image that represents an entire physical hard disk (which will not contain any actual data, as this will all be stored on the physical disk), on a Linux host, use the command
VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
-rawdisk /dev/sda
This creates the image /path/to/file.vmdk (must be absolute), and all data will be read and written from /dev/sda.
On a Windows host, instead of the above device specification, use e.g. \\.\PhysicalDrive0.
Creating the image requires read/write access for the given device. Read/write access is also later needed when using the image from a virtual machine.
Just like with regular disk images, this does not automatically register the newly created image in the internal registry of hard disks. If you want this done automatically, add -register:
VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
-rawdisk /dev/sda -register
After registering, you can assign the newly created image to a virtual machine with
VBoxManage modifyvm WindowsXP -hda /path/to/file.vmdk
When this is done the selected virtual machine will boot from the specified physical disk.
呃,更正一下,我在2.1.4版的VBox帮助文件里找到了这个
Ubuntu 18.04 LTS使用中......

主板:MSI Z97 gaming 9 ACK
CPU:I7 4790K
内存:DDR3 8G x 4 = 32G
硬盘:60G SSD(/) + 1T HD(/home)
显示器:Philips 274E5Q
清 凉散 人
帖子: 89
注册时间: 2008-11-18 8:50

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#8

帖子 清 凉散 人 » 2009-04-02 17:39

说是可以,具体怎么操作啊,是不是有两个版本一个是收费的。
现在用的免费的是不是没有这个功能啊,,
头像
photor
论坛版主
帖子: 11004
注册时间: 2008-04-26 12:41

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#9

帖子 photor » 2009-04-02 20:21

清 凉散 人 写了:说是可以,具体怎么操作啊,是不是有两个版本一个是收费的。
现在用的免费的是不是没有这个功能啊,,
vbox从来没有收费版
头像
吴广德
帖子: 347
注册时间: 2006-10-26 9:24
系统: Ubuntu 18.04 LTS
来自: 中国-广西-南宁

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#10

帖子 吴广德 » 2009-04-02 23:05

以很烂的英文水平简单译一下好了

9.10.1. Access to entire physical hard disk

使用“整个”物理硬盘

While this variant is the simplest to set up, you must be aware that this will give a guest operating system direct and full access to an entire physical disk. If your host operating system is also booted from this disk, please take special care to not access the partition from the guest at all. On the positive side, the physical disk can be repartitioned in arbitrary ways without having to recreate the image file that gives access to the raw disk.

这段太长,不好译(主要是我英文烂),要点就是提醒你──如果你的主系统在这块硬盘上,那就不要轻易拿来给虚拟机“使用”。

To create an image that represents an entire physical hard disk (which will not contain any actual data, as this will all be stored on the physical disk), on a Linux host, use the command
VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
-rawdisk /dev/sda

建立vmdk硬盘文件的命令(Linux系统里):
VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda
大意就是──[命令] [文件名] [文件的绝对路径] [-rawdisk参数] [硬盘位置]

This creates the image /path/to/file.vmdk (must be absolute), and all data will be read and written from /dev/sda.

告诉你虽然建立了vmdk文件,但全部数据的读写都是在物理硬盘上......

On a Windows host, instead of the above device specification, use e.g. \\.\PhysicalDrive0.
Creating the image requires read/write access for the given device. Read/write access is also later needed when using the image from a virtual machine.
Just like with regular disk images, this does not automatically register the newly created image in the internal registry of hard disks. If you want this done automatically, add -register:
VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
-rawdisk /dev/sda -register
After registering, you can assign the newly created image to a virtual machine with
VBoxManage modifyvm WindowsXP -hda /path/to/file.vmdk
When this is done the selected virtual machine will boot from the specified physical disk.

Windows就不译了,呵呵
:em04 :em04 :em04
Ubuntu 18.04 LTS使用中......

主板:MSI Z97 gaming 9 ACK
CPU:I7 4790K
内存:DDR3 8G x 4 = 32G
硬盘:60G SSD(/) + 1T HD(/home)
显示器:Philips 274E5Q
头像
yaska
帖子: 1169
注册时间: 2007-10-28 21:35

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#11

帖子 yaska » 2009-04-02 23:16

可以。。

早就用来测试 U盘启动了。。
清 凉散 人
帖子: 89
注册时间: 2008-11-18 8:50

Re: vbox虚拟机像vm那样使用物理磁盘啊!

#12

帖子 清 凉散 人 » 2009-04-04 11:37

谢谢朋友们。。
回复