Skip to contentSkip to conversation

mask specific partition from guest

Qemu-devel ching 1 participant 1 message Nov 7, 2012

lore
Share & tools
lore

ching

author
#0 lore raw

Hi all,

I am trying to boot a real Linux OS inside qemu.

The OS resides on a real disk with a partition layout:

1. data
2. os
3. data

Partiton 1 is being used by the host and i would like to hide it from guest.

In virtualbox/vmware, this can be done by creating a vmdk file marking corresponding extent as "ZERO" and it will ignores all writes.

e.g.

version=1
encoding="UTF-8"
CID=0510e33b
parentCID=ffffffff
isNativeSnapshot="no"
createType="partitionedDevice"

RW 34 FLAT "header" 0
RW 2014 ZERO
RW 204800 ZERO
RW 262144 ZERO
RW 125364224 ZERO
RW 1124425728 FLAT "/dev/sdc" 125833216

...

How can this be done in qemu/kvm?

ching