Re: [CentOS-virt] Now on to creation of disk images

2011-07-18 Thread Kelvin Edmison



On 11-07-18 8:26 AM, Steve Campbell campb...@cnpapers.com wrote:

 
 
 On 6/28/2011 10:50 AM, Ed Heron wrote:
 On Tue, 2011-06-28 at 09:30 -0400, Steve Campbell wrote:
 Mr. Heron was so kind to make a suggestion that I should use disk images
 to install VMs. Upon further thought, I kinda like the idea. So I
 re-read the manual and google a little, and discover I still don't know
 what should be in these disk images.
 
 Should I copy the contents of the CDs to a file or what? I've got a test
 server at the moment with Centos 5.5 and xen installed as the host OS,
 but have just downloaded the 5.6 CD ISOs along with the  DVD ISO, so
 I'll use 5.6 for my VMs. I've read about how I can create an image from
 something that already exists.
 
 Again, any clarity would be appreciated.
Just put the ISO's in /var/lib/xen/images and point at them.  If you
 didn't download the discs, you can rip them using:
 
 dd if=/dev/optical device  of=/var/lib/xen/images/name of disc
 
For example, if ripping the first 5.6 CD...
 
 dd if=/dev/hdc of=/var/lib/xen/images/CentOS-5.6-i386-d1.iso
 
 I generally rip a disc multiple times and then do a file compare to make
 sure I've got a reasonable chance of having an undamaged copy.
 
Keep in mind that it isn't as easy to change discs when you are using
 images on a paravirtual machine.
 
I still recommend setting up a local repository as a much better
 solution because it allows you to take a snapshot so multiple installs
 use the exact same versions of everything.
 
 
 
 I moved the iso images to a folder under /var/lib/xen/images and
 selected it during an install for a new VM. I've run into a problem I've
 not yet seen before. The first iso is used just fine, but the second is
 Not accessible, and nothing I can discover works.
 
 So, should the ISOs be moved directly to the images folder instead of a
 folder below images? Does it matter whether I just copy the iso files
 (actually, I used scp) or do they need to  be run through dd?
 

If you have SELinux enabled then it could be denying access to images in a
'non-standard' folder.  Try putting them directly in the images folder, or
alternatively, if you don't care about SELinux, setting SELinux to
Permissive or Disabled.

Cheers,
  Kelvin

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] (KVM) How can I migrate VM in a non shared storage environment?

2010-06-24 Thread Kelvin Edmison



On 24/06/10 7:17 AM, Poh Yong Hwang yong...@gmail.com wrote:

 I have a server running CentOS 5.5 with KVM capabilities. I need to migrate
 all the VMs to another server with the exact same hardware specs. The problem
 is it is running on individual harddisks, not shared storage. What is the best
 way to migrate to minimise downtime?

I've had good success using dd and nc (netcat) to copy the contents of a
disk or disk image from one machine to another, and verifying the copy was
successful with a md5sum or sha1sum of both the original and copied disk.

Kelvin

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt