Re: Question about skipping virDomainDiskDefAssignAddress
On Mon, Jul 19, 2021 at 11:00:33AM +0900, Motohiro Kawahito wrote: > Laine Stump wrote on 2021/07/17 00:01:36: > > > From: Laine Stump > > To: Libvirt > > Cc: Motohiro Kawahito , "Daniel P. Berrangé" > > > > Date: 2021/07/17 00:01 > > Subject: [EXTERNAL] Re: Question about skipping > virDomainDiskDefAssignAddress > > > > On 7/16/21 8:51 AM, Daniel P. Berrangé wrote: > > > On Fri, Jul 16, 2021 at 09:49:40PM +0900, Motohiro Kawahito wrote: > > >>> From: "Daniel P. Berrangé" > > >>> To: Motohiro Kawahito > > >>> Cc: libvir-list@redhat.com > > >>> Date: 2021/07/16 17:22 > > >>> Subject: [EXTERNAL] Re: Question about skipping > > >> virDomainDiskDefAssignAddress > > >>> > > >>> On Fri, Jul 16, 2021 at 01:01:50PM +0900, Motohiro Kawahito wrote: > > >>>>> From: "Daniel P. Berrangé" > > >>>>> To: Motohiro Kawahito > > >>>>> Cc: libvir-list@redhat.com > > >>>>> Date: 2021/07/16 00:42 > > >>>>> Subject: [EXTERNAL] Re: Question about skipping > > >>>> virDomainDiskDefAssignAddress > > >>>>> > > >>>> > > >>>>> With the exception of paravirtualized Xen guests, this field in > > >>>>> libvirt XML is *completely* independant of the guest assigned > > >>>>> device name. > > >>>>> > > >>>>> eg the XML might say /dev/vda, but the guest might decde to > > >>>>> call it /dev/sda, or /dev/whatever or really absolutely > > >>>>> anything. > > >>>> > > >>>> Thank you very much for this information! I understand it. > > >>>> However, I don't understand how we can pass the target device > > >> information > > >>>> (e.g. 0A80) without an error. Do you know how to do it? > > >>>> > > >>>> My question was not good, so I opened another thread (How do we > > >> specify > > >>>> disk device names for non-Linux VMs in XML?). > > >>> > > >>> There is nothing that needs passing. The guest OS decides its naming > > >>> however it wants to. > > >> > > >> We need to control device number from user. This device number would > be > > >> used later, such as detach-disk. Can we pass device number from > outside? > > > > > > Detach-disk requires the same information that is provided when the > > > disk is first configured in libvir. This is completely separate to the > > > device number / name seen inside the guest. > > > > To expand on that, in the case of detaching a disk, you could 1) provide > > > the target dev in the XML you give to "virsh detach-device", 2) give the > > > target dev name that you provided in the original XML when you call > > "virsh detach-disk", or 3) you could specify a custom alias in the > > original XML ("" - note that the leading > > "ua-" is *required* for a custom alias name) and then give that same > > alias to "virsh detach-device-alias". All three will allow you to > > reliably select the disk you want, and have the same result. > > > > Laine and Daniel, thank you very much for your comments. It's good to know > the flexibility in the naming convention. However, I found libvirtd > rejects a non-Linux device (i.e. '0A84') as a target device. The following > two commands return an error message, "Unknown disk name '0A84'". Can you > let me know how we specify an unusual name, like '0A84'? > > $ virsh attach-disk sample_domain /volumes/user.qcow2 0A84 > $ virsh detach-disk sample_domain 0A84 Do no use these names, they are irrelevant. Use the normal linux-style name, regardless of what the guest OS does. Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
RE: Question about skipping virDomainDiskDefAssignAddress
Laine Stump wrote on 2021/07/17 00:01:36: > From: Laine Stump > To: Libvirt > Cc: Motohiro Kawahito , "Daniel P. Berrangé" > > Date: 2021/07/17 00:01 > Subject: [EXTERNAL] Re: Question about skipping virDomainDiskDefAssignAddress > > On 7/16/21 8:51 AM, Daniel P. Berrangé wrote: > > On Fri, Jul 16, 2021 at 09:49:40PM +0900, Motohiro Kawahito wrote: > >>> From: "Daniel P. Berrangé" > >>> To: Motohiro Kawahito > >>> Cc: libvir-list@redhat.com > >>> Date: 2021/07/16 17:22 > >>> Subject: [EXTERNAL] Re: Question about skipping > >> virDomainDiskDefAssignAddress > >>> > >>> On Fri, Jul 16, 2021 at 01:01:50PM +0900, Motohiro Kawahito wrote: > >>>>> From: "Daniel P. Berrangé" > >>>>> To: Motohiro Kawahito > >>>>> Cc: libvir-list@redhat.com > >>>>> Date: 2021/07/16 00:42 > >>>>> Subject: [EXTERNAL] Re: Question about skipping > >>>> virDomainDiskDefAssignAddress > >>>>> > >>>> > >>>>> With the exception of paravirtualized Xen guests, this field in > >>>>> libvirt XML is *completely* independant of the guest assigned > >>>>> device name. > >>>>> > >>>>> eg the XML might say /dev/vda, but the guest might decde to > >>>>> call it /dev/sda, or /dev/whatever or really absolutely > >>>>> anything. > >>>> > >>>> Thank you very much for this information! I understand it. > >>>> However, I don't understand how we can pass the target device > >> information > >>>> (e.g. 0A80) without an error. Do you know how to do it? > >>>> > >>>> My question was not good, so I opened another thread (How do we > >> specify > >>>> disk device names for non-Linux VMs in XML?). > >>> > >>> There is nothing that needs passing. The guest OS decides its naming > >>> however it wants to. > >> > >> We need to control device number from user. This device number would be > >> used later, such as detach-disk. Can we pass device number from outside? > > > > Detach-disk requires the same information that is provided when the > > disk is first configured in libvir. This is completely separate to the > > device number / name seen inside the guest. > > To expand on that, in the case of detaching a disk, you could 1) provide > the target dev in the XML you give to "virsh detach-device", 2) give the > target dev name that you provided in the original XML when you call > "virsh detach-disk", or 3) you could specify a custom alias in the > original XML ("" - note that the leading > "ua-" is *required* for a custom alias name) and then give that same > alias to "virsh detach-device-alias". All three will allow you to > reliably select the disk you want, and have the same result. > Laine and Daniel, thank you very much for your comments. It's good to know the flexibility in the naming convention. However, I found libvirtd rejects a non-Linux device (i.e. '0A84') as a target device. The following two commands return an error message, "Unknown disk name '0A84'". Can you let me know how we specify an unusual name, like '0A84'? $ virsh attach-disk sample_domain /volumes/user.qcow2 0A84 $ virsh detach-disk sample_domain 0A84 If we should use an alias, could you advise me how to specify? Thank you so much again for your help.
RE: Question about skipping virDomainDiskDefAssignAddress
Laine Stump wrote on 2021/07/17 00:01:36: > From: Laine Stump > To: Libvirt > Cc: Motohiro Kawahito , "Daniel P. Berrangé" > > Date: 2021/07/17 00:01 > Subject: [EXTERNAL] Re: Question about skipping virDomainDiskDefAssignAddress > > To expand on that, in the case of detaching a disk, you could 1) provide > the target dev in the XML you give to "virsh detach-device", 2) give the > target dev name that you provided in the original XML when you call > "virsh detach-disk", or 3) you could specify a custom alias in the > original XML ("" - note that the leading > "ua-" is *required* for a custom alias name) and then give that same > alias to "virsh detach-device-alias". All three will allow you to > reliably select the disk you want, and have the same result. > Thank you very much for the information. I didn't know how to use a custom alias. I'm going to study about it.
Re: Question about skipping virDomainDiskDefAssignAddress
On 7/16/21 8:51 AM, Daniel P. Berrangé wrote: On Fri, Jul 16, 2021 at 09:49:40PM +0900, Motohiro Kawahito wrote: From: "Daniel P. Berrangé" To: Motohiro Kawahito Cc: libvir-list@redhat.com Date: 2021/07/16 17:22 Subject: [EXTERNAL] Re: Question about skipping virDomainDiskDefAssignAddress On Fri, Jul 16, 2021 at 01:01:50PM +0900, Motohiro Kawahito wrote: From: "Daniel P. Berrangé" To: Motohiro Kawahito Cc: libvir-list@redhat.com Date: 2021/07/16 00:42 Subject: [EXTERNAL] Re: Question about skipping virDomainDiskDefAssignAddress With the exception of paravirtualized Xen guests, this field in libvirt XML is *completely* independant of the guest assigned device name. eg the XML might say /dev/vda, but the guest might decde to call it /dev/sda, or /dev/whatever or really absolutely anything. Thank you very much for this information! I understand it. However, I don't understand how we can pass the target device information (e.g. 0A80) without an error. Do you know how to do it? My question was not good, so I opened another thread (How do we specify disk device names for non-Linux VMs in XML?). There is nothing that needs passing. The guest OS decides its naming however it wants to. We need to control device number from user. This device number would be used later, such as detach-disk. Can we pass device number from outside? Detach-disk requires the same information that is provided when the disk is first configured in libvir. This is completely separate to the device number / name seen inside the guest. To expand on that, in the case of detaching a disk, you could 1) provide the target dev in the XML you give to "virsh detach-device", 2) give the target dev name that you provided in the original XML when you call "virsh detach-disk", or 3) you could specify a custom alias in the original XML ("" - note that the leading "ua-" is *required* for a custom alias name) and then give that same alias to "virsh detach-device-alias". All three will allow you to reliably select the disk you want, and have the same result.
Re: Question about skipping virDomainDiskDefAssignAddress
On Fri, Jul 16, 2021 at 09:49:40PM +0900, Motohiro Kawahito wrote: > > From: "Daniel P. Berrangé" > > To: Motohiro Kawahito > > Cc: libvir-list@redhat.com > > Date: 2021/07/16 17:22 > > Subject: [EXTERNAL] Re: Question about skipping > virDomainDiskDefAssignAddress > > > > On Fri, Jul 16, 2021 at 01:01:50PM +0900, Motohiro Kawahito wrote: > > > > From: "Daniel P. Berrangé" > > > > To: Motohiro Kawahito > > > > Cc: libvir-list@redhat.com > > > > Date: 2021/07/16 00:42 > > > > Subject: [EXTERNAL] Re: Question about skipping > > > virDomainDiskDefAssignAddress > > > > > > > > > > > With the exception of paravirtualized Xen guests, this field in > > > > libvirt XML is *completely* independant of the guest assigned > > > > device name. > > > > > > > > eg the XML might say /dev/vda, but the guest might decde to > > > > call it /dev/sda, or /dev/whatever or really absolutely > > > > anything. > > > > > > Thank you very much for this information! I understand it. > > > However, I don't understand how we can pass the target device > information > > > (e.g. 0A80) without an error. Do you know how to do it? > > > > > > My question was not good, so I opened another thread (How do we > specify > > > disk device names for non-Linux VMs in XML?). > > > > There is nothing that needs passing. The guest OS decides its naming > > however it wants to. > > We need to control device number from user. This device number would be > used later, such as detach-disk. Can we pass device number from outside? Detach-disk requires the same information that is provided when the disk is first configured in libvir. This is completely separate to the device number / name seen inside the guest. Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
RE: Question about skipping virDomainDiskDefAssignAddress
> From: "Daniel P. Berrangé" > To: Motohiro Kawahito > Cc: libvir-list@redhat.com > Date: 2021/07/16 17:22 > Subject: [EXTERNAL] Re: Question about skipping virDomainDiskDefAssignAddress > > On Fri, Jul 16, 2021 at 01:01:50PM +0900, Motohiro Kawahito wrote: > > > From: "Daniel P. Berrangé" > > > To: Motohiro Kawahito > > > Cc: libvir-list@redhat.com > > > Date: 2021/07/16 00:42 > > > Subject: [EXTERNAL] Re: Question about skipping > > virDomainDiskDefAssignAddress > > > > > > > > With the exception of paravirtualized Xen guests, this field in > > > libvirt XML is *completely* independant of the guest assigned > > > device name. > > > > > > eg the XML might say /dev/vda, but the guest might decde to > > > call it /dev/sda, or /dev/whatever or really absolutely > > > anything. > > > > Thank you very much for this information! I understand it. > > However, I don't understand how we can pass the target device information > > (e.g. 0A80) without an error. Do you know how to do it? > > > > My question was not good, so I opened another thread (How do we specify > > disk device names for non-Linux VMs in XML?). > > There is nothing that needs passing. The guest OS decides its naming > however it wants to. We need to control device number from user. This device number would be used later, such as detach-disk. Can we pass device number from outside? Thanks, Motohiro Kawahito, Commercial Systems, IBM Research - Tokyo 19-21 Nihonbashi, Hakozaki-cho Chuo-ku, Tokyo 103-8510, Japan "Daniel P. Berrangé" wrote on 2021/07/16 17:21:45: > From: "Daniel P. Berrangé" > To: Motohiro Kawahito > Cc: libvir-list@redhat.com > Date: 2021/07/16 17:22 > Subject: [EXTERNAL] Re: Question about skipping virDomainDiskDefAssignAddress > > On Fri, Jul 16, 2021 at 01:01:50PM +0900, Motohiro Kawahito wrote: > > > From: "Daniel P. Berrangé" > > > To: Motohiro Kawahito > > > Cc: libvir-list@redhat.com > > > Date: 2021/07/16 00:42 > > > Subject: [EXTERNAL] Re: Question about skipping > > virDomainDiskDefAssignAddress > > > > > > > > With the exception of paravirtualized Xen guests, this field in > > > libvirt XML is *completely* independant of the guest assigned > > > device name. > > > > > > eg the XML might say /dev/vda, but the guest might decde to > > > call it /dev/sda, or /dev/whatever or really absolutely > > > anything. > > > > Thank you very much for this information! I understand it. > > However, I don't understand how we can pass the target device information > > (e.g. 0A80) without an error. Do you know how to do it? > > > > My question was not good, so I opened another thread (How do we specify > > disk device names for non-Linux VMs in XML?). > > There is nothing that needs passing. The guest OS decides its naming > however it wants to. > > > Regards, > Daniel > -- > |: INVALID URI REMOVED > u=https-3A__berrange.com=DwIDaQ=jf_iaSHvJObTbx- > siA1ZOg=QxJ1l_N36pgeWfjA- > IAUp8rdIFxYQBPq2WW0vIGQ9UE=3Ydoa2LishfBM6RsL-18A7A6B0KwJq5P1Pz1HUEFVR8=tsoEpMWLZOkv2Z2JnxoZX6IhaeqbXFHXKz- > BKqYkXXo= -o-INVALID URI REMOVED > u=https-3A__www.flickr.com_photos_dberrange=DwIDaQ=jf_iaSHvJObTbx- > siA1ZOg=QxJ1l_N36pgeWfjA- > IAUp8rdIFxYQBPq2WW0vIGQ9UE=3Ydoa2LishfBM6RsL-18A7A6B0KwJq5P1Pz1HUEFVR8=q1LDnF5y7kh5TDggyuQXXkjeUIkOTCE3ZzF- > PMMUSas= :| > |: INVALID URI REMOVED > u=https-3A__libvirt.org=DwIDaQ=jf_iaSHvJObTbx- > siA1ZOg=QxJ1l_N36pgeWfjA- > IAUp8rdIFxYQBPq2WW0vIGQ9UE=3Ydoa2LishfBM6RsL-18A7A6B0KwJq5P1Pz1HUEFVR8=mHcYlrzeVj8Xfa7aOJBVzaN6xwt0UOpisCw48oHyeZE= > -o-INVALID URI REMOVED > u=https-3A__fstop138.berrange.com=DwIDaQ=jf_iaSHvJObTbx- > siA1ZOg=QxJ1l_N36pgeWfjA- > IAUp8rdIFxYQBPq2WW0vIGQ9UE=3Ydoa2LishfBM6RsL-18A7A6B0KwJq5P1Pz1HUEFVR8=X5oSjlmRkG8Q5WwavqgQCXQDLKdSReAdEnCbcqJXKTs= > :| > |: INVALID URI REMOVED > u=https-3A__entangle-2Dphoto.org=DwIDaQ=jf_iaSHvJObTbx- > siA1ZOg=QxJ1l_N36pgeWfjA- > IAUp8rdIFxYQBPq2WW0vIGQ9UE=3Ydoa2LishfBM6RsL-18A7A6B0KwJq5P1Pz1HUEFVR8=QqOu1011otltc_p- > N0vNWWAp5TthAuVvzdyew7DlF9Y= -o-https:// > urldefense.proofpoint.com/v2/url? > u=https-3A__www.instagram.com_dberrange=DwIDaQ=jf_iaSHvJObTbx- > siA1ZOg=QxJ1l_N36pgeWfjA- > IAUp8rdIFxYQBPq2WW0vIGQ9UE=3Ydoa2LishfBM6RsL-18A7A6B0KwJq5P1Pz1HUEFVR8=NIQYzwvaiBVe9ypQAT6hvfHsJGi6rI5ws3TgL_MrYx8= > :| >
Re: Question about skipping virDomainDiskDefAssignAddress
On Fri, Jul 16, 2021 at 01:01:50PM +0900, Motohiro Kawahito wrote: > > From: "Daniel P. Berrangé" > > To: Motohiro Kawahito > > Cc: libvir-list@redhat.com > > Date: 2021/07/16 00:42 > > Subject: [EXTERNAL] Re: Question about skipping > virDomainDiskDefAssignAddress > > > > > With the exception of paravirtualized Xen guests, this field in > > libvirt XML is *completely* independant of the guest assigned > > device name. > > > > eg the XML might say /dev/vda, but the guest might decde to > > call it /dev/sda, or /dev/whatever or really absolutely > > anything. > > Thank you very much for this information! I understand it. > However, I don't understand how we can pass the target device information > (e.g. 0A80) without an error. Do you know how to do it? > > My question was not good, so I opened another thread (How do we specify > disk device names for non-Linux VMs in XML?). There is nothing that needs passing. The guest OS decides its naming however it wants to. Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
RE: Question about skipping virDomainDiskDefAssignAddress
> From: "Daniel P. Berrangé" > To: Motohiro Kawahito > Cc: libvir-list@redhat.com > Date: 2021/07/16 00:42 > Subject: [EXTERNAL] Re: Question about skipping virDomainDiskDefAssignAddress > > With the exception of paravirtualized Xen guests, this field in > libvirt XML is *completely* independant of the guest assigned > device name. > > eg the XML might say /dev/vda, but the guest might decde to > call it /dev/sda, or /dev/whatever or really absolutely > anything. Thank you very much for this information! I understand it. However, I don't understand how we can pass the target device information (e.g. 0A80) without an error. Do you know how to do it? My question was not good, so I opened another thread (How do we specify disk device names for non-Linux VMs in XML?).
Re: Question about skipping virDomainDiskDefAssignAddress
On Fri, Jul 16, 2021 at 12:28:42AM +0900, Motohiro Kawahito wrote: > Hi, is there any existing way for skipping virDomainDiskDefAssignAddress > for disk configuration? > > I want to send the following XML to libvirt, but I got the error > "virDomainDiskDefAssignAddress:7642 : XML error: Unknown disk name '0A80' > and no address specified". > > > > > > > According to the source code, target device must be one of {"fd", "hd", > "vd", "sd", "xvd", "ubd"} + alphabet (+ number). Our guest OS is not > Linux, so I'd like to skip this limitation. Actually, I want to specify > 4-digits hexadecimal number in target device. Ah, you're mis-understanding the impact of this device name field. With the exception of paravirtualized Xen guests, this field in libvirt XML is *completely* independant of the guest assigned device name. eg the XML might say /dev/vda, but the guest might decde to call it /dev/sda, or /dev/whatever or really absolutely anything. The only thing that the target dev=xx does in the libvirt XML is to establish a device ordering relationship between disks in the XML. ie libvirt will configure /dev/vda before /dev/vdb. The guest will probably then probe in the this same order, but that's entirely guest dependant - some may probe devices in paralell. IOW, just use /dev/NNN prefix that matches the bus type, regardless of what your guest OS is. Your guest OS will just do its own thing as needed. Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|