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

2010-06-28 Thread Christopher Hunt
+1 for dd + nc over ssh if necessary.

This process can and probably will saturate your ethernet interface, so 
depending upon the amount of traffic the box pushes on the public 
interface the size of the partition and other factors, sometimes i add a 
crossover cable between unused interfaces on the 2 boxes and run the 
process over that interface, so it doesn't impact the running vms.

Cheers
-Chris

On 6/24/2010 9:00 AM, centos-virt-requ...@centos.org wrote:

 Message: 3
 Date: Thu, 24 Jun 2010 10:52:57 -0400
 From: Kelvin Edmisonkel...@kindsight.net
 Subject: Re: [CentOS-virt] (KVM) How can I migrate VM in a non shared
   storage environment?
 To: Discussion about the virtualization on CentOS
   centos-virt@centos.org
 Message-ID:c848e989.30d95%kel...@kindsight.net
 Content-Type: text/plain; charset=US-ASCII




 On 24/06/10 7:17 AM, Poh Yong Hwangyong...@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


 End of CentOS-virt Digest, Vol 34, Issue 13
 ***
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Xen domU default gateway missing/ARP table full

2009-11-19 Thread Christopher Hunt
Ken,
 I think Pasi's on to something there, I bet the GATEWAY command in
ifcfg-eth0 is mistyped or has a syntax error.  In the interem, however, a
better hack might be to move the route statement from rc.local, which only
runs at boot, to /etc/sysconfig/network-scripts/route-eth0 .  That will
enable the network service to restart or the eth0 interface to downup
without removing the default route.

-Chris

On Thu, Nov 19, 2009 at 8:04 AM, Pasi Kärkkäinen pa...@iki.fi wrote:

 On Thu, Nov 19, 2009 at 10:03:05AM -0500, Ken Bass wrote:
  Pasi Kärkkäinen wrote:
  
   I usually specify the default gateway in
   /etc/sysconfig/network-scripts/ifcfg-eth0 and it works just fine.
  
  
  Actually, I tried putting the GATEWAY in the specific ifcfg-eth0, as
  well as the global /etc/sysconfig/network and it seems to be ignored.
  Of course things 'appear' to work just fine, but the route that is setup
 is
 
  default *   0.0.0.0 U 0  00
 eth0
 
  INSTEAD OF:
 
  default router.example.com 0.0.0.0 UG0  0
  0 eth0
 
  The former seems to cause all arp entries to be queried and cached. The
 latter works correctly.
  Both 'appear to work'. Does the route on your domU look like the second
 entry?
 

 Yes, the routing table is correct for my domUs.
 I have never noticed/seen GATEWAY getting ignored..

 Maybe your netmask is wrong, so the GATEWAY IP is unreachable?

 -- Pasi

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

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


[CentOS-virt] virsh autostart: cannot set autostart for transient domain

2009-11-12 Thread Christopher Hunt
Hello all,
I'm running a newly installed CentOS 5.4 KVM host and am running into
problems setting guests up to autostart.  Has anyone seen and/or overcome
this issue?

[r...@virt04 ~]# virsh autostart guest02
error: Failed to mark domain guest02 as autostarted
error: internal error cannot set autostart for transient domain

Just for kicks I tried symlinking /etc/libvirt/guest02.xml and
/etc/libvirt/autostart/guest02.xml, but to no avail.  I've entered virsh
create /root/vms/guest2.xml into /etc/rc.d/rc.local for now.

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


Re: [CentOS-virt] Migrating from KVM to XEN - kernel panic

2009-11-09 Thread Christopher Hunt
Pasi,
 Thanks very much for the tip.  That did give me some additional
information:

Scanning and configuring dmraid supported devices
Scanning logical volumes
  Reading all physical volumes.  This may take a while...
Activating logical volumes
  Volume group virt01vg00 not found
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

This brings me back to suspecting the problem is in the different file
structures.  I'm still trying to wrap my head around the other replies in
this thread.


