On Sun, Oct 30, 2016 at 09:24:43PM -0700, 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...
> ================================================================
> [{username}@dom0 {foldername}]$ qvm-block -d {vmname}:xvdi
> Usage: qvm-block -l [options]
> usage: qvm-block -a [options] <vm-name> <device-vm-name>:<device>
> usage: qvm-block -A [options] <vm-name> <file-vm-name>:<file>
> usage: qvm-block -d [options] <device-vm-name>:<device>
> usage: qvm-block -d [options] <vm-name>
> List/set VM block devices.
> 
> qvm-block: error: Invalid VM or device name: {vmname}:xvdi
> [{username}@dom0 {foldername}]$ qvm-block -d {vmname}:/dev/xvdi
> Usage: qvm-block -l [options]
> usage: qvm-block -a [options] <vm-name> <device-vm-name>:<device>
> usage: qvm-block -A [options] <vm-name> <file-vm-name>:<file>
> usage: qvm-block -d [options] <device-vm-name>:<device>
> usage: qvm-block -d [options] <vm-name>
> List/set VM block devices.
> 
> qvm-block: error: Invalid VM or device name: {vmname}:/dev/xvdi
> [{username}@dom0 {foldername}]$ qvm-block -d {vmname}:/dev/xvdi1
> Usage: qvm-block -l [options]
> usage: qvm-block -a [options] <vm-name> <device-vm-name>:<device>
> usage: qvm-block -A [options] <vm-name> <file-vm-name>:<file>
> usage: qvm-block -d [options] <device-vm-name>:<device>
> usage: qvm-block -d [options] <vm-name>
> List/set VM block devices.
> 
> qvm-block: error: Invalid VM or device name: {vmname}:/dev/xvdi1
> [{username}@dom0 {foldername}]$ qvm-block -d {vmname}
> [{username}@dom0 {foldername}]$
> ----------------------------------------------------------------
> So, the only one that worked was " qvm-block -d {vmname} "
> 
> 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
> ----------------------------------------------------------------
> 
> 
> I did this when it was saying that the device wasn't there, just to make 100% 
> sure it was.
> ================================================================
> [root@{vmname} {foldername}]# ls /dev/xv*
> /dev/xvda  /dev/xvdb  /dev/xvdc  /dev/xvdc1  /dev/xvdd  /dev/xvdi  /dev/xvdi1
> [root@{vmname} {foldername}]# 
> ----------------------------------------------------------------
> 
> 
> 
> What is it that has gone wrong here?

Hello Drew,

Check the man page -
what you want is this:
qvm-block -d <device-vm-name> -f <device>

You can just specify the device as xvdi, in your example.
That works for me with vanilla 3.2

This will leave other devices attached.

The help and man page are not that clear - why not submit a PR to help?

regards

unman

-- 
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/20161031102017.GA10015%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to