Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Virtual PC

Vista - Using Diskpart in VM's

Reply
 
Old 07-06-2009   #1 (permalink)
TheMachineRNC


 
 

Using Diskpart in VM's

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!


My System SpecsSystem Spec
Old 07-06-2009   #2 (permalink)
Robert Comer


 
 

Re: Using Diskpart in VM's

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

Yep.
Quote:

> 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"
<TheMachineRNC@xxxxxx> wrote:
Quote:

>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!
My System SpecsSystem Spec
Old 07-08-2009   #3 (permalink)
TheMachineRNC


 
 

Re: Using Diskpart in VM's

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-@xxxxxx> wrote in message
news:0cd455lebq0k5b849hkorhkh6p9gpcglrj@xxxxxx
Quote:

>
Quote:

>>So is this how I'd do this under a VM?
>
> Yep.
>
Quote:

>> 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"
> <TheMachineRNC@xxxxxx> wrote:
>
Quote:

>>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!
My System SpecsSystem Spec
Old 07-09-2009   #4 (permalink)
Robert Comer


 
 

Re: Using Diskpart in VM's

> The issue where I run into trouble is after the Windows XP unattended
Quote:

> 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" <TheMachineRNC@xxxxxx> wrote in message
news:P9-dneyHY9sl0cjXnZ2dnUVZ_qGdnZ2d@xxxxxx
Quote:

> 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-@xxxxxx> wrote in message
> news:0cd455lebq0k5b849hkorhkh6p9gpcglrj@xxxxxx
Quote:

>>
Quote:

>>>So is this how I'd do this under a VM?
>>
>> Yep.
>>
Quote:

>>> 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"
>> <TheMachineRNC@xxxxxx> wrote:
>>
Quote:

>>>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!
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
NAT and domain joined VM's Virtual PC
Can not find registered VM's Virtual Server
Pagefile on VM's Virtual Server
VM's can't ping Virtual Server
Clustering VM's Virtual Server


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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