Hi all, I am in the process of building a new Xen server from scratch and wanted to ask a couple of questions about best practices. First, should the guest domains be image files or LVM''s or just regular ext3 partitions? What are the pros and/or cons of each? Second, since the Dom0 is supposed to be kept secure, and most of my servers I don''t install any X11 server on, is there any security risk installing an X11 server on the Dom0 in order to take advantage of the virt-manager GUI interface? Thank you in advance for any thoughts and or opinions. Denise Lopez UCLA - Center for Digital Humanities Network Services Linux Systems Engineer 337 Charles E. Young Drive East PPB 1020 Los Angeles, CA 90095-1499 310/206-8216
On Nov 28, 2007 5:31 PM, Lopez, Denise <dlopez@humnet.ucla.edu> wrote:> > > > > Hi all, > > > > I am in the process of building a new Xen server from scratch and wanted to > ask a couple of questions about best practices. > > > > First, should the guest domains be image files or LVM''s or just regular ext3 > partitions? What are the pros and/or cons of each? >Are you talking about inside the guests or where the guests are in DomO? For the guests files on Dom0, I am using image files stored on DomO''s LVM.. though I may follow some howtos on shared storage so that failover works in the future. Inside the guests, I am using ext3 direct in the image versus using LVM+ext3. I wanted things to be simple to understand for myself.> > > Second, since the Dom0 is supposed to be kept secure, and most of my > servers I don''t install any X11 server on, is there any security risk > installing an X11 server on the Dom0 in order to take advantage of the > virt-manager GUI interface? > >I do not know of any major security issues... but you should use security in depth. 1) secure the logins 2) firewall the machine so that only ssh X port forwarding is available 3) keep the system up-2-date. 4) follow other best practices for securing a system. -- Stephen J Smoogen. -- CSIRT/Linux System Administrator How far that little candle throws his beams! So shines a good deed in a naughty world. = Shakespeare. "The Merchant of Venice"
Are you talking about inside the guests or where the guests are in DomO? I was talking about where the guests are in Dom0. Denise Lopez -----Original Message----- From: Stephen John Smoogen [mailto:smooge@gmail.com] Sent: Wednesday, November 28, 2007 4:39 PM To: Lopez, Denise Cc: fedora-xen@redhat.com Subject: Re: [Fedora-xen] Best practices questions On Nov 28, 2007 5:31 PM, Lopez, Denise <dlopez@humnet.ucla.edu> wrote:> > > > > Hi all, > > > > I am in the process of building a new Xen server from scratch andwanted to> ask a couple of questions about best practices. > > > > First, should the guest domains be image files or LVM''s or justregular ext3> partitions? What are the pros and/or cons of each? >Are you talking about inside the guests or where the guests are in DomO? For the guests files on Dom0, I am using image files stored on DomO''s LVM.. though I may follow some howtos on shared storage so that failover works in the future. Inside the guests, I am using ext3 direct in the image versus using LVM+ext3. I wanted things to be simple to understand for myself.> > > Second, since the Dom0 is supposed to be kept secure, and most of my > servers I don''t install any X11 server on, is there any security risk > installing an X11 server on the Dom0 in order to take advantage of the > virt-manager GUI interface? > >I do not know of any major security issues... but you should use security in depth. 1) secure the logins 2) firewall the machine so that only ssh X port forwarding is available 3) keep the system up-2-date. 4) follow other best practices for securing a system. -- Stephen J Smoogen. -- CSIRT/Linux System Administrator How far that little candle throws his beams! So shines a good deed in a naughty world. = Shakespeare. "The Merchant of Venice"
Denise, Personally, I recommend lvm or partitions in Dom0 vs image files for performance reasons. The choice to use LVM or partitions can really safely be left to whichever you are more comfortable with. If you want to be able to resize DomUs, then lvm might be useful, but if that can be done, it is probably quite complicated. Dustin -----Original Message----- From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Lopez, Denise Sent: Wednesday, November 28, 2007 19:43 To: fedora-xen@redhat.com Subject: RE: [Fedora-xen] Best practices questions Are you talking about inside the guests or where the guests are in DomO? I was talking about where the guests are in Dom0. Denise Lopez -----Original Message----- From: Stephen John Smoogen [mailto:smooge@gmail.com] Sent: Wednesday, November 28, 2007 4:39 PM To: Lopez, Denise Cc: fedora-xen@redhat.com Subject: Re: [Fedora-xen] Best practices questions On Nov 28, 2007 5:31 PM, Lopez, Denise <dlopez@humnet.ucla.edu> wrote:> > > > > Hi all, > > > > I am in the process of building a new Xen server from scratch andwanted to> ask a couple of questions about best practices. > > > > First, should the guest domains be image files or LVM''s or justregular ext3> partitions? What are the pros and/or cons of each? >Are you talking about inside the guests or where the guests are in DomO? For the guests files on Dom0, I am using image files stored on DomO''s LVM.. though I may follow some howtos on shared storage so that failover works in the future. Inside the guests, I am using ext3 direct in the image versus using LVM+ext3. I wanted things to be simple to understand for myself.> > > Second, since the Dom0 is supposed to be kept secure, and most of my > servers I don''t install any X11 server on, is there any security risk > installing an X11 server on the Dom0 in order to take advantage of the > virt-manager GUI interface? > >I do not know of any major security issues... but you should use security in depth. 1) secure the logins 2) firewall the machine so that only ssh X port forwarding is available 3) keep the system up-2-date. 4) follow other best practices for securing a system. -- Stephen J Smoogen. -- CSIRT/Linux System Administrator How far that little candle throws his beams! So shines a good deed in a naughty world. = Shakespeare. "The Merchant of Venice" -- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen
"Lopez, Denise" <dlopez@humnet.ucla.edu> writes:> Hi all, > > > > I am in the process of building a new Xen server from scratch and wanted > to ask a couple of questions about best practices. > > > > First, should the guest domains be image files or LVM''s or just regular > ext3 partitions? What are the pros and/or cons of each?Image files are slow. Sparse image files lead to *nasty* domU data corruption when you run out of space in the filesystem containing the image file. LVM vs. regular partitions is the usual deal: LVM gives you more flexibility. You might find that you appreciate the flexibility even more when you run guests.> Second, since the Dom0 is supposed to be kept secure, and most of my > servers I don''t install any X11 server on, is there any security risk > installing an X11 server on the Dom0 in order to take advantage of the > virt-manager GUI interface?X is network transparent. Why not use a remote display? You don''t need an X server in dom0 for that.> Thank you in advance for any thoughts and or opinions. > > > > Denise Lopez
On Mon, Dec 03, 2007 at 10:48:59AM +0100, Markus Armbruster wrote:> "Lopez, Denise" <dlopez@humnet.ucla.edu> writes: > > > Hi all, > > > > > > > > I am in the process of building a new Xen server from scratch and wanted > > to ask a couple of questions about best practices. > > > > > > > > First, should the guest domains be image files or LVM''s or just regular > > ext3 partitions? What are the pros and/or cons of each? > > Image files are slow. Sparse image files lead to *nasty* domU data > corruption when you run out of space in the filesystem containing the > image file.Actually that''s not true. You will definitely get I/O errors in the DomU if Dom0 runs out of space. Journalling FS will save you though. If you kill the guest, add more Dom0 space, and start the guest again it should recover just fine. This is why I went to great lengths to fixing Xen 3.0.3 to make sure I/O errors are actually propagated to the guest, rather than being dropped on the floor in Dom0 pretending it was all OK like in the bad Xen 3.0.2 days. The issue with sparse files is that they have really bad performance characteristics whe nyou do writes, becaue each time Dom0 as to allocate an extra block behind the sparse file it hits the journal, and this basically serializes all I/O requests in the guest. Once the sparse file is fully-allocated, it should be good again.> LVM vs. regular partitions is the usual deal: LVM gives you more > flexibility. You might find that you appreciate the flexibility even > more when you run guests.LVM & partitions give best performance characteristics. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
Daniel P. Berrange wrote:> >> LVM vs. regular partitions is the usual deal: LVM gives you more >> flexibility. You might find that you appreciate the flexibility even >> more when you run guests. > > LVM & partitions give best performance characteristics. > > Regards, > Dan.Dan: Thanks for your insight. If, for example, a guest has separate /root, /boot, and swap do you recommend as best practice a separate logical volume for each or do you give just one logical volume to the guest for it to dice up into the various types of file systems? Is there a significant performance difference between these two solutions? For us newbies using virt-install or virt-manager, it prompts for at most one partitition (which can be a logical volume) so without editing of the config after the fact it naturally leads to the case of using just one logical volume for the entire guest with it dicing it up into /root, /boot, and swap or whatever. So, for the case of just one logical volume which has been "formatted" during the guest install, this led to the question of how do I generically backup and restore that one logical volume. Every piece of documentation that I find for creating an LVM snapshot and then creating a backup requires that the snapshot volume be mounted to perform the backup. This led me on an adventure with device mapper and kpartx etc during which I was able to eventually get to and backup the inner guts of my guest but it seemed like there had to be a better way. Is there a vanilla generic backup and restore procedure for a logical volume (a snapshot volume of the running guest logical volume) which does not require case-by-case knowledge of what type of file system(s) have been mapped to that logical volume? If so, is there then also a way to do that backup in a manner which only stores the small amount of space actually used by the guest instead of the entire space allocated to the logical volume? In other words, something that preserves the idea of sparseness? This is probably a generic LVM question but I could not find my answer in the LVM docs either. My lack of knowledge related to the above questions is why I am currently using image files but would love to switch to individual logical volumes for the performance benefits. -- Thanks, Aaron