[one-users] Replacing scp with rsync problems

Vladimir Vuksan vlists at veus.hr
Sun Jul 31 17:28:47 PDT 2011

We have a need to quickly deploy and destroy boxes in our environment. 
It's usually the same image. Therefore I have figured out that instead of 
using scp (takes about 3-4 minutes) I could use rsync to rsync the image 
to a directory that doesn't get deleted ie. /opt/cloud/rsync then copy it 
to destination. I got that piece of the process working however when the 
machine boots up I get an error that VM creation failed because "monitor 
socket did not show up"

This is a more detailed log.

vm.log: Sun Jul 31 17:14:46 2011 [LCM][I]: New VM state is BOOT
vm.log: Sun Jul 31 17:14:46 2011 [VMM][I]: Generating deployment file: 
vm.log: Sun Jul 31 17:14:49 2011 [VMM][I]: Command execution fail: 'if [ 
-x "/opt/cloud/scripts/vmm/kvm/deploy" ]; then 
/opt/cloud/images/179/images/deployment.0; else 
exit 42; fi'
vm.log: Sun Jul 31 17:14:49 2011 [VMM][I]: STDERR follows.
vm.log: Sun Jul 31 17:14:49 2011 [VMM][I]: error: Failed to create domain 
from /opt/cloud/images/179/images/deployment.0
vm.log: Sun Jul 31 17:14:49 2011 [VMM][I]: error: monitor socket did not 
show up.: No such file or directory
vm.log: Sun Jul 31 17:14:49 2011 [VMM][I]: ExitCode: 255
vm.log: Sun Jul 31 17:14:49 2011 [VMM][E]: Error deploying virtual 
vm.log: Sun Jul 31 17:14:49 2011 [DiM][I]: New VM state is FAILED

If I look at deployment.0 it looks legit


<domain type='kvm'>
 		<type arch='x86_64'>hvm</type>
 		<boot dev='hd'/>
 		<disk type='file' device='disk'>
 			<source file='/opt/cloud/images/179/images/disk.0'/>
 			<target dev='hda'/>
 			<driver name='qemu' type='qcow2'/>
 		<disk type='file' device='disk'>
 			<source file='/opt/cloud/images/179/images/disk.1'/>
 			<target dev='hdd'/>
 			<driver name='qemu' type='raw'/>
 		<disk type='file' device='disk'>
 			<source file='/opt/cloud/images/179/images/disk.2'/>
 			<target dev='hdb'/>
 			<driver name='qemu' type='raw'/>
 		<disk type='file' device='cdrom'>
 			<source file='/opt/cloud/images/179/images/disk.3'/>
 			<target dev='hdc'/>
 			<driver name='qemu' type='raw'/>
 		<interface type='bridge'>
 			<source bridge='br0'/>
 			<mac address='02:00:0a:0b:16:8a'/>
 			<model type='virtio'/>
 	<devices><graphics type="vnc" port="-1" autoport="yes" keymap="en-us"/></devices>


If I now type virsh create deployment.0 machine will start up correctly. 
Md5sum of disk.0 image is correct.

This is the change I made to tm_clone.sh. I even try just replacing SCP 
with a shell script that does the same with same effect

$ diff tm_clone.sh tm_clone.sh.orig
< RSYNC_DIR="/opt/cloud/rsync"
<     log "Rsyncing $SRC to /opt/cloud/rsync"
<     exec_and_log "/usr/bin/rsync -a $SRC_PATH $DST_HOST:$RSYNC_DIR/"
<     log "Copying "
<     exec_and_log "$SSH $DST_HOST cp -a $RSYNC_DIR/$IMAGE_FILENAME 
>     log "Cloning $SRC"
>     exec_and_log "$SCP $SRC $DST"

This makes very little sense. Any clues ?


More information about the Users mailing list