Page 1 of 1

[Solved] Windows 10 guest has no hard drive

Posted: 5. Sep 2018, 13:58
by neuronetv
I'm running a centos 7 host machine with VirtualBox-5.2-5.2.16_123759_el7-1.x86_64 and trying to install a windows 10 guest using Win10_1803_English_x64.iso
There's no hard drive available in the windows 10 install process. In setting up the guest vm I originally used 'VBoxManage storagectl $VM --name "SATA Controller" --add sata...etc' but that didn't work, so I deleted the vm and rebuilt it with 'VBoxManage storagectl $VM --name "IDE Controller" --add ide' and that doesn't work either. How do I get the guest machine to see a hard drive?

Re: windows 10 guest has no hard drive

Posted: 5. Sep 2018, 14:07
by andyp73
For Windows 10 you are best sticking with a SATA controller. I think though, that as well as adding the controller with "VBoxManage storagectl ..." you will also need to run "VBoxManage createmedium ..." to create a virtual disk file and "VBoxManage storageattach ..." to attach the virtual disk to the machine.

-Andy.

Re: windows 10 guest has no hard drive

Posted: 5. Sep 2018, 14:45
by mpack
As Andy says, adding a disk controller... adds a disk controller. You can then attach one or more virtual drives (i.e. VDIs) to that controller.

Re: windows 10 guest has no hard drive

Posted: 5. Sep 2018, 15:52
by neuronetv
thanks for your reply, still not having much luck.

Code: Select all

VBoxManage createmedium windows-10 disk --filename "/home/tony/VirtualBox\ VMs/$VM/$VM.vdi" --size 30000
<snip>
Syntax error: Invalid parameter 'windows-10'
this is puzzling because the vm is present and named 'windows-10'.
I've attached a copy of showvminfo and it shows 'harddisk' in the list. Thanks for any further help

Re: windows 10 guest has no hard drive

Posted: 5. Sep 2018, 16:01
by mpack
Try wrapping the "windows-10" argument in quote marks. The hypen character may have special significance on the command line, just like space.

Also, "createmedium" is not a VM modifier command, so the VM name should not be there anyway. See the following syntax summary from the user manual, and notice that the command syntax doesn't specify <uuid|vmname> for the first argument of that command.

Re: windows 10 guest has no hard drive

Posted: 5. Sep 2018, 16:08
by neuronetv
silly me the command 'VBoxManage createmedium disk --filename "/home/tony/VirtualBox\ VMs/$VM/$VM.vdi" --size 30000' worked ok (without 'windows-10' in it) but still there's no hard drive present in the windows 10 install.

Re: windows 10 guest has no hard drive

Posted: 5. Sep 2018, 16:32
by andyp73
At the moment you have a virtual hard disk controller (VBoxManage storagectl) and a virtual hard disk (VBoxManage createmedium). All you need to do now is connect them with the virtual SATA cable:
VBoxManage storageattach "Windows-10" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "/home/tony/VirtualBox\ VMs/$VM/$VM.vdi"
...or something a bit like that.

-Andy.

Re: windows 10 guest has no hard drive

Posted: 5. Sep 2018, 16:44
by mpack
As mentioned, "createmedium" is a medium management command, not a VM management command, so I would hope that no VMs are affected by it. You need an additional command to do that - see Andy's tip.

Re: windows 10 guest has no hard drive

Posted: 6. Sep 2018, 12:08
by neuronetv
YAY!! thankyou, I have a hard drive. I did use a very similar command when originally setting up the vm but it obviously wasn't exactly right The command that did work was:
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "/home/tony/VirtualBox VMs/$VM/$VM.vdi" (without the backward slash)
thanks again

Re: [Solved] Windows 10 guest has no hard drive

Posted: 6. Sep 2018, 12:15
by mpack
Thanks for reporting back.