![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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.... 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 Specs![]() |
| | #3 (permalink) |
| | 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 /YMD 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.TXTECHO 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 Specs![]() |
| | #4 (permalink) |
| | 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? 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 Specs![]() |
![]() |
| 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 | |||