Windows Vista Tips

Windows Vista Tips > Newsgroups > Virtual PC > Re: VirtualPC in headless mode and auto-startup

Reply
Thread Tools Display Modes

Re: VirtualPC in headless mode and auto-startup

 
 
David Wilkinson
Guest
Posts: n/a

 
      02-16-2010

wrote:
> Hi,
>
> I'm using Windows Virtual PC on Win7, and I need to start a virtual
> machine at pc startup, before any other user is logging. I would like
> to start also the VM headless.
>
> I found a reference to start the VPC headless here
>
> http://blogs.technet.com/windows_vpc...irtual-pc.aspx
>
> But it doesn't works, when I try to run the script I get error that
> VirtualPC.Application class cannot be found
>
> Also, how can I make the VM start before users login?


This blog article is about Windows Virtual PC, not Virtual PC 2007.

If your machine has hardware virtualization, you should be using Windows Virtual
PC on Windows 7. Virtual PC 2007 is not supported (though it seems to work fine).

On earlier host client OS's (XP, Vista), you could have used Virtual Server
2005, but it will not install on Windows 7 (at least not without a lot of effort).

VMWare Server is free, and will run on Windows 7.

--
David Wilkinson
Visual C++ MVP
 
Reply With Quote
 
 
 
 
David Wilkinson
Guest
Posts: n/a

 
      02-16-2010
wrote:
> Hi,
>
> Thanks, but I already mentioned I'm using Windows Virtual PC


I'm sorry. I misread your post. (I don't know why, because it was clear enough.)
Maybe I saw the 7 in Win7 and thought 2007.

I can't help you with Windows Virtual PC, because my machine does not have
hardware virtualization.

--
David Wilkinson
Visual C++ MVP
 
Reply With Quote
 
Steve Jain [MVP]
Guest
Posts: n/a

 
      02-16-2010
On Tue, 16 Feb 2010 12:20:21 -0800 (PST), ""
<> wrote:

