LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1465|回复: 2

请教:虚拟机qemu下如何访问物理硬盘?

[复制链接]
发表于 2009-1-25 10:38:06 | 显示全部楼层 |阅读模式
我在windows xp下用绿色的qemu安装了debian,

就是不知道怎么在主系统和客系统之间互访数据。尤其是如何怎么将debian(客)系统中内容存取出来........

不知道谁玩过呢?指点一下吧

谢谢!
发表于 2009-1-26 16:41:50 | 显示全部楼层
我也很感兴趣这个,看到你的问题man了一下,我没有测试,你参考一下:
       -smb dir
           When using the user mode network stack, activate a built-in SMB
           server so that Windows OSes can access to the host files in dir
           transparently.

           In the guest Windows OS, the line:

                   10.0.2.4 smbserver

           must be added in the file C:\WINDOWS\LMHOSTS (for windows 9x/Me) or
           C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS (Windows NT/2000).

           Then dir can be accessed in \\smbserver\qemu.

           Note that a SAMBA server must be installed on the host OS in
           /usr/sbin/smbd. QEMU was tested successfully with smbd version
           2.2.7a from the Red Hat 9 and version 3.0.10-1.fc3 from Fedora Core
           3.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-28 12:05:37 | 显示全部楼层
samba不会弄. .. ..   google到的都是linux为主机、windows为客机的

google了一下,好像ssh跟samba都是可以的...

我又从linux上用qemu启动了同一个镜像文件,居然能读写..(只要加上  -hdb /dev/sda*)

不过“写”还是很危险的 ___ 我的home分区加载不上了。 

所以最好 “不要” 在当前分区  “最好" 在fat32分区(最好镜像文件也不在其上)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表