You are here

Moving from CentOS 6 to 7

KVM: setting up bridged mode

systemctl disable NetworkManager
systemctl enable network
systemctl stop NetworkManager
systemctl start network
  • The only problem with the above is that network does not seem to start on boot.
chkconfig --list network    # shows that it should be running
systemctl start network     # the new way of starting it
/etc/init.d/network restart # the old way of starting it
  • Once you have disabled NetworkManager it is very easy to create a new bridged network in Virtual Machine Manager (see RH document above)

Moving LVM partitions

  • To get the LVM gui tool, for now you have to:
sudo yum install system-config-lvm
  • Move zipped image and then unzip (uses fast version of algorithm, and the fast arcfour encryption)
dd if=/dev/$srcvol | gzip -c --fast | ssh -c arcfour $dstserver "dd of=$volname"
gunzip -c $volname | dd of=/dev/$dstvol
  • In theory it could be done in one shot:
dd if=/dev/$srcvol | gzip -c --fast | ssh -c arcfour $dstserver "gunzip -c | dd of=/dev/$dstvol"

nc -l 1234 | gunzip -c | dd of=/dev/vg_server7/<<VM>> #on new host. Tells netcat to listen on port
dd if=/dev/vg_old/<<VM>> | gzip -c --fast | nc <targetip> 1234 #on old host.

Moving KVM Virtual Machines

  1. Create logical volume on the new server, the same size as the old.
  2. Shutdown old VM.
  3. Transfer image
  4. rsync -av /etc/libvirt/qemu/«VM».xml root@server7:/etc/libvirt/qemu
    5. New machine: systemctl restart libvirtd
  5. Open virt-manager and edit storage (and maybe network)
  6. Start machine!