xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Generic PV Guests on XCP?
@ 2010-03-24 18:14 Phil Winterfield (winterfi)
  2010-03-24 19:45 ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Winterfield (winterfi) @ 2010-03-24 18:14 UTC (permalink / raw)
  To: xen-devel, xen-api
  Cc: Don Banks (donbanks), DavidScott, IanCampbell, David.Cottingham


[-- Attachment #1.1: Type: text/plain, Size: 2398 bytes --]

Has anyone attempted to run a generic (read non Linux/Windows)
paravirtualized guest OS instance on XCP -0.1.1?  A good example would
just be building mini-OS and running it as a guest instance on XCP.  My
company has PV OS prototype version of one of its products that has been
running on non-XCP versions of Xen and I would like to evaluate whether
XCP is a suitable platform.  In order to do this I need to get past some
pretty basic questions and issues.  For example, if you were to run
mini-OS in a VM, what template would you start with?  I started out with
"Other install media" but it is unclear if that is appropriate.  I was
able to create the guest instance shown below, but that leads to the
other questions, i.e.

 

1)      How do the old config file startup parameters for my OS instance
map to the new 'xe' syntax, e.g. 

 

memory = 2048

vcpu=1

on_crash = 'coredump-destroy'

 

2)      How do I connect to the serial console on the OS instance?  For
instance, when I do:

 

[root@xenserver-wvgdltag ios]# xe console-list

uuid ( RO)             : 0d5dfe39-c2e7-c042-6a2c-b02ca0837cd8

          vm-uuid ( RO): e4a25680-8b48-50d2-18bf-a527b4a959c7

    vm-name-label ( RO): PVGonXen

         protocol ( RO): RFB

         location ( RO):
https://171.69.216.75/console?ref=OpaqueRef:8013f91e-ffc0-2d72-8883-d0d1
4d38130a

.

.

The https connection is not found when I try to open it.   Basically, I
want to do the equivalent of 'xm console uid' or 'xm create -c uid'.

 

 

Thanks for your help,

Phil 

 

 

[root@xenserver-wvgdltag ios]# xe vm-install template="Other install
media" new-name-label=PVGonXen

e4a25680-8b48-50d2-18bf-a527b4a959c7

 

[root@xenserver-wvgdltag ios]# xe vm-param-set
uuid=e4a25680-8b48-50d2-18bf-a527b4a959c7 \

> PV-kernel='/boot/pvg/i86bi-ipbase-ms' \

> PV-args= \

> PV-bootloader= \

> PV-bootloader-args= 

 

[root@xenserver-wvgdltag ios]# xe vm-start
uuid=e4a25680-8b48-50d2-18bf-a527b4a959c7

[root@xenserver-wvgdltag ios]# xe vm-list

uuid ( RO)           : 26e0a368-af72-42ec-afb1-4291dc7d6b39

     name-label ( RW): Control domain on host: xenserver-wvgdltag

    power-state ( RO): running

 

 

uuid ( RO)           : e4a25680-8b48-50d2-18bf-a527b4a959c7

     name-label ( RW): PVGonXen

    power-state ( RO): running


