Le jeu. 14 nov. 2024 à 16:15, lacsaP Patatetom <patate...@gmail.com> a
écrit :

> Le jeu. 14 nov. 2024 à 15:11, lacsaP Patatetom <patate...@gmail.com> a
> écrit :
>
>> hi,
>> what is the "relaxed" equivalent of the `-hda file.qcow2` command line
>> argument to control file locking (`locking=off`) ?
>> the documentation says that `-hda a` can be replaced by `-drive file=a`
>> and that locking can be controlled with the `locking` option of the
>> `blockdev` argument : how to link `drive` and `blockdev` to obtain
>> "relaxed" `-hda file.qcow2` ?
>> regards, lacsaP.
>>
>
> a few (corrected) details to clarify my request...
>
> `-hda` is a (very) old way of specifying the disk to be used, but is
> extremely practical when there's nothing special to define, and is still
> supported by qemu.
>
> my image `file.qcow2` is mounted elsewhere (nbd) and running
> `qemu-system-x86_64 -snapshot -hda file.qcow2` fails with the error
> "qemu-system-x86_64: -hda file.qcow2: Failed to get shared “write” lock /
> Is another process using the image [file.qcow2] ?".
>
> I'm doing some tests and I don't want to unmount my mounts, so I'm trying
> to force qemu to start without taking into account the fact that the image
> is not free and keeping the disk order (I'm also using `-hdb file2.qcow2`
> but this image doesn't cause any problems, is not mounted and is totally
> free).
>
> what should I use to replace `-hda file.qcow2` (drive/device/blockdev) to
> force qemu to boot from this first disk ?
>
> regards, lacsaP.
>
>
`qemu-system-x86_64 -global file.locking=off -snapshot -hda file.qcow2 -hdb
file2.qcow2`
and
`qemu-system-x86_64 -global driver=file,property=locking,value=off
-snapshot -hda file.qcow2 -hdb file2.qcow2`
do not force qemu to start up...

Reply via email to