Skip to contentSkip to conversation

Stupid question?

Qemu-devel Frans de Boer 5 participants 6 messages Feb 26, 2011 – Feb 27, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,

This is the only QEMU list, so I put my question her.
How can I copy the contents of a "*.raw" image to a real HD partition or vice versa.
I often use a virtual image using qemu/kvm to test some OS's and want to migrate them to a HD partition if the time is right. Also, I like to preserve old partitions for future use/reference.

Any suggestions?

Regards, Frans.

#1 lore raw
Quoted 10 lines · Frans de Boer

Hi all,

This is the only QEMU list, so I put my question her.
How can I copy the contents of a "*.raw" image to a real HD partition or vice versa.
I often use a virtual image using qemu/kvm to test some OS's and want to migrate them to a HD partition if the time is right. Also, I like to preserve old partitions for future use/reference.

Any suggestions?

Regards, Frans.

You can mount it using losetup.
http://blog.piotrj.org/2009/03/mounting-raw-kvmqemu-image.html

Thanks,
Dushyant

#2 lore raw
Quoted 9 lines · Dushyant Bansal
Quoted 8 lines · Frans de Boer

Hi all,

This is the only QEMU list, so I put my question her.
How can I copy the contents of a "*.raw" image to a real HD partition or vice versa.
I often use a virtual image using qemu/kvm to test some OS's and want to migrate them to a HD partition if the time is right. Also, I like to preserve old partitions for future use/reference.

Any suggestions?

Quoted 8 lines
Quoted 2 lines

Regards, Frans.

You can mount it using losetup.
http://blog.piotrj.org/2009/03/mounting-raw-kvmqemu-image.html

Thanks,
Dushyant

Thanks, that seems a good way to start. Sorry for the obvious, but Linux has so many options/features, I sometimes use the lazy way to get answers.

Regards, Frans.

#3 lore raw
In reply to Dushyant Bansal
Quoted 11 lines · Dushyant Bansal
Quoted 10 lines · Frans de Boer

Hi all,

This is the only QEMU list, so I put my question her.
How can I copy the contents of a "*.raw" image to a real HD partition or vice versa.
I often use a virtual image using qemu/kvm to test some OS's and want to migrate them to a HD partition if the time is right. Also, I like to preserve old partitions for future use/reference.

Quoted 6 lines
Quoted 4 lines

Any suggestions?

Regards, Frans.

You can mount it using losetup.
http://blog.piotrj.org/2009/03/mounting-raw-kvmqemu-image.html

losetup is fine, can we directly use dd ?

#4 lore raw
Quoted 13 lines · Amos Kong
Quoted 11 lines · Dushyant Bansal
Quoted 10 lines · Frans de Boer

Hi all,

This is the only QEMU list, so I put my question her.
How can I copy the contents of a "*.raw" image to a real HD partition or vice versa.
I often use a virtual image using qemu/kvm to test some OS's and want to migrate them to a HD partition if the time is right. Also, I like to preserve old partitions for future use/reference.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

Any suggestions?

Regards, Frans.

You can mount it using losetup.
http://blog.piotrj.org/2009/03/mounting-raw-kvmqemu-image.html

losetup is fine, can we directly use dd ?

dd words for a raw file; qemu-img works for all qemu supported formats.

Signature · 1 line
error compiling committee.c: too many arguments to function