[-- Attachment #1.2: Type: text/html, Size: 8100 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Generic PV Guests on XCP?
  2010-03-24 18:14 Generic PV Guests on XCP? Phil Winterfield (winterfi)
@ 2010-03-24 19:45 ` Ian Campbell
       [not found]   ` <1269459935.28761.910.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  2010-03-29 18:21   ` Phil Winterfield (winterfi)
  0 siblings, 2 replies; 7+ messages in thread
From: Ian Campbell @ 2010-03-24 19:45 UTC (permalink / raw)
  To: Phil Winterfield (winterfi)
  Cc: xen-devel@lists.xensource.com, DavidScott@eu.citrix.com,
	xen-api@lists.xensource.com, Don Banks (donbanks),
	IanCampbell@eu.citrix.com, David.Cottingham@eu.citrix.com

On Wed, 2010-03-24 at 18:14 +0000, Phil Winterfield (winterfi) wrote: 
> Has anyone attempted to run a generic (read non Linux/Windows)
> paravirtualized guest OS instance on XCP -0.1.1?  A good example would
> just be building mini-OS and running it as a guest instance on XCP.
> My company has PV OS prototype version of one of its products that has
> been running on non-XCP versions of Xen and I would like to evaluate
> whether XCP is a suitable platform.  In order to do this I need to get
> past some pretty basic questions and issues.  For example, if you were
> to run mini-OS in a VM, what template would you start with?  I started
> out with "Other install media" but it is unclear if that is
> appropriate.  I was able to create the guest instance shown below, but
> that leads to the other questions, i.e.

I don't think you want to start from a template here, since none of the
existing ones meet your needs/usecase. You can create a basic VM
instance with "xe vm-create" and then configure that however you need by
modifying the various fields on the VM object. You may choose to convert
it to a template for convenience of instantiating multiple copies (using
"xe vm-install").

> 1)     How do the old config file startup parameters for my OS
> instance map to the new ‘xe’ syntax, e.g. 

Given a VM UUID (call it $VM) returned by xe vm-create you can do "xe
vm-param-set uuid=$VM param1=val1 param2=val2" just like you have been
doing. I think the fields are all documented in the reference manual --
unfortunately I can't find the XCP version anywhere online. Does anyone
know where this is?

Until that document is found I think the core stuff you are interested
in the same as on XenServer stuff so that reference doc should be enough
to get you going:
http://docs.vmd.citrix.com/XenServer/5.5.0/1.0/en_gb/api/docs/html/browser.html

Once you have created the VM you probably want to set PV-bootloader,
PV-kernel, PV-ramdisk, PV-args as you are now.

If you aren't going to create a template then you can just use "xe
vm-disk-add" to add disks to your VM as required. If you are going to
convert to a template and install from there then it would be better to
set other-config:disks to a suitable snippet of XML to create the
appropriate disks at vm-install time -- see the existing templates for
an example of the syntax.

> memory = 2048

I think you have to use xe vm-memory-{static,dynamic}-range-set instead
of vm-param-set for these ones. Each one takes a min and a max. In the
first instance I'd just set them all the same, i.e. "2048MiB" but in the
future if you are interested in enabling ballooning you can set ranges
etc.

> vcpu=1

Set VCPUs-max and VCPUs-at-startup. Again I would set them to the same
value to start with until you want to be able to dynamically add more
VCPUs than you started with to your VM without rebooting.

> on_crash = 'coredump-destroy'

You can set "action-after-crash" to one of "Preserve", "Destroy",
"Restart". I don't know if there is a direct equivalent to
coredump-destroy in XCP.

> 2)     How do I connect to the serial console on the OS instance?  For
> instance, when I do:

The consoles are exported via XenAPI in VNC format. You need a XenAPI
client which is capable of attaching to these. Looks like
http://www.xvpsource.org/ is the place to look?

Personally I usually use /opt/xensource/debug/vncproxy (copied to my
workstation) to create a local socket on my workstation which is proxied
to the XCP host and then run vncviewer locally against that proxy.

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xen-devel] Generic PV Guests on XCP?
       [not found]   ` <1269459935.28761.910.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2010-03-24 20:11     ` Ian Campbell
  2010-03-24 20:50     ` Anil Madhavapeddy
  1 sibling, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2010-03-24 20:11 UTC (permalink / raw)
  To: Phil Winterfield (winterfi)
  Cc: Ian Campbell,
	xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org,
	xen-api-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org, Scott,
	Don Banks (donbanks)

On Wed, 2010-03-24 at 19:45 +0000, Ian Campbell wrote:
> 
> Given a VM UUID (call it $VM) returned by xe vm-create you can do "xe
> vm-param-set uuid=$VM param1=val1 param2=val2" just like you have been
> doing. I think the fields are all documented in the reference manual
> -- unfortunately I can't find the XCP version anywhere online. Does
> anyone know where this is? 

I've been pointed to:
http://www.xen.org/files/XenCloud/ocamldoc/apidoc.html

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: [Xen-devel] Generic PV Guests on XCP?
       [not found]   ` <1269459935.28761.910.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  2010-03-24 20:11     ` [Xen-devel] " Ian Campbell
@ 2010-03-24 20:50     ` Anil Madhavapeddy
  2010-03-25 19:48       ` [Xen-API] " Phil Winterfield (winterfi)
  1 sibling, 1 reply; 7+ messages in thread
From: Anil Madhavapeddy @ 2010-03-24 20:50 UTC (permalink / raw)
  To: Ian Campbell
  Cc: xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org,
	Phil Winterfield (winterfi),
	DavidScott-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org,
	xen-api-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org,
	Don Banks (donbanks),
	IanCampbell-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org,
	David.Cottingham-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org

On 24 Mar 2010, at 19:45, Ian Campbell wrote:
> 
> I don't think you want to start from a template here, since none of the
> existing ones meet your needs/usecase. You can create a basic VM
> instance with "xe vm-create" and then configure that however you need by
> modifying the various fields on the VM object. You may choose to convert
> it to a template for convenience of instantiating multiple copies (using
> "xe vm-install").

I find it a lot easier to clone the "Other Install Media" template and just set the 3 fields to convert it into a PV template (clear HVM-boot-policy, set PV-kernel to the MiniOS file in dom0, PV-args if you need).  I think my old blog entry on Ubuntu HVM->PV has more of the gory details, but most isnt necessary for MiniOS: http://community.citrix.com/x/4YINAg

> 
> The consoles are exported via XenAPI in VNC format. You need a XenAPI
> client which is capable of attaching to these. Looks like
> http://www.xvpsource.org/ is the place to look?
> 
> Personally I usually use /opt/xensource/debug/vncproxy (copied to my
> workstation) to create a local socket on my workstation which is proxied
> to the XCP host and then run vncviewer locally against that proxy.

To access the raw serial console by text (the equivalent of 'xm create -c'), you first need to disable the VNC proxy from spawning (set the VM other-config:disable_pv_vnc field to something), start the VM paused, and then connect to it directly using xenconsole from dom0, and then unpause the VM

I use this small script in dom0 to automate this for a given VM uuid:
http://github.com/avsm/mirage/blob/master/scripts/run_minios

Although to be honest, for MiniOS work, I just find it far more convenient to just use the lower-level Python toolstack, and then switch to XCP for the higher level management stuff.

-anil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [Xen-API] Re: Generic PV Guests on XCP?
  2010-03-24 20:50     ` Anil Madhavapeddy
@ 2010-03-25 19:48       ` Phil Winterfield (winterfi)
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Winterfield (winterfi) @ 2010-03-25 19:48 UTC (permalink / raw)
  To: Anil Madhavapeddy, Ian Campbell; +Cc: Don Banks (donbanks), xen-devel, xen-api

Anil,  I am interested in your suggestion to use domain0 and the
lower-level Python tool stack for initial development on an XCP
platform.  Could you tell me more about your technique for doing that,
i.e. how do I go about getting access to domain0 and the 'xm' python api
set on XCP?

Thanks,
Phil


> >
> > The consoles are exported via XenAPI in VNC format. You need a
XenAPI
> > client which is capable of attaching to these. Looks like
> > http://www.xvpsource.org/ is the place to look?
> >
> > Personally I usually use /opt/xensource/debug/vncproxy (copied to my
> > workstation) to create a local socket on my workstation which is
> proxied
> > to the XCP host and then run vncviewer locally against that proxy.
> 
> To access the raw serial console by text (the equivalent of 'xm create
> -c'), you first need to disable the VNC proxy from spawning (set the
VM
> other-config:disable_pv_vnc field to something), start the VM paused,
> and then connect to it directly using xenconsole from dom0, and then
> unpause the VM
> 
> I use this small script in dom0 to automate this for a given VM uuid:
> http://github.com/avsm/mirage/blob/master/scripts/run_minios
> 
> Although to be honest, for MiniOS work, I just find it far more
> convenient to just use the lower-level Python toolstack, and then
> switch to XCP for the higher level management stuff.
> 
> -anil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Generic PV Guests on XCP?
  2010-03-24 19:45 ` Ian Campbell
       [not found]   ` <1269459935.28761.910.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2010-03-29 18:21   ` Phil Winterfield (winterfi)
  2010-03-29 18:30     ` Ian Campbell
  1 sibling, 1 reply; 7+ messages in thread
From: Phil Winterfield (winterfi) @ 2010-03-29 18:21 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Don Banks (donbanks), xen-devel, David.Cottingham, xen-api

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

Ian- 

I have taken your advice and created a generic template using vm-create, but for some reason it doesn’t like the kernel path, even though it is clearly accessible - see below.  Any ideas?

Phil


[root@xenserver-wvgdltag ~]# xe vm-create name-label=IOSonXen name-description="Paravirtualized IOS on Xen"
5c56afe3-a729-bcaa-a543-d87987167a3d
[root@xenserver-wvgdltag ~]# xe vm-param-set uuid=5c56afe3-a729-bcaa-a543-d87987167a3d \
> PV-kernel='/boot/ios/i86bi_xen-ipbase-ms' \
> PV-args= \
> PV-bootloader= \
> PV-bootloader-args= \
> memory-static-min=2048 \
> VCPUs-at-startup=1 \
> other-config:pause=1 \
> other-config:disable_pv_vnc=1
[root@xenserver-wvgdltag ~]# xe vm-start uuid=5c56afe3-a729-bcaa-a543-d87987167a3d
Caller not allowed to perform this operation.
message: illegal kernel path /boot/ios/i86bi_xen-ipbase-ms
[root@xenserver-wvgdltag ~]# ls -l /boot/ios/i86bi_xen-ipbase-ms
-rwxr-xr-x 1 root root 61649099 Mar 23 13:37 /boot/ios/i86bi_xen-ipbase-ms
[root@xenserver-wvgdltag ~]#


[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Generic PV Guests on XCP?
  2010-03-29 18:21   ` Phil Winterfield (winterfi)
@ 2010-03-29 18:30     ` Ian Campbell
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2010-03-29 18:30 UTC (permalink / raw)
  To: Phil Winterfield (winterfi)
  Cc: Don Banks (donbanks), xen-devel@lists.xensource.com,
	David.Cottingham@eu.citrix.com, xen-api@lists.xensource.com

On Mon, 2010-03-29 at 19:21 +0100, Phil Winterfield (winterfi) wrote: 
> Ian- 
> 
> I have taken your advice and created a generic template using
> vm-create, but for some reason it doesn’t like the kernel path, even
> though it is clearly accessible - see below.  Any ideas?

Some security stuff got added to xapi recently which requires that the
guest kernel and ramdisk be under "/boot/guest/". I'm not really sure
why -- I think it's because with RBAC non root users with the VM admin
role can set PV-kernel/PV-initrd/etc (imagine setting PV-initrd
to /etc/shadow) but I'm not sure why restricting to just /boot wasn't
sufficiently secure.

If you move (or symlink) your stuff to /boot/guest and
use /boot/guest/ios/i86bi_etcetc I think things should work.

Ian.

> 
> Phil
> 
> 
> [root@xenserver-wvgdltag ~]# xe vm-create name-label=IOSonXen name-description="Paravirtualized IOS on Xen"
> 5c56afe3-a729-bcaa-a543-d87987167a3d
> [root@xenserver-wvgdltag ~]# xe vm-param-set uuid=5c56afe3-a729-bcaa-a543-d87987167a3d \
> > PV-kernel='/boot/ios/i86bi_xen-ipbase-ms' \
> > PV-args= \
> > PV-bootloader= \
> > PV-bootloader-args= \
> > memory-static-min=2048 \
> > VCPUs-at-startup=1 \
> > other-config:pause=1 \
> > other-config:disable_pv_vnc=1
> [root@xenserver-wvgdltag ~]# xe vm-start uuid=5c56afe3-a729-bcaa-a543-d87987167a3d
> Caller not allowed to perform this operation.
> message: illegal kernel path /boot/ios/i86bi_xen-ipbase-ms
> [root@xenserver-wvgdltag ~]# ls -l /boot/ios/i86bi_xen-ipbase-ms
> -rwxr-xr-x 1 root root 61649099 Mar 23 13:37 /boot/ios/i86bi_xen-ipbase-ms
> [root@xenserver-wvgdltag ~]#
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-29 18:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-24 18:14 Generic PV Guests on XCP? Phil Winterfield (winterfi)
2010-03-24 19:45 ` Ian Campbell
     [not found]   ` <1269459935.28761.910.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-24 20:11     ` [Xen-devel] " Ian Campbell
2010-03-24 20:50     ` Anil Madhavapeddy
2010-03-25 19:48       ` [Xen-API] " Phil Winterfield (winterfi)
2010-03-29 18:21   ` Phil Winterfield (winterfi)
2010-03-29 18:30     ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).