So i followed the manual and (using PowerShell because i can customize the size, but i get the same output with cmd.exe)
Code: Select all
PS C:\Users\Roland> VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
VBoxManage.exe: error: Cannot open the raw disk: VERR_ACCESS_DENIEDCode: Select all
VBoxManage internalcommands createrawvmdk -filename C:\VirtualBox\Ubuntu.vmdk -rawdisk \\.\PhysicalDrive0 -partitions "5,6"It worked immediately and created 2 vmdk files : Ubuntu.vmdk and Ubuntu-pt.vmdk. I suppose it's the expected behaviour.
However, when i tried to add the vmdk to my virtual machine (using the GUI), i got an error po-up. So i started PowerShell again (in normal user mode) and
Code: Select all
PS C:\Users\Roland> VBoxManage storageattach VB_Ubuntu --storagectl "Contrôleur SATA" --port 0 --device 0 --type hdd --medium C:\VirtualBox\Ubuntu.vmdk
VBoxManage.exe: error: Permission problem accessing the file for the medium 'C:\VirtualBox\Ubuntu.vmdk' (VERR_ACCESS_DENIED)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
VBoxManage.exe: error: Invalid UUID or filename "C:\VirtualBox\Ubuntu.vmdk"If i run VirtualBox as admin, i don't have any error and i can start the VM (ubuntu doesn't boot correctly, but that's another point, the VM itself does work). However, i don't like running applications as admin. This is probably caused by me also using Linux where everyone tells you to never get an application running as the superuser by default.
Does anyone have an idea how i can get VirtualBox to accept the vmdk i created as admin. I tried changing the permissions, setting every user to full access and changing owner from admin to my user account, but that didn't help.