My idea is to be able to run my production server (STRATO- OpenSuse) hosting www.waltercedric.com&160; in a VMWARE instance. So I can test and make change to the operating first there before bringing down my host for several hours ;-)

I would like to duplicate the whole LINUX system (lets call it PROD for now), including data and make 2 VMWARE instance.. why two instances you may ask?

  1. One will be called DEV, and be very instable by definition, it is always a copy of the TEST instance, and will be use to try dirty system changes, that may never be deployed to TEST or PROD
  2. The instance named TEST will be by definition identical to the main server (or PROD). All changes made there has to be documented in small release notes so they can be applied to PROD.

I am in the process of documenting everything, and I will&160; provide You the set of scripts to make the whole things works. (mainly a bash file that use RSYNC to keep your new server TEST up to date with the PROD), First step is to copy the server on the fly and luckily this is the purpose of this article!

Solution 1: cloning with VMware vCenter Converter (if no raid, easiest)

You’ll see later why but VMWARE vCenter Converter is not able to copy software raid /boot devices (what a shame)

Install VMware vCenter Converter Standalone

This software is free, all you have to do is register and download the software HERE

You can install it like any other windows software, just follow the steps



Note the default port or change them if you already have another services running on your PC (XAMPP, TeamCity, Bamboo etc…)

Https Service port: 443
Remote Converter clients connect to this port on the server and submit conversion tasks.

HTTP Service port: 80
Remote machines connect to the server through this port to download the converter client.

Agent service Port: 9089
Remote converter agents connect to this port to convert this machine.


Authorize root access through SSH

Even if this is considered highly unsecure, VMware vCenter Converter will require it. But temporary having a ssh root access open to the outside world is ok for the time taken to replicate through SSH all disks.

# vi /etc/ssh/sshd_config

and set

PermitRootLogin yes

Restart the SSH daemon by issuing the following command

# /etc/init.d/sshd restart


Tell the converter to start replication of remote server



checking that /boot is mounted on my server

# mount –l
/dev/md0 on /boot type ext2 (rw,acl,user_xattr) [/boot]

The device /boot is mounted, I did Google for it and found that:

Converter Standalone 4.0 does not recognize source volumes that reside on Linux Software RAID configurations

During cloning of powered-on Linux machines, Converter Standalone does not recognize source volumes that are part of a Software RAID configuration (also referred to as multiple disk, or md, configurations).
(If your question has been resolved please mark the answers as "Helpful" or "Correct".)

That's because the /boot is on Software RAID which is not supported by Linux P2V: 58">http://www.vmware.com/support/converter/doc/releasenotes_conv40.html58

I have a RAID1 array

RAID 1 (mirrored settings/disks) duplicates data across every disk in the array, providing full redundancy. Two (or more) disks each store exactly the same data, at the same time, and at all times. Data is not lost as long as one disk survives. Total capacity of the array equals the capacity of the smallest disk in the array. At any given instant, the contents of each disk in the array are identical to that of every other disk in the array.

Solution 2: cloning with VMware vCenter Converter (workaround for raid)

If you still want to clone your server with VMware vCenter Converter and&160;

  • if /boot is the only important file system on Software RAID (/dev/md*), which is not my case :-()
  • You can plug an external non RAID USB disk into the server

you could workaround this by:

  1. Back up the /boot files to /tmp (or some place with space),
  2. unmount /boot,
  3. Create a new volume (partition or LVM logical volume) on some available storage (might need to plug in a USB drive),
  4. Formatting it with ext3/ext4
  5. Mount it at /boot
  6. Copy all the /boot files over to there,
  7. Make backups of /etc/fstab and /boot/grub/menu.lst
  8. Change fstab and menu.lst to point to the new /boot file system.

That should allow Converter to work. And you can revert this all very easily by restoring the backups of fstab and menu.lst, unmounting /boot, remounting the original /boot (/dev/md0).

Solution 3: cloning with VMware vCenter Converter (awful workaround raid)

Another solution would be to break the Software RAID mirroring, just temporary to make a snapshot, but that would also require me to boot the server –> not acceptable for me!

Solution 4 cloning with clonesys

clonesys is a Shell script that can be used to get an image of running Linux boxes.
The image can then be burned on CD/DVD. This CD/DVD is bootable and can be used to restore the system as well as to install new similar boxes.
clonesys *IS NOT* a backup tool: it should not be used to backup users data, it is more similar to other tools such as MkCdRec, Mondo Rescue, Timo's Rescue CD, etc...

  1. Get the latest version (wget) and unpack
  2. Configure config.ini and backup.ini
  3. Start ./clonesys.sh and wait
  4. ISO disc will be available in /tmp/clonesys/iso

Create a new VMWARE machine and boot on the CD to create your new machine.

Solution 5 cloning live system with Mondo

Mondo is reliable. It backs up your GNU/Linux server or workstation to tape, CD-R, CD-RW, DVD-R[W], DVD+R[W], NFS or hard disk partition. In the event of catastrophic data loss, you will be able to restore all of your data [or as much as you want], from bare metal if necessary. Mondo is in use by Lockheed-Martin, Nortel Networks, Siemens, HP, IBM, NASA's JPL, the US Dept of Agriculture, dozens of smaller companies, and tens of thousands of users.

Mondo&160;is comprehensive. Mondosupports LVM 1/2, RAID, ext2, ext3, ext4, JFS, XFS, ReiserFS, VFAT, and can support additional filesystems easily: just e-mail the mailing list with your request. It supports software raid as well as most hardware raid controllers. It supports adjustments in disk geometry, including migration from non-RAID to RAID. Mondoruns on all major Linux distributions (RedHat, RHEL, SuSE, SLES, Mandriva, Debian, Gentoo) and is getting better all the time. You may even use it to backup non-Linux partitions, such as NTFS.

