Guest User

Attach physical partitioin as vmdk disk to Virtualbox

a guest
Feb 5th, 2012
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  2. /home/share/VM/W7I$ dd if=/dev/zero of=W7I.mbr bs=512 count=1
  3. 1+0 records in
  4. 1+0 records out
  5. 512 bytes (512 B) copied, 0.000173072 s, 3.0 MB/s
  6. /home/share/VM/W7I$ sudo VBoxManage internalcommands createrawvmdk -filename /home/share/VM/W7I/W7I_sdb2.vmdk -rawdisk /dev/sdb -partitions 2 -mbr W7I.mbr
  7. RAW host disk access VMDK file /home/share/VM/W7I/W7I_sdb2.vmdk created successfully.
  8. /home/share/VM/W7I$ sudo chown user W7I_sdb2*
  9. /home/share/VM/W7I$ sudo chgrp user W7I_sdb2*
  10. /home/share/VM/W7I$ VBoxManage storageattach W7I --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium /home/share/VM/W7I/W7I_sdb2.vmdk
  11. VBoxManage: error: The medium '/home/share/VM/W7I/W7I_sdb2.vmdk' can't be used as the requested device type
  12. VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium, callee nsISupports
  13. Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 210 of file VBoxManageDisk.cpp
  14. VBoxManage: error: Invalid UUID or filename "/home/share/VM/W7I/W7I_sdb2.vmdk"
  15. $ sudo chmod go+rw /dev/sdb
  16. $ sudo chmod go+rw /dev/sdb2
  17. $
RAW Paste Data