On 10/31/2016 05:24 AM, Drew White wrote:
> Hi folks,
>
> Well, I mounted an image to the guest. Then I finished, so I
> unmounted it in the vm and went to remove it to attach it to another
> guest...
>
> I tried several different methods... [....]
> But that detaches everything. I only wanted to detach xvdi
>
> To attach it I used....
> ================================================================
> [{username}@dom0 {foldername}]$ qvm-block -A {vmname}
> dom0:/run/media/{username}/{partition_label}/{imagename}.img
> ----------------------------------------------------------------
>
Hi Drew,
afair qvm-block needs the name of the original VM where the device is
attached for removal. So, if you attached your device from dom0, you
will need to use dom0 for removal too. As an example, but using usbvm:
dom0$ qvm-block -a work usbvm:sdd
This attaches /dev/sdd in usbvm to work
dom0$ qvm-block -d usbvm:sdd
This now detaches /dev/sdd in usbvm from work
And this is why, in the --help output, the -d command has
<device-vm-name> instead of just <vm-name>, to highlight the fact that
you need the original vm name. If you want to detach everything you can
use the second syntax suggested by --help, using the vm name, and this
will detach everything from that vm.
I do know that you are mounting an image file; and I don't know if this
works this way too - i.e. if you need to specify the full path to the
file, like this:
dom0$ qvm-block -a work dom0:/mnt/foo/bar.img
and then
dom0$ qvm-block -d dom0:/mnt/foo/bar.img
to detach it
You can probably check the output of "qvm-block" without parameters,
once the image file is mounted; the first column of the output contains
the names used to identify the devices (or files, I suppose) to be managed.
Hope this helps,
--
Alex
--
You received this message because you are subscribed to the Google Groups
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/qubes-users/129ebc17-9407-8b41-6554-b39ad9afa229%40gmx.com.
For more options, visit https://groups.google.com/d/optout.