[Solved] Windows 10 guest has no hard drive

Discussions related to using VirtualBox on Linux hosts.
Post Reply
neuronetv
Posts: 81
Joined: 25. Aug 2014, 17:23

[Solved] Windows 10 guest has no hard drive

Post 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?
Last edited by neuronetv on 6. Sep 2018, 12:10, edited 1 time in total.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: windows 10 guest has no hard drive

Post 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.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: windows 10 guest has no hard drive

Post 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.
neuronetv
Posts: 81
Joined: 25. Aug 2014, 17:23

Re: windows 10 guest has no hard drive

Post 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
Attachments
showvminfo.txt
(4.43 KiB) Downloaded 15 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: windows 10 guest has no hard drive

Post 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.
Attachments
Capture.PNG
Capture.PNG (28.42 KiB) Viewed 2851 times
neuronetv
Posts: 81
Joined: 25. Aug 2014, 17:23

Re: windows 10 guest has no hard drive

Post 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.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: windows 10 guest has no hard drive

Post 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.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: windows 10 guest has no hard drive

Post 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.
neuronetv
Posts: 81
Joined: 25. Aug 2014, 17:23

Re: windows 10 guest has no hard drive

Post 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
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Post by mpack »

Thanks for reporting back.
Post Reply