Virtualbox使用心得

来源:互联网 发布:网络彩票骗局揭秘 编辑:程序博客网 时间:2024/06/05 09:13
VirtualBox

-----------

[问题]
[解决]


[问题]  virtualbox的虚拟硬盘的大小不会随着系统中文件的减小而自动减少, 但是会随着系统中文件的增加而不断长大,直到设定的最大值. 往上找到将虚拟硬盘缩小的方法
[解决]

打开虚拟机,将虚拟硬盘撑满

sudo dd if=/dev/zero of=/EMPTY bs=1M
sudo rm -f /EMPTY
关闭虚拟机,现在可以开始压缩虚拟硬盘了
VBoxManage modifyhd mydisk.vdi --compact

参考: https://www.cnblogs.com/findumars/p/3897818.html


[问题]  

VMDK: inconsistency between grain table and backup grain table in'/usr/home/harvis/VirtualBox VMs/sol-11_3-vbox/sol-11_3-vbox-disk1.vmdk' (VERR_VD_VMDK_INVALID_HEADER).

[解决] 


[问题]  A critical error has occurred while running the virtual machine and the machine execution has been stopped

[解决]  Settings ->  System -> Acceleration -> Enable VT-x/AMD-V


[问题] The installer failed with exit code 127: Error creating textual authentication agent: Error opening
[解决] sudo vboxmanage extpack install  ~/Downloads/Oracle_VM_VirtualBox_Extension_Pack-5.1.2-108956.vbox-extpack


[问题] VirtualBox: Fatal: Could not read from Boot Medium! System Halted
[解决] 原因是IDE控制器里的虚拟磁盘(.vdi)丢失。
      解决方法是在该虚拟系统的设置中找到“存储”选项,在“SATA控制器”上选择“添加虚拟硬盘”,然后加载你的vdi文件,如我的是WindowsXP.vdi。
      我遇到的问题是从光盘启动了,修改从硬盘启动即可。

[问题]Starting VirtualBox kernel modules                         [FAILED]
  (modprobe vboxdrv failed. Please use 'dmesg' to find out why)
modprobe: ERROR: could not insert 'vboxdrv': Required key not available
[解决] disable secure boot on my workstation
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modules-for-secure-boot.html

[问题] VirtualBox WinXP guest blue screen The problem seems to be caused by the following file: intelppm.sys
[解决] WinXP safe mode: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Intelppm
And changing the ‘Start‘ value to ‘4‘.
The problem seems to be caused by the following file: processr.sys
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Processor
changing the ‘Start‘ value to ‘4‘.

[问题] VT-x is disabled in the BIOS for all CPU modes
[解决] "Settings" > System Settings > Processor > Enable the PAE/NX option

[问题] Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
[问题] VirtualBox rcvboxdrv setup error “Bad argument setup”
[解决] Run 'sudo /usr/lib/virtualbox/vboxdrv.sh setup' instead of the command given by VirtualBox.

[问题] 为Centos6.6安装VirtualBox 5.0的时候,遇到了这样的错误:
       error: Failed dependencies:
       libSDL-1.2.so.0()(64bit) is needed by VirtualBox-4.2-4.2.4_81684_el6-1.x86_64
[解决]
原来安装VirtualBox需要SDL这个包,可以用yum安装,
yum install compat-libstdc++-33 SDL SDL-devel
其实,除了上面的以外还需要gcc, kernel-devel,make, libGL, qt, qt-devel, libXmu,例如,
yum install gcc kernel-devel make libGL qt qt-devel libXmu
好了,现在就可以安装VirtuaBox的rpm包了,

[问题] vbox菜单时而有时而无,怎么回事?
[解决] Ctrl+C 切换有无菜单
=开启/关闭 Scale Mode的快捷键都是 Ctrl C (注意Ctrl是右边的那个不是左边那个)
Ctrl-Home(也是右边的Ctrl键),也可以呼出控制菜单。

The virtual machine window will be now switched to Scale mode. You can go back to windowed mode at any time by pressing Host+C.
Note that the Host key is currently defined as Right Ctrl.
Note that the main menu bar is hidden in scaled mode. You can access it by pressing Host+Home.
其中Host按键在virtualbox中是'Right Ctrl'

【扩展包安装失败的处理方法】
sudo vboxmanage extpack cleanup

[问题] 将非root用户添加到virtual box组
[解决] sudo usermod -a -G vboxusers ingenic
其中:vboxusers为组名字
      ingenic为用户名

virtualbox中使用usb设备驱动参考:
http://www.blogbus.com/java-android-logs/153894868.html

在安卓的命令行中开启adb(“usb调试”)
shell@acrab:/ # setprop sys.usb.config adb
[25095.464575] android_usb: already disabled
shell@acrab:/ # [25095.484468] adb_open
[25095.489178] adb_bind_config
[25095.495008] EN PHY
[25095.499186] dwc2 dwc2: SRP: Device Mode
[25095.800695] android_work: sent uevent USB_STATE=CONNECTED
[25095.893476] android_usb gadget: high speed config #1: android
[25095.946134] android_work: sent uevent USB_STATE=CONFIGURED
[25096.085572] mtp_open

关闭adb(“usb调试”)
shell@acrab:/ # setprop sys.usb.config none                                    
[25216.135146] dwc2 dwc2: ep1out-bulk: stop OUT transfer
[25216.145963] dwc2 dwc2: session end detected!
[25216.154763] DIS PHY
[25216.159848] adb_release
[25216.165205] android_work: sent uevent USB_STATE=DISCONNECTED
shell@acrab:/ # [25216.185761] android_usb: already disabled

[问题]
[解决]

[问题]
[解决]

    找回VirtualBox的“设备”菜单
     
    安装了增强功能后,想调节屏幕大小,不小心不知胡乱按了什么
    键把“设备”菜单弄没了。  www.2cto.com  
     
    以下是找回方法:
     
    对应的快捷键:
    全屏模式: Host+F
    无缝模式: Host+L
    自动缩放模式: Host+C
    其中,Host(默认的)是键盘上右边的那个Ctrl键
     
    对应的模式,可以通过上面对应的快捷键去切换过去,
    再次按对应的快捷键,就从该模式正常退出到窗口模式。
       www.2cto.com  
    “设备”所在的菜单在这几种状态下是隐藏的。
     
    分别试试:
     
    Host+F (即右Ctrl+F),
    Host+L (即右Ctrl+L),
    Host+C (即右Ctrl+C)
     
    会有一个键,可以退出到正常的模式。


原创粉丝点击