]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu-internal: correctly set format for root FS as raw
authorCristian Iorga <cristian.iorga@intel.com>
Wed, 6 May 2015 15:21:47 +0000 (18:21 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 May 2015 12:14:38 +0000 (13:14 +0100)
qemu guesses via probing the format of root FS, but
gives a warning and restricts write operations on block 0.
So fix it by setting correctly the format as raw.

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu-internal

index 2db55660cebec8bc7085899f7f06499588233ee7..bc2a3557a59b13429d025e1098f899b1606f4403 100755 (executable)
@@ -123,7 +123,7 @@ if [ "$SLIRP_ENABLED" = "yes" ]; then
     if [ "$KVM_ACTIVE" = "yes" ]; then
         QEMU_NETWORK_CMD=""
         DROOT="/dev/vda"
-        ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio"
+        ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio,format=raw"
     else
         QEMU_NETWORK_CMD=""
         DROOT="/dev/hda"
@@ -261,7 +261,7 @@ else
         if [ "$KVM_ACTIVE" = "yes" ]; then
             QEMU_NETWORK_CMD="-net nic,model=virtio $QEMU_TAP_CMD,vhost=on"
             DROOT="/dev/vda"
-            ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio"
+            ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio,format=raw"
         else
             QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD"
             DROOT="/dev/hda"