>Hi,
>
>Thanks, but I already mentioned I'm using Windows Virtual PC
>The issue is, I upgraded the host pc from XP to Win7, and I have a VM
>which I run previously under VServer2005R2, under XP which I need to
>run now under Win7 unattended.
>VMWare server unfortunately does not recognize VHD from VPC / VServer,
>and I don't want to reinstall the VM (it is complex, properly setup)
>I was installed even VServer 2005 on Win7 with some hacks. The issue
>is it seems to have some problems, precisely, it from time to time
>simple "loose" the virtual network, so my VM cannot get network
>connectivity, which is what I need.
>
>I saw the VM works very well under Windows VPC, so I was trying to use
>it.
>
>Lately I was trying to create a native windows service in C#, which
>will start my VM when service starts, and save its state when service
>close.
>For tests, I create also a small winforms app which does exactly what
>service does (for testing purpose). It works (I can start the VM
>headless, stop it, query its status.
>But when I install the service and try to start it, it does not start
>the VM.
>I log the errors and this is what I get:
>
>Source: DistributedCOM
>The application-specific permission settings do not grant Local
>Activation permission for the COM Server application with CLSID
>{9A1774B7-8251-4468-A214-61DCAED9AC2F}
> and APPID
>{F375390D-5D01-4106-AE15-674BE971C676}
> to the user MyPC\MyUser SID (.....) from address LocalHost (Using
>LRPC). This security permission can be modified using the Component
>Services administrative tool.
>
>Then
>Source: My service
>
>Error when trying to start virtual machine ZBC Server
>
>System.TypeInitializationException: The type initializer for
>'VPCLib.VPCHelper' threw an exception. --->
>System.UnauthorizedAccessException: Retrieving the COM class factory
>for component with CLSID {9A1774B7-8251-4468-A214-61DCAED9AC2F} failed
>due to the following error: 80070005.
> at VPCLib.VPCHelper..cctor()
> --- End of inner exception stack trace ---
> at VPCLib.VPCHelper.GetState(String machineName)
> at VPCService.VPCService.OnStart(String[] args)
>
>I was trying to look into Component Services administrative tool,
>thinking I could change some settings there to allow Local
>Activation, but for Virtual PC, all settings in properties page are
>disabled.
>
>Any thought? Should I post this to another group? Which group?
>
>Thanks


Check out this forum for win7 virtualization:
http://social.technet.microsoft.com/...rovirt/threads

there are a couple threads on running WinVPC headless and the issues
you have.

I do not think you will be able to get a VM to start before a user
logs in, the app is not written to work like that.

--
Cheers,
Steve Jain, Virtual Machine MVP
http://vpc.essjae.com/
http://smudj.wordpress.com/
 
Reply With Quote
 
Bill Blanton
Guest
Posts: n/a

 
      02-18-2010

On 2/16/2010 19:31, Steve Jain [MVP] wrote:
> On Tue, 16 Feb 2010 12:20:21 -0800 (PST), ""
> <> wrote:
>
>> Hi,
>>
>> Thanks, but I already mentioned I'm using Windows Virtual PC
>> The issue is, I upgraded the host pc from XP to Win7, and I have a VM
>> which I run previously under VServer2005R2, under XP which I need to
>> run now under Win7 unattended.
>> VMWare server unfortunately does not recognize VHD from VPC / VServer,
>> and I don't want to reinstall the VM (it is complex, properly setup)
>> I was installed even VServer 2005 on Win7 with some hacks. The issue
>> is it seems to have some problems, precisely, it from time to time
>> simple "loose" the virtual network, so my VM cannot get network
>> connectivity, which is what I need.
>>
>> I saw the VM works very well under Windows VPC, so I was trying to use
>> it.
>>
>> Lately I was trying to create a native windows service in C#, which
>> will start my VM when service starts, and save its state when service
>> close.
>> For tests, I create also a small winforms app which does exactly what
>> service does (for testing purpose). It works (I can start the VM
>> headless, stop it, query its status.
>> But when I install the service and try to start it, it does not start
>> the VM.
>> I log the errors and this is what I get:
>>
>> Source: DistributedCOM
>> The application-specific permission settings do not grant Local
>> Activation permission for the COM Server application with CLSID
>> {9A1774B7-8251-4468-A214-61DCAED9AC2F}
>> and APPID
>> {F375390D-5D01-4106-AE15-674BE971C676}
>> to the user MyPC\MyUser SID (.....) from address LocalHost (Using
>> LRPC). This security permission can be modified using the Component
>> Services administrative tool.
>>
>> Then
>> Source: My service
>>
>> Error when trying to start virtual machine ZBC Server
>>
>> System.TypeInitializationException: The type initializer for
>> 'VPCLib.VPCHelper' threw an exception. --->
>> System.UnauthorizedAccessException: Retrieving the COM class factory
>> for component with CLSID {9A1774B7-8251-4468-A214-61DCAED9AC2F} failed
>> due to the following error: 80070005.
>> at VPCLib.VPCHelper..cctor()
>> --- End of inner exception stack trace ---
>> at VPCLib.VPCHelper.GetState(String machineName)
>> at VPCService.VPCService.OnStart(String[] args)
>>
>> I was trying to look into Component Services administrative tool,
>> thinking I could change some settings there to allow Local
>> Activation, but for Virtual PC, all settings in properties page are
>> disabled.
>>
>> Any thought? Should I post this to another group? Which group?
>>
>> Thanks

>
> Check out this forum for win7 virtualization:
> http://social.technet.microsoft.com/...rovirt/threads
>
> there are a couple threads on running WinVPC headless and the issues
> you have.
>
> I do not think you will be able to get a VM to start before a user
> logs in, the app is not written to work like that.
>


I wonder. I was poking around in bcdedit's help today trying to figure out a way
to boot to an app, and ran across the following. There's apparently a way to
/set a vhd as a boot device?




E:\>bcdedit /? formats

The following describes the formats of the data that are required for
<datatypes> used with the /set command. The format that is required depends on
the <datatypes> that you specify with the /set command. For more information
about the formats associated with each <datatype>, run "bcdedit /? TYPES".

bool A boolean value. The following values correspond to TRUE:

1, ON, YES, TRUE

The following values correspond to FALSE:

0, OFF, NO, FALSE

device A device can be one of the following types:

BOOT
PARTITION=<drive>
HD_PARTITION=<drive>
FILE=[<parent>]<path>
RAMDISK=[<parent>]<path>,<optionsid>
VHD=[<parent>]<path>,<locatecustom>

The options for these types are:

<drive> A drive letter with a colon and no trailing
backslashes.
<parent> (Required) Can be either BOOT, LOCATE, or a drive
letter with colon. The square brackets do not
indicate that this is optional, but are a literal
part of the syntax.
<path> A path to the file (or .wim file) from the root of
the parent device.
<optionsid> The identifier to the device options entry that
contains the system deployment image (SDI) options
for the RAM disk. This is usually
{ramdisksdioptions}.
<locatecustom> Supplies an optional element used to locate a device
within a VHD. The default locate element for a
device is its application path (systemroot for an
osdevice). Custom values must be specified using
custom element sytax (see -help types customtypes),
for example: locate=custom:22000002.

id An entry identifier, which refers to an entry in the boot configuration
data store. Run "bcdedit /? ID" for more information about identifiers.

integer A 64-bit integer type. Some integer types can be set using enumerated
values.

integerlist A list of one or more 64-bit integers, separated by spaces.
This list should not be enclosed in quotation marks.

list An entry identifier list. It contains one or more entry identifiers
separated by spaces. The list should not be enclosed in quotation
marks.

string A literal string. If it contains spaces, it should be surrounded by
quotation marks ("").
 
Reply With Quote
 
Bill Grant
Guest
Posts: n/a

 
      02-18-2010


"Bill Blanton" <> wrote in message
news:#o6b$...
> On 2/16/2010 19:31, Steve Jain [MVP] wrote:
>> On Tue, 16 Feb 2010 12:20:21 -0800 (PST), ""
>> <> wrote:
>>
>>> Hi,
>>>
>>> Thanks, but I already mentioned I'm using Windows Virtual PC
>>> The issue is, I upgraded the host pc from XP to Win7, and I have a VM
>>> which I run previously under VServer2005R2, under XP which I need to
>>> run now under Win7 unattended.
>>> VMWare server unfortunately does not recognize VHD from VPC / VServer,
>>> and I don't want to reinstall the VM (it is complex, properly setup)
>>> I was installed even VServer 2005 on Win7 with some hacks. The issue
>>> is it seems to have some problems, precisely, it from time to time
>>> simple "loose" the virtual network, so my VM cannot get network
>>> connectivity, which is what I need.
>>>
>>> I saw the VM works very well under Windows VPC, so I was trying to use
>>> it.
>>>
>>> Lately I was trying to create a native windows service in C#, which
>>> will start my VM when service starts, and save its state when service
>>> close.
>>> For tests, I create also a small winforms app which does exactly what
>>> service does (for testing purpose). It works (I can start the VM
>>> headless, stop it, query its status.
>>> But when I install the service and try to start it, it does not start
>>> the VM.
>>> I log the errors and this is what I get:
>>>
>>> Source: DistributedCOM
>>> The application-specific permission settings do not grant Local
>>> Activation permission for the COM Server application with CLSID
>>> {9A1774B7-8251-4468-A214-61DCAED9AC2F}
>>> and APPID
>>> {F375390D-5D01-4106-AE15-674BE971C676}
>>> to the user MyPC\MyUser SID (.....) from address LocalHost (Using
>>> LRPC). This security permission can be modified using the Component
>>> Services administrative tool.
>>>
>>> Then
>>> Source: My service
>>>
>>> Error when trying to start virtual machine ZBC Server
>>>
>>> System.TypeInitializationException: The type initializer for
>>> 'VPCLib.VPCHelper' threw an exception. --->
>>> System.UnauthorizedAccessException: Retrieving the COM class factory
>>> for component with CLSID {9A1774B7-8251-4468-A214-61DCAED9AC2F} failed
>>> due to the following error: 80070005.
>>> at VPCLib.VPCHelper..cctor()
>>> --- End of inner exception stack trace ---
>>> at VPCLib.VPCHelper.GetState(String machineName)
>>> at VPCService.VPCService.OnStart(String[] args)
>>>
>>> I was trying to look into Component Services administrative tool,
>>> thinking I could change some settings there to allow Local
>>> Activation, but for Virtual PC, all settings in properties page are
>>> disabled.
>>>
>>> Any thought? Should I post this to another group? Which group?
>>>
>>> Thanks

>>
>> Check out this forum for win7 virtualization:
>> http://social.technet.microsoft.com/...rovirt/threads
>>
>> there are a couple threads on running WinVPC headless and the issues
>> you have.
>>
>> I do not think you will be able to get a VM to start before a user
>> logs in, the app is not written to work like that.
>>

>
> I wonder. I was poking around in bcdedit's help today trying to figure out
> a way to boot to an app, and ran across the following. There's apparently
> a way to /set a vhd as a boot device?
>
>
>
>
> E:\>bcdedit /? formats
>
> The following describes the formats of the data that are required for
> <datatypes> used with the /set command. The format that is required
> depends on
> the <datatypes> that you specify with the /set command. For more
> information
> about the formats associated with each <datatype>, run "bcdedit /? TYPES".
>
> bool A boolean value. The following values correspond to TRUE:
>
> 1, ON, YES, TRUE
>
> The following values correspond to FALSE:
>
> 0, OFF, NO, FALSE
>
> device A device can be one of the following types:
>
> BOOT
> PARTITION=<drive>
> HD_PARTITION=<drive>
> FILE=[<parent>]<path>
> RAMDISK=[<parent>]<path>,<optionsid>
> VHD=[<parent>]<path>,<locatecustom>
>
> The options for these types are:
>
> <drive> A drive letter with a colon and no trailing
> backslashes.
> <parent> (Required) Can be either BOOT, LOCATE, or a
> drive
> letter with colon. The square brackets do not
> indicate that this is optional, but are a
> literal
> part of the syntax.
> <path> A path to the file (or .wim file) from the root
> of
> the parent device.
> <optionsid> The identifier to the device options entry that
> contains the system deployment image (SDI)
> options
> for the RAM disk. This is usually
> {ramdisksdioptions}.
> <locatecustom> Supplies an optional element used to locate a
> device
> within a VHD. The default locate element for a
> device is its application path (systemroot for
> an
> osdevice). Custom values must be specified
> using
> custom element sytax (see -help types
> customtypes),
> for example: locate=custom:22000002.
>
> id An entry identifier, which refers to an entry in the boot
> configuration
> data store. Run "bcdedit /? ID" for more information about
> identifiers.
>
> integer A 64-bit integer type. Some integer types can be set using
> enumerated
> values.
>
> integerlist A list of one or more 64-bit integers, separated by
> spaces.
> This list should not be enclosed in quotation marks.
>
> list An entry identifier list. It contains one or more entry
> identifiers
> separated by spaces. The list should not be enclosed in quotation
> marks.
>
> string A literal string. If it contains spaces, it should be surrounded
> by
> quotation marks ("").


That is a rather different thing. That is to allow you to boot the host
machine from a vhd file rather than from its HDD. There are pretty strict
conditions on what OS you can use.


 
Reply With Quote
 
Bill Blanton
Guest
Posts: n/a

 
      02-18-2010
On 2/18/2010 01:44, Bill Grant wrote:
>
>
> "Bill Blanton" <> wrote in message
> news:#o6b$...
>> On 2/16/2010 19:31, Steve Jain [MVP] wrote:
>>> On Tue, 16 Feb 2010 12:20:21 -0800 (PST), ""
>>> <> wrote:



>>>> Thanks, but I already mentioned I'm using Windows Virtual PC
>>>> The issue is, I upgraded the host pc from XP to Win7, and I have a VM
>>>> which I run previously under VServer2005R2, under XP which I need to
>>>> run now under Win7 unattended.
>>>> VMWare server unfortunately does not recognize VHD from VPC / VServer,
>>>> and I don't want to reinstall the VM (it is complex, properly setup)
>>>> I was installed even VServer 2005 on Win7 with some hacks. The issue
>>>> is it seems to have some problems, precisely, it from time to time
>>>> simple "loose" the virtual network, so my VM cannot get network
>>>> connectivity, which is what I need.
>>>>
>>>> I saw the VM works very well under Windows VPC, so I was trying to use
>>>> it.
>>>>
>>>> Lately I was trying to create a native windows service in C#, which
>>>> will start my VM when service starts, and save its state when service
>>>> close.


>>>
>>> I do not think you will be able to get a VM to start before a user
>>> logs in, the app is not written to work like that.
>>>


>> I wonder. I was poking around in bcdedit's help today trying to figure
>> out a way to boot to an app, and ran across the following. There's
>> apparently a way to /set a vhd as a boot device?
>>
>>
>>
>>
>> E:\>bcdedit /? formats
>>
>> The following describes the formats of the data that are required for
>> <datatypes> used with the /set command. The format that is required
>> depends on
>> the <datatypes> that you specify with the /set command.


>> device A device can be one of the following types:
>>
>> BOOT
>> PARTITION=<drive>
>> HD_PARTITION=<drive>
>> FILE=[<parent>]<path>
>> RAMDISK=[<parent>]<path>,<optionsid>
>> VHD=[<parent>]<path>,<locatecustom>
>>



> That is a rather different thing. That is to allow you to boot the host
> machine from a vhd file rather than from its HDD. There are pretty
> strict conditions on what OS you can use.


Thanks, so is it possible to create a system image using the backup applet, and
then boot from the resulting vhd? Not to hijack this thread,, do you know of any
good references that describe this?

 
Reply With Quote
 
Steve Jain [MVP]
Guest
Posts: n/a

 
      02-18-2010
On Thu, 18 Feb 2010 08:08:32 -0500, Bill Blanton
<> wrote:

>On 2/18/2010 01:44, Bill Grant wrote:
>>
>>
>> "Bill Blanton" <> wrote in message
>> news:#o6b$...
>>> On 2/16/2010 19:31, Steve Jain [MVP] wrote:
>>>> On Tue, 16 Feb 2010 12:20:21 -0800 (PST), ""
>>>> <> wrote:

>
>
>>>>> Thanks, but I already mentioned I'm using Windows Virtual PC
>>>>> The issue is, I upgraded the host pc from XP to Win7, and I have a VM
>>>>> which I run previously under VServer2005R2, under XP which I need to
>>>>> run now under Win7 unattended.
>>>>> VMWare server unfortunately does not recognize VHD from VPC / VServer,
>>>>> and I don't want to reinstall the VM (it is complex, properly setup)
>>>>> I was installed even VServer 2005 on Win7 with some hacks. The issue
>>>>> is it seems to have some problems, precisely, it from time to time
>>>>> simple "loose" the virtual network, so my VM cannot get network
>>>>> connectivity, which is what I need.
>>>>>
>>>>> I saw the VM works very well under Windows VPC, so I was trying to use
>>>>> it.
>>>>>
>>>>> Lately I was trying to create a native windows service in C#, which
>>>>> will start my VM when service starts, and save its state when service
>>>>> close.

>
>>>>
>>>> I do not think you will be able to get a VM to start before a user
>>>> logs in, the app is not written to work like that.
>>>>

>
>>> I wonder. I was poking around in bcdedit's help today trying to figure
>>> out a way to boot to an app, and ran across the following. There's
>>> apparently a way to /set a vhd as a boot device?
>>>
>>>
>>>
>>>
>>> E:\>bcdedit /? formats
>>>
>>> The following describes the formats of the data that are required for
>>> <datatypes> used with the /set command. The format that is required
>>> depends on
>>> the <datatypes> that you specify with the /set command.

>
>>> device A device can be one of the following types:
>>>
>>> BOOT
>>> PARTITION=<drive>
>>> HD_PARTITION=<drive>
>>> FILE=[<parent>]<path>
>>> RAMDISK=[<parent>]<path>,<optionsid>
>>> VHD=[<parent>]<path>,<locatecustom>
>>>

>
>
>> That is a rather different thing. That is to allow you to boot the host
>> machine from a vhd file rather than from its HDD. There are pretty
>> strict conditions on what OS you can use.

>
>Thanks, so is it possible to create a system image using the backup applet, and
>then boot from the resulting vhd? Not to hijack this thread,, do you know of any
>good references that describe this?


No, you can't make a bootable system image from the backup VHD.
Please start a new thread instead.

--
Cheers,
Steve Jain, Virtual Machine MVP
http://vpc.essjae.com/
http://smudj.wordpress.com/
 
Reply With Quote
 
Bill Blanton
Guest
Posts: n/a

 
      02-20-2010
On 2/18/2010 17:03, Steve Jain [MVP] wrote:
> On Thu, 18 Feb 2010 08:08:32 -0500, Bill Blanton
> <> wrote:
>> On 2/18/2010 01:44, Bill Grant wrote:
>>> "Bill Blanton"<> wrote in message


>>>> I was poking around in bcdedit's help today trying to figure
>>>> out a way to boot to an app, and ran across the following. There's
>>>> apparently a way to /set a vhd as a boot device?
>>>>



>>> That is a rather different thing. That is to allow you to boot the host
>>> machine from a vhd file rather than from its HDD. There are pretty
>>> strict conditions on what OS you can use.

>>
>> Thanks, so is it possible to create a system image using the backup applet, and
>> then boot from the resulting vhd? Not to hijack this thread,, do you know of any
>> good references that describe this?

>
> No, you can't make a bootable system image from the backup VHD.
> Please start a new thread instead.


Thanks. I've since done some research and better understand the mechanics and
conditions that you and Mr Grant refer to.


 
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




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