pedrogfrancisco wrote:Terminology
[list]
[*]VM - Virtual Machine, in this case, the Virtual Machine created in Virtual Box which disk is the partition(s) on your disk which has/have Windows 7 installed.
VM_NAME=win7raw # name of virtual machine
sudo VBoxManage internalcommands createrawvmdk -filename /home/$USER/VirtualBox\ VMs/$VM_NAME/$VM_NAME.vmdk -rawdisk /dev/sda -partitions 1 -relative -mbr myMBR.mbr
#! /bin/bash
# Windows 7 VM boot script for VirtualBox 4.x-- you'll have to always use it instead of running VirtualBox
VBUSER=virtualbox # name of custom account created (which is a member of disk group)
VM_NAME=win7raw # name of virtual machine
sudo chown -R $USER:$USER /home/$USER/.VirtualBox # make sure $VBUSER will be able to access VirtualBox settings etc.
# we use sudo because $VBUSER creates files with its ownership on previous runs
chmod -R g=u /home/$USER/.VirtualBox # $VBOXUSER permissions should be the same as ours
sudo chown -R $USER:$USER /home/$USER/VirtualBox\ VMs/$VM_NAME # ditto for VirtualBox VMs directory.
chmod -R g=u /home/$USER/VirtualBox\ VMs/$VM_NAME
xauth extract /home/$USER/cookieTmp $DISPLAY
chmod g+r /home/$USER/cookieTmp
sudo chmod g+x /home/$USER/
sudo -u $VBUSER XAUTHORITY=/tmp/.Xauthority_$VBUSER xauth merge /home/$USER/cookieTmp
rm /home/$USER/cookieTmp
sudo -u $VBUSER XAUTHORITY=/tmp/.Xauthority_$VBUSER VBOX_USER_HOME=/home/$USER/.VirtualBox VBoxManage startvm $VM_NAME
#! /bin/bash
# VirtualBox Manager start script for VirtualBox 4.x-- you'll have to use it following a standalone run of the VB VM
# this is the same as the VB Run script except for the last line
VBUSER=virtualbox # name of custom account created (which is a member of disk group)
VM_NAME=win7raw # name of virtual machine
sudo chown -R $USER:$USER /home/$USER/.VirtualBox # make sure $VBUSER will be able to access VirtualBox settings etc.
# we use sudo because $VBUSER creates files with its ownership on previous runs
chmod -R g=u /home/$USER/.VirtualBox # $VBOXUSER permissions should be the same as ours
sudo chown -R $USER:$USER /home/$USER/VirtualBox\ VMs/$VM_NAME # ditto for VirtualBox VMs directory.
chmod -R g=u /home/$USER/VirtualBox\ VMs/$VM_NAME
xauth extract /home/$USER/cookieTmp $DISPLAY
chmod g+r /home/$USER/cookieTmp
sudo chmod g+x /home/$USER/
sudo -u $VBUSER XAUTHORITY=/tmp/.Xauthority_$VBUSER xauth merge /home/$USER/cookieTmp
rm /home/$USER/cookieTmp
sudo -u $VBUSER XAUTHORITY=/tmp/.Xauthority_$VBUSER VBOX_USER_HOME=/home/$USER/.VirtualBox VirtualBox
"Failed to open the hard disk /home/mylan/Virtualbox VMs/Windows7/raw7.vmdk
The medium '/home/mylan/VirtualBox VMs/Windows7/raw7.vmdk' can't be used as the requested device type.
Details:
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Medium
Interface: IMedium {9edda847-1279-4b0a-9af7-9d66251ccc18}
Callee: IVirtualBox {d2de270c-1d4b-4c9e-843f-bbb9b47269ff}
Users browsing this forum: piertoni and 15 guests