From: Bill Blanton on
On 2/16/2010 19:31, Steve Jain [MVP] wrote:
> On Tue, 16 Feb 2010 12:20:21 -0800 (PST), "bzamfir(a)gmail.com"
> <bzamfir(a)gmail.com> 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/Forums/en-US/w7itprovirt/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 ("").
From: Bill Grant on


"Bill Blanton" <bblanton(a)REMOVEmagicnet.net> wrote in message
news:#o6b$BFsKHA.4652(a)TK2MSFTNGP02.phx.gbl...
> On 2/16/2010 19:31, Steve Jain [MVP] wrote:
>> On Tue, 16 Feb 2010 12:20:21 -0800 (PST), "bzamfir(a)gmail.com"
>> <bzamfir(a)gmail.com> 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/Forums/en-US/w7itprovirt/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.


From: Bill Blanton on
On 2/18/2010 01:44, Bill Grant wrote:
>
>
> "Bill Blanton" <bblanton(a)REMOVEmagicnet.net> wrote in message
> news:#o6b$BFsKHA.4652(a)TK2MSFTNGP02.phx.gbl...
>> On 2/16/2010 19:31, Steve Jain [MVP] wrote:
>>> On Tue, 16 Feb 2010 12:20:21 -0800 (PST), "bzamfir(a)gmail.com"
>>> <bzamfir(a)gmail.com> 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?

From: Steve Jain [MVP] on
On Thu, 18 Feb 2010 08:08:32 -0500, Bill Blanton
<bblanton(a)REMOVEmagicnet.net> wrote:

>On 2/18/2010 01:44, Bill Grant wrote:
>>
>>
>> "Bill Blanton" <bblanton(a)REMOVEmagicnet.net> wrote in message
>> news:#o6b$BFsKHA.4652(a)TK2MSFTNGP02.phx.gbl...
>>> On 2/16/2010 19:31, Steve Jain [MVP] wrote:
>>>> On Tue, 16 Feb 2010 12:20:21 -0800 (PST), "bzamfir(a)gmail.com"
>>>> <bzamfir(a)gmail.com> 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/
From: Bill Blanton on
On 2/18/2010 17:03, Steve Jain [MVP] wrote:
> On Thu, 18 Feb 2010 08:08:32 -0500, Bill Blanton
> <bblanton(a)REMOVEmagicnet.net> wrote:
>> On 2/18/2010 01:44, Bill Grant wrote:
>>> "Bill Blanton"<bblanton(a)REMOVEmagicnet.net> 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.