Xen device support

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Xen device support

Arijit Ganguly
All,

I have just got my hands dirty on Xen and  had a few questions.

1. Is it possible to connect virtual CD-ROM/Floppy devices to Xen. I don't see such parameters on the web page:
http://www.cl.cam.ac.uk/Research/SRG/netos/xen/readmes/user/user.html#SECTION03210000000000000000

2. In the disk configuration, we specify how devices on the host appear inside the guest. Something like [phy:/dev/sda1,/dev/hda1,w'] means that the logical device /dev/sda1 appears as the logical device /dev/hda1 insode the Xen guest.

Is it possible for Xen itself to detect the preexisting partitions (which we have created from domain 0)  on the device we are trying to connect. Something like:

[phy:/dev/sda,/dev/hda, 'w'], just mapping some device to a virtual physical device on guest. The ghuest OS be able to detect the partitions drawn on /dev/sda from domain 0
I tried but does't seem to work.

a. The device would appear as /dev/hda0 and not as /dev/hda.
b. fdisk even shows the partitions on the /dev/hda0, but /dev file system doesn't have any corresponding devices.

Essentially, we seem to be talking more on the logical drives on the guest (a higher level abstraction when compared to full virtualization as VMware or virtual PC would do).

Looking forward to replies.

Arijit

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Xen device support

Paul Jakma
On Thu, 26 May 2005, Arijit Ganguly wrote:

> Is it possible for Xen itself to detect the preexisting partitions
> (which we have created from domain 0) on the device we are trying
> to connect. Something like:
>
> [phy:/dev/sda,/dev/hda, 'w'], just mapping some device to a virtual
> physical device on guest. The ghuest OS be able to detect the
> partitions drawn on /dev/sda from domain 0 I tried but does't seem
> to work.

http://bugzilla.xensource.com/cgi-bin/bugzilla/show_bug.cgi?id=43

> a. The device would appear as /dev/hda0 and not as /dev/hda.
> b. fdisk even shows the partitions on the /dev/hda0, but /dev file system
> doesn't have any corresponding devices.

It does seem to find the first partition, just doesnt scan for any
others.

I'd like to be able to assign whole disks to domU's and have domU's
handle partitioning particularly so that Linux extX fs labels aren't
visible to the dom0. And to simplify management of disks.

regards,
--
Paul Jakma [hidden email] [hidden email] Key ID: 64A2FF6A
Fortune:
If you find a solution and become attached to it, the solution may become
your next problem.

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Xen guest swap use

Arijit Ganguly

Since Xen has trouble identifying all partitions on a virtual disk, what does it do about the swap partition (if present on the virtual disk). Does that need to be specified explicitly in the
configuration option?

Arijit

On 5/26/05, Paul Jakma <[hidden email]> wrote:
On Thu, 26 May 2005, Arijit Ganguly wrote:

> Is it possible for Xen itself to detect the preexisting partitions
> (which we have created from domain 0) on the device we are trying
> to connect. Something like:
>
> [phy:/dev/sda,/dev/hda, 'w'], just mapping some device to a virtual
> physical device on guest. The ghuest OS be able to detect the
> partitions drawn on /dev/sda from domain 0 I tried but does't seem
> to work.

http://bugzilla.xensource.com/cgi-bin/bugzilla/show_bug.cgi?id=43

> a. The device would appear as /dev/hda0 and not as /dev/hda.
> b. fdisk even shows the partitions on the /dev/hda0, but /dev file system
> doesn't have any corresponding devices.

It does seem to find the first partition, just doesnt scan for any
others.

I'd like to be able to assign whole disks to domU's and have domU's
handle partitioning particularly so that Linux extX fs labels aren't
visible to the dom0. And to simplify management of disks.

regards,
--
Paul Jakma      [hidden email]   [hidden email]  Key ID: 64A2FF6A
Fortune:
If you find a solution and become attached to it, the solution may become
your next problem.


_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

how to install a comeplete guest OS from a CD

JIT LEISHANGTHEM
hi
   I was wodering how to install a whole guest OS by
booting off from the CDROM as in VMware. I did install
a debian base system using debootstrap. But what if i
want to install Fedora Core. I created the diskimages
for "/" and swap as given in the XEN manual using dd.

regards'
JIT

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Xen guest swap use

John Fairbairn
In reply to this post by Arijit Ganguly
I use file backed, but here's what i do for swap..
disk =
['file:/XEN/images/CentOS-4.0.img,sda1,w','file:/XEN/images/swapfile.img,sda2,w']

then in the xenU's fstab, make the appropriate swap entry.

/dev/sda2   swap   swap   defaults        0 0

I would think you'd just have to adjust the file: line to your setup.
Hope that helps some.

John

> Since Xen has trouble identifying all partitions on a virtual disk, what
> does it do about the swap partition (if present on the virtual disk). Does
> that need to be specified explicitly in the
> configuration option?
>
> Arijit
>
> On 5/26/05, Paul Jakma <[hidden email]> wrote:
>>
>> On Thu, 26 May 2005, Arijit Ganguly wrote:
>>
>> > Is it possible for Xen itself to detect the preexisting partitions
>> > (which we have created from domain 0) on the device we are trying
>> > to connect. Something like:
>> >
>> > [phy:/dev/sda,/dev/hda, 'w'], just mapping some device to a virtual
>> > physical device on guest. The ghuest OS be able to detect the
>> > partitions drawn on /dev/sda from domain 0 I tried but does't seem
>> > to work.
>>
>> http://bugzilla.xensource.com/cgi-bin/bugzilla/show_bug.cgi?id=43
>>
>> > a. The device would appear as /dev/hda0 and not as /dev/hda.
>> > b. fdisk even shows the partitions on the /dev/hda0, but /dev file
>> system
>> > doesn't have any corresponding devices.
>>
>> It does seem to find the first partition, just doesnt scan for any
>> others.
>>
>> I'd like to be able to assign whole disks to domU's and have domU's
>> handle partitioning particularly so that Linux extX fs labels aren't
>> visible to the dom0. And to simplify management of disks.
>>
>> regards,
>> --
>> Paul Jakma [hidden email] [hidden email] Key ID: 64A2FF6A
>> Fortune:
>> If you find a solution and become attached to it, the solution may
>> become
>> your next problem.
>>
> _______________________________________________
> Xen-users mailing list
> [hidden email]
> http://lists.xensource.com/xen-users



_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: how to install a comeplete guest OS from a CD

Marius Hårstad Kjerkreit
In reply to this post by JIT LEISHANGTHEM
I suppose you would simply set up the domU to load the same kernel
image and initrd as isolinux does from the cd. You'll also have to
make the cd available to the dom somehow.

regards,
-Marius

On 28/05/05, JIT LEISHANGTHEM <[hidden email]> wrote:
> hi
>    I was wodering how to install a whole guest OS by
> booting off from the CDROM as in VMware. I did install
> a debian base system using debootstrap. But what if i
> want to install Fedora Core. I created the diskimages
> for "/" and swap as given in the XEN manual using dd.
>
> regards'
> JIT

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

RE: Xen device support

Ian Pratt
In reply to this post by Arijit Ganguly
> I'd like to be able to assign whole disks to domU's and have
> domU's handle partitioning particularly so that Linux extX fs
> labels aren't visible to the dom0. And to simplify management
> of disks.

I thought Vincent had this working again (it needed to be ported from
2.4 to 2.6).

Have you tried Xen 2.0.6 or the unstable tree?

Thanks,
Ian

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

RE: Xen device support

Paul Jakma
On Sat, 28 May 2005, Ian Pratt wrote:

> I thought Vincent had this working again (it needed to be ported
> from 2.4 to 2.6).
>
> Have you tried Xen 2.0.6 or the unstable tree?

This was with 'unstable' as provided by the packages in the FC4
development tree.

regards,
--
Paul Jakma [hidden email] [hidden email] Key ID: 64A2FF6A
Fortune:
Another such victory over the Romans, and we are undone.
  -- Pyrrhus

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

RE: Xen device support

Paul Jakma-2
In reply to this post by Ian Pratt
On Sat, 28 May 2005, Ian Pratt wrote:

> Have you tried Xen 2.0.6 or the unstable tree?

I just tried with the latest FC4dev xenU kernel:

Linux version 2.6.11-1.1363_FC4xenU
([hidden email]) (gcc version 4.0.0 20050519 (Red
Hat 4.0.0-8)) #1 SMP Wed May 25 20:20:47 EDT 2005

still the same:

xen_blk: Initialising virtual block device driver
  hda:<6>xen_net: Initialising virtual ethernet driver.
  hda1 < >

disk = [ 'phy:VG01/dom_allevil_lv,hda,w']

#disk = [ 'phy:VG01/dom_allevil_lv,hda,w',
#       'phy:mapper/dom_allevil_lv1,hda1,w',
#        'phy:mapper/dom_allevil_lv2,hda2,w',
#        'phy:mapper/dom_allevil_lv5,hda5,w' ]

If I reverse the commenting of above 'disk' entries, it works.

regards,
--
Paul Jakma [hidden email] [hidden email] Key ID: 64A2FF6A
Fortune:
To thine own self be true.  (If not that, at least make some money.)

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Xen device support

Vincent Hanquez
In reply to this post by Ian Pratt
On Sat, May 28, 2005 at 07:51:47PM +0100, Ian Pratt wrote:
> > I'd like to be able to assign whole disks to domU's and have
> > domU's handle partitioning particularly so that Linux extX fs
> > labels aren't visible to the dom0. And to simplify management
> > of disks.
>
> I thought Vincent had this working again (it needed to be ported from
> 2.4 to 2.6).

it definitely used to worked. I'll try with latest unstable

--
Vincent Hanquez

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: how to install a comeplete guest OS from a CD

Martin Maney
In reply to this post by Marius Hårstad Kjerkreit
On Sat, May 28, 2005 at 09:45:40AM +0200, Marius H?rstad Kjerkreit wrote:
> I suppose you would simply set up the domU to load the same kernel
> image and initrd as isolinux does from the cd. You'll also have to
> make the cd available to the dom somehow.

The problem is that the installation kernel is going to expect to have
a normal PC's hardware at its command and knows nothing about Xen's
paravirtualization.  Likewise the hardware detection routines & so
forth.  Come the day we have VT or Pacifica CPUs maybe this trick can
be made to work within Xen's scope.

> On 28/05/05, JIT LEISHANGTHEM <[hidden email]> wrote:
> >    I was wodering how to install a whole guest OS by
> > booting off from the CDROM as in VMware. I did install
> > a debian base system using debootstrap. But what if i
> > want to install Fedora Core. I created the diskimages
> > for "/" and swap as given in the XEN manual using dd.

Scope out Progeny's rpmstrap, which alleges to do for Fedora Core 2,
FC3, and CentOS4 what debootstrap has long done for Debian.  I just
added that to my scratchpad http://www.two14.net/xen/InstallingGuests
after reading about it in an earlier post.  In another week or two I'll
have time once again to play with Xen and transfer that and any other
material that's still relevant over to the official Wiki.

--
Some people, when confronted with a problem, think
"I know, I'll use regular expressions."    
Now they have two problems  -- Jamie Zawinski

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users