Mondois free! It has been published under the GPL v2 (GNU Public License), partly to expose it to thousands of potential beta-testers but mostly as a contribution to the Linux community.

Its main advantages are in my case

  • It wont require any reboot,
  • It can create CD (.ISO with ISOLINUX) that can be later booted in VMWARE.

If you want to come from a RAID 0,1,5 to a non RAID host setup, this article may help you.

Solution 6: manual RSYNC or the “you’re on your own”

Fallback to manual RSYNC of the server…quite tricky. This is what what VMware vCenter is doing in background when it works :-(

  1. Boot with Knoppix in mode 2 (terminal&160; only)
  2. Create partitions with fdisk (or the utility of your choice).
  3. Make file systems, run mkswap, etc.
  4. Mount partitions appropriately.
  5. Run something like: rsync -zav -e ssh oldhost:/ /mnt (FYI, I almost always botch the syntax the first try)
  6. Make changes as appropriate for new system (/etc/fstab, /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-*, /etc/hosts, and so on).
  7. Run grub to install the boot loader
  8. Reboot. If it boots, do a quick check to make sure all the partitions are started, swap has been turned on, etc.

I’ve made it once but was blocked at step 9 (because of grub 1 / OpenSuSE 9.3)


If you know any other method that dont require the server to be rebooted (no solutions with dd please as it make corrupted disk on running server)

You might like also

Oracle ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
The Oracle error ORA-00054 can be solved by executing as DBA the following query select p.spid,s.sid,s.serial#,s.username,s.status,s.last_call_et, p.program,p.terminal,logon_time,module,s.osuser from V$process p,V$session s where s.paddr = p.addr and s.status = 'ACTIVE' and s.username not like '%SYS%'; This will return the PID of the hanging process You can then SSH to the server ruining oracle and kill the process kill -9 PID …
2364 Days ago
Oracle ORA-00054: resource busy and acquire with NOWAIT specified
ORA-00054: resource busy and acquire with NOWAIT specified Cause: Resource interested is busy. Action: Retry if necessary. I show you here how to get around this error and kill the sessions that are preventing the exclusive lock. Note that you could also (preferred) Run your changes later when the database is idle. Do all DDL during a maintenance window when all users are not logged in …
2547 Days ago
Oracle Please set ORACLE_UNQNAME to database unique name
if you encounter this error while starting oracle /etc/init.d/oraemctl start Starting Oracle EM DB Console: Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name. OK One possible solution is to edit the script # vi /etc/init.d/oraemctl and add the following code in blue …
2874 Days ago
Install XEN Server without an Optical Drive
Citrix XenServer is a complete, managed server virtualization platform built on the powerful Xen hypervisor. Xen technology is widely acknowledged as the fastest and most secure virtualization software in the industry. In case you don’t have any optical drive attached to the server, this small how to will help you to install Xen Server as domain 0 (dom0) using USB flash drive. Download XEN server iso from http://www.citrix.com/English/ss/downloads/index.asp Format your USB drive using FAT32, Use an older version of UNetbootin …
3068 Days ago
Map Synology network drive under linux
How to mount your Synology NAS (or any other NAS brand) shared folder under #Linux using CIFS. CIFS stands for "Common Internet File System," also known under the older name SMB (Server Message Block),  which is a network protocol used by Windows clients for issuing file access requests to Windows servers Open a terminal and as root, create as many directory as needed in /mnt/ # sudo mkdir /mnt/video # sudo mkdir /mnt/music Unfortunately there is no frontend or editor …
3501 Days ago
Advanced Oracle Weblogic start/stop script
The Oracle WebLogic 11g application server product line is the industry's most comprehensive #Java platform for developing, deploying, and integrating enterprise applications. It provides the foundation for application grid, which is an architecture that enables enterprises to outperform their competitors while minimizing operational costs. …
3503 Days ago
Basic operations with XEN server: export, import of VM templates and guests
More and more I am using XEN at work, and here is a small how to of some very common operations. Citrix® XenServer® is a complete, managed server virtualization platform built on the powerful Xen® hypervisor. Xen technology is widely acknowledged as the fastest and most secure virtualization software in the industry. XenServer is designed for efficient management of Windows® and #Linux® virtual servers and delivers cost-effective server consolidation and business continuity. By the way if you succeed installing XEN …
3503 Days ago
Debian Lenny how to
  Short description of how to accomplish some specific task in Debian Lenny. How to install Sun java 1.6 on Debian Lenny How to install Tomcat 6.x on Debian Lenny How to install MySQL on Debian Lenny             …
3833 Days ago
Some useful Unix/Linux Bash alias
Some useful Bash #Linux alias taken from my user profile. If you have a long command that you type frequently consider putting it in as an alias. In computing, alias is a command in various command line interpreters (shells) such as Unix shells, 4DOS/4NT and Windows PowerShell, which enables a replacement of a word with another string. It is mainly used for abbreviating a system command, or for adding default arguments to a regularly used command. [WikiPedia] …
3899 Days ago
Useful Unix/Linux bash functions
For day to day hacker, they may be more elegant ways to do it (PERL, AWK), but they have work well for me. Upper case file name or variable, Search and replace in all files content recursively, Renaming all files recursively, Renaming all directory recursively, Copying a set of files from one directory to the other and preserving hierarchy. …
3899 Days ago