[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] dd trough scp with tar
On Fri, Apr 25, 2008 at 10:48:17PM +0200, David Hl??ik wrote: > > i will inside virtual machine on ESX boot from Live-CD of CentOS , using dd > i will transfer images trought scp to CentOs machine with xen. I believe > this one should work, machines on ESX are Windows2003 Servers. > So what i need to find is how to write a command which will transfer image > trought scp , but for faster transfer also compress it before using tar, or > gzip. > > *so my input will be dd if=/dev/sda1 , my output will be gzipped or tarred > image on second side. sda1.img.gz* > ** dd will produce a raw image of the disk; at that level, there aren't any files for tar to work on, it's just one long stream of bytes. scp also works from files, so unless you were to save your image locally first, e.g., # dd if=/dev/sda1 of=/tmp/sda1.img # scp /tmp/sda1.img me@xxxxxxxxxxxxxxxxxxxx: ...scp isn't the right tool to use either. You could do something like this. Where "foo.example.com" is the Xen machine which will receive the image, and we're logged in to your system running the CentOS CD (note: this is one command line; the backslash is just there to make that explicit and isn't necessary if you type this all in at the prompt): # dd if=/dev/sda1 | gzip | ssh root@xxxxxxxxxxxxxxx \ "gzip -d > /path/to/vm/images/windows2003sda.img" HTH, --michael _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |