Code Monkey home page Code Monkey logo

Comments (9)

mwrock avatar mwrock commented on June 27, 2024

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:[email protected]
Sent: ‎10/‎11/‎2014 4:46 AM
To: mwrock/boxstartermailto:[email protected]
Cc: Matt Wrockmailto:[email protected]
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:
#25

from boxstarter.

justSteve avatar justSteve commented on June 27, 2024

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

from boxstarter.

mwrock avatar mwrock commented on June 27, 2024

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?

from boxstarter.

justSteve avatar justSteve commented on June 27, 2024

Sorry for that bit of delay - Double clicking the vhdx gets:
Couldn't Mount File: The disk image isn't initialized...
mmc

and the MMC:
mountfile

It looks as though the jumpstarter code is creating the VHD but not formatting/initializing - (i mentioned that noob thing, right?)

thx

from boxstarter.

justSteve avatar justSteve commented on June 27, 2024

swapped images

from boxstarter.

mwrock avatar mwrock commented on June 27, 2024

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?

from boxstarter.

justSteve avatar justSteve commented on June 27, 2024

all functions correctly so far but i haven't pushed it - I'm booting into it and have scaffolded it with a chocolatey package.

Looking back to re-running the jumpstarter code:

New-VM -Name "myVM" -MemoryStartupBytes 1GB -NewVHDPath "v:\foo.vhdx" -NewVHDSizeBytes 60GB

after re-running, at the os install, I was forced into the format/partition screen. Didn't see that first time (which would explain the disk state) - so noob lesson learned is 're-run the scripts - they don't get tired.'.

OTOH, seems reasonable to expect to be able to script that reliably too.

Checking back to your post:

You need to create an empty VHD file which represents a system with no OS installed.

Wanted that so i mounted the dvd before executing the script (repeated).

New-VM -Name "myVM" -MemoryStartupBytes 1GB -NewVHDPath "D:\VHDs\w81.vhdx" -NewVHDSizeBytes 60GB
Set-VMDvdDrive -VMName myVM -Path "C:\ISOs\EVAL_EN-US-IRM_CENA_X64FREE_EN-US_DV5.iso"
Start-VM "myVM

perhaps an explicit vhd creation cmd with partitioning and formatting?

from boxstarter.

mwrock avatar mwrock commented on June 27, 2024

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

from boxstarter.

mwrock avatar mwrock commented on June 27, 2024

I'm closing this since it appears to be an issue with the VM and not Boxstarter.

from boxstarter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.