Closed justSteve closed 9 years ago
That means it was not able to find the windows folder on that drive. Is that your only drive and do you have windows installed on it?
Sent from my Windows Phone
From: justStevemailto:notifications@github.com Sent: 10/11/2014 4:46 AM To: mwrock/boxstartermailto:boxstarter@noreply.github.com Cc: Matt Wrockmailto:matt@mattwrock.com Subject: [boxstarter] Error from Enable-BoxstarterVM: The VHD does not contain system volume (#25)
Greets - brand new to the project as well as Hyper-V in general so I'll be the one making all the noob mistakes public. To wit:
Based on @mwrock's jumpstarter at https://matt-wrock.squarespace.com/?offset=1388363760000
New-VM -Name "myVM" -MemoryStartupBytes 1GB -NewVHDPath "v:\Virtual Hard Disks\w81.vhdx" -NewVHDSizeBytes 60GB
Set-VMDvdDrive -VMName myVM -Path "v:\en_windows_8.1_professional_n_vl_with_update_x64_dvd_4065208.iso"
Start-VM "myVM"
That gives me a functioning windows install. Next I'm wanting to add Chocolatey and BoxStarter. Again from jumpstarter code:
$cred=Get-Credential BareOS\Steve
Enable-BoxstarterVM -VMName myVM -Credential $cred
gets me output:
Boxstarter: Configuring local PowerShell Remoting settings...
Boxstarter: Testing remoting access on BareOS...
Boxstarter: Testing WSMAN...
Boxstarter: Testing WMI...
Boxstarter: Stopping myVM
Boxstarter: VHD Dismounted
The VHD does not contain system volume
At C:\[foo]\Boxstarter\Boxstarter.HyperV\Enable-BoxstarterVHD.ps1:78 char:17
+ throw New-Object -TypeName InvalidOperationException -ArgumentLi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], InvalidOperationException
+ FullyQualifiedErrorId : The VHD does not contain system volume
Perhaps my problem is more Hyper-V related than Boxstarter but since I'm using script that is (implicitly) presented as 'the Boxstarter Way' I'm hoping to invoke to Chocolatey Gods' Goodness.
Reply to this email directly or view it on GitHub: https://github.com/mwrock/boxstarter/issues/25
Both host and guest are conventional installs - all OS-related paths would be unchanged. As a bit of possibly relevant background, this is error is another of _'this powershell cmtlet/syntax should work but isn't' problems I've been experiencing on my workstation. In fact, my intro to Boxstarter is precisely because because I'm re-paving the current install partly due to these sorts of problems.
Happy to keep troubleshooting anything that you think would benefit your project but otherwise I've worked around this particular problem.
thx
What boxtarter does here is it finds the VHD assigned to the Hyper-V VM you are targeting. It then mounts that vhd locally (you could do this just by doiublclicking it in file explorer. Then it iterates the drive volumes in that VHD (usually there is just one) and finds the one that has a:
[drive letter]:\windows\system32\config
It would throw this error if it cant find that.
The fact the it cant find it definitely does indicate that something is likely fundamentally wrong.
Could you try mounting it and see if it lacks that directory? and we can take it from there?
Sorry for that bit of delay - Double clicking the vhdx gets: Couldn't Mount File: The disk image isn't initialized...
and the MMC:
It looks as though the jumpstarter code is creating the VHD but not formatting/initializing - (i mentioned that noob thing, right?)
thx
swapped images
Thanks. This actually explains the issues Boxstarter is having with this image. If you cant mount the disk in File Explorer, that means there is something fudamentally wrong with the disk. Boxstarter can only work with a functional vhd. Is the VM that this disk is attached to functional?
all functions correctly so far but i haven't pushed it - I'm booting into it and have scaffolded it with a chocolatey package.
Here's a snippet I use to create fresh VHDs for testing:
$v = new-vhd -Path $testRoot\test.vhdx -SizeBytes 200MB |
Mount-VHD -PassThru |
Initialize-Disk -PartitionStyle mbr -Confirm:$false -PassThru |
New-Partition -UseMaximumSize -AssignDriveLetter -MbrType IFS |
Format-Volume -NewFileSystemLabel "VHD" -Confirm:$false
In fact this is taken from the unit tests of Enable-BoxstarterVM
https://github.com/mwrock/boxstarter/blob/master/tests/HyperV/Enable-BoxstarterVHD.Tests.ps1
I'm closing this since it appears to be an issue with the VM and not Boxstarter.
Greets - brand new to the project as well as Hyper-V in general so I'll be the one making all the noob mistakes public. To wit:
Based on @mwrock's jumpstarter at https://matt-wrock.squarespace.com/?offset=1388363760000
That gives me a functioning windows install. Next I'm wanting to add Chocolatey and BoxStarter. Again from jumpstarter code:
gets me output:
Perhaps my problem is more Hyper-V related than Boxstarter but since I'm using script that is (implicitly) presented as 'the Boxstarter Way' I'm hoping to invoke to Chocolatey Gods' Goodness.