[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] Xen Image File vs LVM



Thanks for the help!  That’s the information I was looking for.  I have one last question….

 

Does it matter if a server has Virtualization Technology in the hard ware?

 

---

 

Chris Edwards
Smartech Corp.
Div. of AirNet Group

http://www.airnetgroup.com

http://www.smartechcorp.net

cedwards@xxxxxxxxxxxxxxxx
P:  423-664-7678 x114

C:  423-593-6964

F:  423-664-7680

 

From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Grant McWilliams
Sent: Monday, August 04, 2008 7:17 PM
To: Javier Guerra
Cc: Chris Edwards; Michael March; xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Xen Image File vs LVM

 

 

On Mon, Aug 4, 2008 at 1:04 PM, Javier Guerra <javier@xxxxxxxxxxx> wrote:

On Mon, Aug 4, 2008 at 3:01 PM, Michael March <mmarch@xxxxxxxxx> wrote:
>>
>>> 3.        If I have a xen guest os in a LV how would I migrate the guest os
>>> from one machine to the other?  Create identical LV on new machine?
>>
>> to migrate VMs, the storage has to be accessible from both machines
>> with the same reference.  when using image files, that means a shared
>> filesystem (NFS, GFS, OCFS, etc.), when using LVs, that means the VG
>> must be accessible from both hosts, usually with a SAN or SAN-like
>> setup (FC, iSCSI, drbd, AoE, (g)nbd, etc)
>
> Is this for 'live' migrations or any migration of a VM?

sorry, didn't read the whole question.

this is for live migrations.  for 'manual' migrations, you can get by
copying the data (and i guess you could also migrate between image
files and LVs, but i haven't tried that (yet))


--
Javier



You can go between LVs and files too really easy. I've started putting tutorials up on these things as I get to them at http://grantmcwilliams.com/index.php?option=com_content&view=category&id=97&Itemid=379

The URL will be changing though as I implement SEO on my site.

--------------------------------------------------------------------------------------------------------------

How to move from a tap:aio file to Logical Volume Management

In Xen we can provide virtualized hard drives several different ways. It's not uncommon to create a large empty file using dd and then specify it as the hard drive like this.

name = "mailserver"
memory = "1024"
disk = [ 'tap:aio:/srv/xen/mailserver.img,xvda,w', ]
vif = [ 'bridge=xenbr0', ]
bootloader="/usr/bin/pygrub"
vcpus=2

In this example /srv/xen/mailserver.img is our file. In a lot of ways LVM is more powerful and faster so moving our test server to LVM makes sense once we've gotten serious about deploying it. Moving from tap:aio to LVM is much easier than you think, here's how.

1. Shutdown domain.

xm shutdown mailserver

2. Create the Logical Volume

You'll need a Logical Volume the same size as your Xen disk file. In this example the Xen disk file is 10GB and I'll assume you already created it. This could easily turn into an LVM tutorial if I don't.

10 GB Disk file: /srv/xen/mailserver.img
10 GB Logical Volume:  /dev/VolGroup00/LogVolMAIL

3. Copy disk file to Logical Volume

dd if=/srv/xen/mailserver.img of=/dev/VolGroup00/LogVolMAIL -bs 1024

4. Edit the Xen domain config file

name = "mailserver"
memory = "1024"
disk = [ 'phy:/dev/VolGroup00/LogVolMAIL,xvda,w', ]
vif = [ 'bridge=xenbr0', ]
bootloader="/usr/bin/pygrub"
vcpus=2

5. Restart domain

xm create -c mailserver

 

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.