Windows Vista Tips

Windows Vista Tips > Newsgroups > Virtual PC > Re: Using Diskpart in VM's

Reply
Thread Tools Display Modes

Re: Using Diskpart in VM's

 
 
Robert Comer
Guest
Posts: n/a

 
      07-06-2009

>So is this how I'd do this under a VM?


Yep.

> It doesn't seem to work....


What's going wrong? Have you tried to do it manually to see what's
failing?

--
Bob Comer



On Mon, 6 Jul 2009 13:15:17 -0400, "TheMachineRNC"
<> wrote:

>Hi,
>
>I'm new to using VM's and was wondering how you can script disk partitioning
>in a VM environment. I am currently experimenting with Virtual box, but
>also use Microsoft Virtual PC at times as well. I'm assuming Diskpart
>would work the same in both. I dabble in automated workstation builds and
>I'm trying to setup a test enivornment for my scripting by using a VM rather
>then constantly relying on hardware.
>
>Here's what I normally do:
>
>I boot from a Bart PE CD and then map a drive to a network share and then
>run my batch/script from the share. The batch file calls Diskpart and I
>have an answer file for diskpart such as:
>
>Select Disk 0
>CLEAN
>Create Partition Primary Size=12229
>Select Partition 1
>Assign letter c
>Active
>Select Disk 0
>Create Partition Primary
>Select Partition 2
>Assign letter d
>
>So is this how I'd do this under a VM? It doesn't seem to work....
>
>Any guidance would be appreciated. My end goal is to setup a dual
>partition VM and then launch an unattended install of Windows XP. Why
>dual partition? My unattended install puts Documents and Settings on the D
>drive.
>
>Thanks!

 
Reply With Quote
 
 
 
 
Robert Comer
Guest
Posts: n/a

 
      07-09-2009

> The issue where I run into trouble is after the Windows XP unattended
> install begins to start it comes back with a message about not having a
> valid partition to install to. Is there a command that I can run to
> initialize the partitions so the unattended install will recognize them?


It's really beyond my knowledge, but I'll give it a stab -- have you tried
adding the /t switch to your winnt32 command?

So it should be:

D:\I386\WINNT32.EXE /T:C: /S:\I386 /UNATTEND:\I386\UNATTEND.TXT

--
Bob Comer

"TheMachineRNC" <> wrote in message
news:P9-...
> Bob,
>
> I finally got it to work. It appears to work and here's what my batch
> file looks like: (see another problem and question below)
>
> ECHO CREATING PARTITIONS...
> ECHO
> DISKPART /s H:\DISK.TXT
> FORMAT C: /FS:NTFS /V:C_DRIVE /Q /Y
> FoRMAT D: /FS:NTFS /V_DRIVE /Q /Y
> MD D:\i386
> ECHO COPYING SOURCE MATERIALS TO HARD DRIVE...
> ECHO
> ECHO
> XCOPY H:\OSES\XPVOL\I386\*.* /S D:\i386
> ECHO
> ECHO
> ECHO LAUNCHING UNATTENDED INSTALL OF XP, PC WILL AUTOMATICALLY REBOOT...
> ECHO
> ECHO
> D:\I386\WINNT32.EXE /S:\I386 /UNATTEND:\I386\UNATTEND.TXT
> ECHO
> ECHO
> ECHO REBOOTING PC...
> ECHO
> ECHO
> REBOOT
>
> The issue where I run into trouble is after the Windows XP unattended
> install begins to start it comes back with a message about not having a
> valid partition to install to. Is there a command that I can run to
> initialize the partitions so the unattended install will recognize them?
>
> Thanks!
>
> "Robert Comer" <bobcomer-removeme-@mindspring.com> wrote in message
> news:...
>>
>>>So is this how I'd do this under a VM?

>>
>> Yep.
>>
>>> It doesn't seem to work....

>>
>> What's going wrong? Have you tried to do it manually to see what's
>> failing?
>>
>> --
>> Bob Comer
>>
>>
>>
>> On Mon, 6 Jul 2009 13:15:17 -0400, "TheMachineRNC"
>> <> wrote:
>>
>>>Hi,
>>>
>>>I'm new to using VM's and was wondering how you can script disk
>>>partitioning
>>>in a VM environment. I am currently experimenting with Virtual box,
>>>but
>>>also use Microsoft Virtual PC at times as well. I'm assuming Diskpart
>>>would work the same in both. I dabble in automated workstation builds
>>>and
>>>I'm trying to setup a test enivornment for my scripting by using a VM
>>>rather
>>>then constantly relying on hardware.
>>>
>>>Here's what I normally do:
>>>
>>>I boot from a Bart PE CD and then map a drive to a network share and then
>>>run my batch/script from the share. The batch file calls Diskpart and
>>>I
>>>have an answer file for diskpart such as:
>>>
>>>Select Disk 0
>>>CLEAN
>>>Create Partition Primary Size=12229
>>>Select Partition 1
>>>Assign letter c
>>>Active
>>>Select Disk 0
>>>Create Partition Primary
>>>Select Partition 2
>>>Assign letter d
>>>
>>>So is this how I'd do this under a VM? It doesn't seem to work....
>>>
>>>Any guidance would be appreciated. My end goal is to setup a dual
>>>partition VM and then launch an unattended install of Windows XP. Why
>>>dual partition? My unattended install puts Documents and Settings on
>>>the D
>>>drive.
>>>
>>>Thanks!

>



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DISKPART.EXE - Any way to get a progress indicator? Mr B Windows Media Center 2 05-07-2009 12:21 AM
Diskpart and Imagex rykkim Windows Vista Installation 1 12-03-2008 12:33 AM
Error with diskpart on vista ivantv@gmail.com Windows Vista Installation 2 03-12-2008 04:02 AM
Diskpart utility winston Windows Vista Installation 4 02-22-2008 02:05 AM
using diskpart monty Windows Media Player 1 07-05-2004 03:33 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59