On Sat, Nov 7, 2009 at 2:24 PM, Pasi Kärkkäinen pa...@iki.fi wrote:

 On Fri, Nov 06, 2009 at 11:49:41AM -0800, Christopher Hunt wrote:
 First let me say that I'm not a sysadmin, but am simply wearing that
 hat
 this week so please excuse my ignorance.  I need to temporarily move
 some
 virtual servers from a CentOS-KVM platform to a CentOS-XEN platform
 while
 I do some upgrades to the CentOS box.  I've created a local LV, and
 used
 DD and SCP to transfer the block device from the VKM machine to the
 XEN
 machine.  For quite a while I struggled with the Error: (2, 'Invalid
 kernel', 'xc_dom_parse_elf_kernel: ELF image has no shstrtab\n')
 error
 but thanks to Nick Couchman from
 [1]
 http://lists.xensource.com/archives/html/xen-users/2008-03/msg00603.html,
 I've passed that.  Now I'm stuck with a kernel panic situation.
 Unfortunately the kernel panic error doesn't appear using xm console
 and
 flashes so quickly through virt-viewer that I can't get any details.
 

 Stop the guest and edit /etc/xen/guest cfgfile.

 Remove (or comment out) the vfb line, and then restart the guest.

 Now you get the full console output to xm console.

 -- Pasi


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

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


Re: [CentOS-virt] Migrating from KVM to XEN - kernel panic

2009-11-09 Thread Christopher Hunt
Well that was more helpful than I could reasonable hope for but alas, the
error didn't change much:
device-mapper: dm-raid45: initialized v0.2594l
Waiting for driver initialization.
Scanning and configuring dmraid supported devices
Scanning logical volumes
  Reading all physical volumes.  This may take a while...
  Found volume group vg00 using metadata type lvm2  ## this is the VG on
the KVM host
Activating logical volumes
  Volume group virt01vg00 not found  ## this is the VG on the XEN host
Creating root device.
Mounting root filesystem.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
ERROR opening /dev/console: No such file or directory
Trying to use fd 0 instead.
WARNING: can't access (null)
exec of init ((null)) failed!!!: Bad address
Kernel panic - not syncing: Attempted to kill init!


I wonder if i need to mount the block device and edit fstab?

Christopher Hunt

On Mon, Nov 9, 2009 at 11:09 AM, Christopher G. Stach II c...@ldsys.netwrote:

 - Christopher Hunt dharmach...@gmail.com wrote:

  This brings me back to suspecting the problem is in the different file
  structures. I'm still trying to wrap my head around the other replies
  in this thread.

 mkinitrd in dom0 with xenblk and xennet and use that new initrd for the
 guests. After you get the guests up and running, install kernel-xen in each
 one and switch to using pygrub. The following should handle the first part,
 but no warranties implied. :)

 mkinitrd --with=xenblk --with=xennet --preload=xenblk --preload=xennet
 /boot/initrd-2.6.18-164.6.1.el5xen-domU.img 2.6.18-164.6.1.el5xen

 for i in /etc/xen/guest[0-9]*; do
  cp ${i} ${i}.bak
  sed -i '/^ramdisk/cramdisk =
 /boot/initrd-2.6.18-164.6.1.el5xen-domU.img' ${i}
 done

 --
 Christopher G. Stach II


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

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


Re: [CentOS-virt] Migrating from KVM to XEN - kernel panic

2009-11-09 Thread Christopher Hunt
ugh after doing inglorious battle, I return.  It's definitely situation
(1).  The error messages haven't changed.  Inside the init file, should the
paths references be from the point of view of Dom0?

lvm vgchange -ay --ignorelockingfailure  vg00
resume /dev/vg00/swap00
echo Creating root device.
mkrootdev -t ext3 -o defaults,ro /dev/mapper/vg00-root
echo Mounting root filesystem.
mount /sysroot
echo Setting up other filesystems.
setuproot
echo Switching to new root and running init.
switchroot

Also, should the xen host config file (/etc/xen/guest02) root parameter
point to the dom0 root or the block device for the domU?

root = /dev/mapper/virt01vg00-c5root00 ro  ##dom0's root file system

Thanks very much,
Christopher Hunt


On Mon, Nov 9, 2009 at 12:54 PM, Christopher G. Stach II c...@ldsys.netwrote:


 - Christopher G. Stach II c...@ldsys.net wrote:

  1. mkinitrd --with=xenblk --with=xennet --preload=xenblk
  --preload=xennet img version
  (yes, that's the original one without the fstab)
  2. gunzip -c /boot/initrd-blah.img  /root/blah
  3. mkdir /mnt/blah
  4. mount -o loop /root/blah /mnt/blah
  5. vi /mnt/blah/init
  change occurrences of dom0 VG to guest VG
  change dom0 root device name to guest root device name
  6. umount /mnt/blah
  7. gzip -c /root/blah  /boot/initrd-blah.img

 If you followed these directions, you're probably scratching your head. I
 screwed up. The initrd is actually a cpio archive, so:

 1. mkinitrd --with=xenblk --with=xennet --preload=xenblk --preload=xennet
 img version
 (yes, that's the original one without the fstab)
 2. mkdir /root/initrd-blah
 3. cd /root/initrd-blah
 4. gunzip -c /boot/initrd-blah.img | cpio -idmv
 5. vi /root/initrd-blah/init
 6. find . -print | cpio -o | gzip -c  /boot/initrd-blah.img

 --
 Christopher G. Stach II


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

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