Skip to main content
added 198 characters in body
Source Link
Aaron Ladd
  • 459
  • 2
  • 8

You have two questions here, one is to mount the existing drive/folder/etc., the other is to hide the drive from the host (Windows) OS.

In Virtualbox, mounting a shared folder is fairly straightforward, after sharing the folder with the guest in the VM settings in Virtualbox, you can run sudo mount -t vboxsf share ~/host which should mount the folder/drive in the host folder in your home directory.

Hiding the drive is less simple. I imagine that formatting the drive as ext4 and giving control of the sata interface to the guest would an option (note this would erase all the data currently on the drive). Windows will recognize an ext4 partition as a partition, but not be able to mount it in explorer (without additional tools). the first thing to do would be to mount the drive directly. In the user manual, this is not addressed, but here it seems fairly straightforward, you make a virtual hard disk image and map it to the partition/drive in question:

VBoxManage internalcommands createrawvmdk -filename "C:\Users\<user_name>\VirtualBox VMs\<VM_folder_name>\<file_name>.vmdk" -rawdisk \\.\PhysicalDrive#.

to find the physical drive number:

In Windows, open Disk Management. You'll see the associated drive numbers on the left and will identify them later as PhysicalDrive0, PhysicalDrive1, etc.

I would start with the drive as it is, and only play around with formatting after you have a working mount.

Why are you trying to hide the drive from windows? This seems very complicated, and there are many potentially dangerous problems that can arise from giving guests RAW level access to disks, although if there is nothing else using the disk, I don't see that being as big an issue.

You have two questions here, one is to mount the existing drive/folder/etc., the other is to hide the drive from the host (Windows) OS.

In Virtualbox, mounting a shared folder is fairly straightforward, after sharing the folder with the guest in the VM settings in Virtualbox, you can run sudo mount -t vboxsf share ~/host which should mount the folder/drive in the host folder in your home directory.

Hiding the drive is less simple. I imagine that formatting the drive as ext4 and giving control of the sata interface to the guest would an option (note this would erase all the data currently on the drive). Windows will recognize an ext4 partition as a partition, but not be able to mount it in explorer (without additional tools). the first thing to do would be to mount the drive directly. In the user manual, this is not addressed, but here it seems fairly straightforward, you make a virtual hard disk image and map it to the partition/drive in question:

VBoxManage internalcommands createrawvmdk -filename "C:\Users\<user_name>\VirtualBox VMs\<VM_folder_name>\<file_name>.vmdk" -rawdisk \\.\PhysicalDrive#.

I would start with the drive as it is, and only play around with formatting after you have a working mount.

Why are you trying to hide the drive from windows? This seems very complicated, and there are many potentially dangerous problems that can arise from giving guests RAW level access to disks, although if there is nothing else using the disk, I don't see that being as big an issue.

You have two questions here, one is to mount the existing drive/folder/etc., the other is to hide the drive from the host (Windows) OS.

In Virtualbox, mounting a shared folder is fairly straightforward, after sharing the folder with the guest in the VM settings in Virtualbox, you can run sudo mount -t vboxsf share ~/host which should mount the folder/drive in the host folder in your home directory.

Hiding the drive is less simple. I imagine that formatting the drive as ext4 and giving control of the sata interface to the guest would an option (note this would erase all the data currently on the drive). Windows will recognize an ext4 partition as a partition, but not be able to mount it in explorer (without additional tools). the first thing to do would be to mount the drive directly. In the user manual, this is not addressed, but here it seems fairly straightforward, you make a virtual hard disk image and map it to the partition/drive in question:

VBoxManage internalcommands createrawvmdk -filename "C:\Users\<user_name>\VirtualBox VMs\<VM_folder_name>\<file_name>.vmdk" -rawdisk \\.\PhysicalDrive#.

to find the physical drive number:

In Windows, open Disk Management. You'll see the associated drive numbers on the left and will identify them later as PhysicalDrive0, PhysicalDrive1, etc.

I would start with the drive as it is, and only play around with formatting after you have a working mount.

Why are you trying to hide the drive from windows? This seems very complicated, and there are many potentially dangerous problems that can arise from giving guests RAW level access to disks, although if there is nothing else using the disk, I don't see that being as big an issue.

Source Link
Aaron Ladd
  • 459
  • 2
  • 8

You have two questions here, one is to mount the existing drive/folder/etc., the other is to hide the drive from the host (Windows) OS.

In Virtualbox, mounting a shared folder is fairly straightforward, after sharing the folder with the guest in the VM settings in Virtualbox, you can run sudo mount -t vboxsf share ~/host which should mount the folder/drive in the host folder in your home directory.

Hiding the drive is less simple. I imagine that formatting the drive as ext4 and giving control of the sata interface to the guest would an option (note this would erase all the data currently on the drive). Windows will recognize an ext4 partition as a partition, but not be able to mount it in explorer (without additional tools). the first thing to do would be to mount the drive directly. In the user manual, this is not addressed, but here it seems fairly straightforward, you make a virtual hard disk image and map it to the partition/drive in question:

VBoxManage internalcommands createrawvmdk -filename "C:\Users\<user_name>\VirtualBox VMs\<VM_folder_name>\<file_name>.vmdk" -rawdisk \\.\PhysicalDrive#.

I would start with the drive as it is, and only play around with formatting after you have a working mount.

Why are you trying to hide the drive from windows? This seems very complicated, and there are many potentially dangerous problems that can arise from giving guests RAW level access to disks, although if there is nothing else using the disk, I don't see that being as big an issue.