How to manually remove VHD from a storage pool on Hyper-V Server?

CougTek

Hairy Aussie
Joined
Jan 21, 2002
Messages
8,729
Location
Québec, Québec
When I remove a virtual machine from my newly configured Hyper-V Server 2012 R2, it leaves the VHD (or VHDX) intact. This takes space. I read that this is normal behavior and that I have to manually remove the VHD and folders manually. I can't figure out how.

I access the server by remote desktop. The interface is in command line, which is ok. But I cannot access the partition where the storage pool is from the command line (or I simply do not know how). I also have the Hyper-V manager and the remote server administrator pack install on my laptop, which I also use to configure the server. The only way I've found to remove unuse VHD was to format the storage pool. I'm blunt, but not that blunt.

There has to be a way to simply go on the storage pool and pick what I want to keep and what I want to get rid of. All I can do is select a VHD and modify its size (from the Hyper-V manager on my laptop). I don't want to modify its size, I want to nuke it.

How do I do that? Anyone knows?
 

CougTek

Hairy Aussie
Joined
Jan 21, 2002
Messages
8,729
Location
Québec, Québec
Is the volume in question mounted without having an assigned drive letter or something?
Yes, it has one. And I log as the local Administrator, so I'm pretty sure I have all the access rights. I simply don't know how to do it.
 
Last edited:

CougTek

Hairy Aussie
Joined
Jan 21, 2002
Messages
8,729
Location
Québec, Québec
I wish it was this easy. When I try to go to the G: drive (the one where the VHD are), g: appears for one second and then I'm brought back to the c:. That's when I'm typing on the keyboard physically attached to the server, as an Administrator.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
22,276
Location
I am omnipresent
Can you connect to that drive letter as on its Administrative share on another machine? Have you tried SUBSTing the relevant path to a drive letter of its own?
 

CougTek

Hairy Aussie
Joined
Jan 21, 2002
Messages
8,729
Location
Québec, Québec
I can't access the administrative share from another computer. I haven't tried substing the path to another drive letter because the Hyper-V manager clearly points me to the G: for my VHDs. I don't see why they would be elsewhere. I'll browse Google a little more.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
22,276
Location
I am omnipresent
I don't really understand the problem but I'm kind of intrigued. Maybe there's some kind of misbegotten issue between having a local G: drive and also a mapped drive that also points to G:?
 

CougTek

Hairy Aussie
Joined
Jan 21, 2002
Messages
8,729
Location
Québec, Québec
I fixed the issue. I've installed the file server services and now I can access all the drives remotely. One funny thing happened before though. I could delete or create files from the command line, directly on the server, when I typed the exact path of said file on the G:, despite the fact that I could not view it otherwise from the CLI. However, I couldn't access folders with a space in their name, like "Virtual Hard Disks" and its content.

It's all bad memories now.

Thanks for your help and suggestions.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
22,276
Location
I am omnipresent
Were you surrounding the entire file path with quotations, like so:

"G:\foo\barVirtual Hard Disks\"

Windows 2008 and 2012 do command completion a la *nix, so if you start typing a uniquely path, Windows will actually fill in as much as can be identified from the keys you've pressed by hitting the TAB key. This is quite handy for some obnoxiously long pathnames.
 

Stereodude

Not really a
Joined
Jan 22, 2002
Messages
10,865
Location
Michigan
IIRC. NT4 -> XP needed a registry setting to enable, Vista + enabled it by default.
I know it works on all my XP boxes, but it's been so long since I installed one of them fresh I don't have a clue if I did something to enable it or not.
 
Top