Re: How could I do the guest mount operation from the host?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Example:

http://rabexc.org/posts/p9-setup-in-libvirt

 

 

Van: 李笳平 [mailto:lijiaping@xxxxxxxxxx]
Verzonden: maandag 9 november 2015 8:21
Aan: Dominique Ramaekers; 'libvirt-users@xxxxxxxxxx'
Onderwerp:
答复: [libvirt-users] How could I do the guest mount operation from the host?

 

Yes, my modification is like you. I doubt that if the mount operation on the host is reasonable…

And what is p9?

 

Best Regards

 

From Jiaping LI

 

发件人: Dominique Ramaekers [mailto:dominique.ramaekers@xxxxxxxxxx]
发送时间: 2015119 15:08
收件人: 李笳平; 'libvirt-users@xxxxxxxxxx'
主题: RE: How could I do the guest mount operation from the host?

 

For usb I meant something like:

<disk type='file' device='disk'>

        <driver name='qemu' type='qcow2' cache='none'/>

        <source file='/kvmdata/disk/dk389_581.img'/>

        <target dev='sda' bus='usb'/>

</disk>

 

If you want to use fiesystem passtrough, I think you have to look at p9 filesystem. I’ve used it before and it worked like a charm. This does require some setup in the guest…

 

 

Van: 李笳平 [mailto:lijiaping@xxxxxxxxxx]
Verzonden: maandag 9 november 2015 7:14
Aan: Dominique Ramaekers; 'libvirt-users@xxxxxxxxxx'
Onderwerp:
答复: [libvirt-users] How could I do the guest mount operation from the host?

 

Hi,

       I have tried usb and it doesn’t work. I don’t know if the filesystem tag could work…

I find in the formatdomain docs about the filesystem:

 

<filesystem type='mount' accessmode='passthrough'>

      <driver type='path' wrpolicy='immediate'/>

      <source dir='/export/to/guest'/>

      <target dir='/import/from/host'/>

      <readonly/>

</filesystem>

 

The description of filesystem is: A directory on the host that can be accessed directly from the guest.

I don’t know what the format should be and make the the disk image /kvmdata/disk/dk389_581.img in the host

mount to the guest /mnt directory.

 

Best Regards

 

From Jiaping LI

 

发件人: Dominique Ramaekers [mailto:dominique.ramaekers@xxxxxxxxxx]
发送时间: 2015116 20:54
收件人: 李笳平; 'libvirt-users@xxxxxxxxxx'
主题: RE: How could I do the guest mount operation from the host?

 

You can attach the disk on the usb bus (<target dev='sda' bus='sub'/> - Not 100% sure about this but probably in the right direction) and let the guest automount usb-storage…

 

 

 

Van: 李笳平 [mailto:lijiaping@xxxxxxxxxx]
Verzonden: vrijdag 6 november 2015 10:14
Aan: Dominique Ramaekers; 'libvirt-users@xxxxxxxxxx'
Onderwerp:
答复: [libvirt-users] How could I do the guest mount operation from the host?

 

Hi,

       Thanks for your response!

But when I use the ssh, I need to know the guest password, and actually it

belongs to network communication. I don’t know if the libvirt has some means just

like to control the domain to implement the operation?

 

 

Best Regards

 

From Jiaping LI

 

发件人: Dominique Ramaekers [mailto:dominique.ramaekers@xxxxxxxxxx]
发送时间: 2015116 15:41
收件人: 李笳平; libvirt-users@xxxxxxxxxx
主题: RE: How could I do the guest mount operation from the host?

 

Why not ssh?

 

Van: libvirt-users-bounces@xxxxxxxxxx [mailto:libvirt-users-bounces@xxxxxxxxxx] Namens ???
Verzonden: vrijdag 6 november 2015 3:34
Aan: libvirt-users@xxxxxxxxxx
Onderwerp: How could I do the guest mount operation from the host?

 

Hi all,

       When I attach a disk like this:

<disk type='file' device='disk'>

        <driver name='qemu' type='qcow2' cache='none'/>

        <source file='/kvmdata/disk/dk389_581.img'/>

        <backingStore/>

        <target dev='vda' bus='virtio'/>

        <alias name='virtio-disk0'/>

        <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

</disk>

And then I use “fdisk -l” on the guest, can find the disk info, if I want to mount a disk, I should log on the guest and use the command just like:

mount /dev/vda1 /mnt

       Does Libvirt has some API which can send the guest operation(like mount/umount) from host to guest?

Thus I can do the operation on host and need not to log on guest to do the operation.

       Thanks!

 

 

Best Regards

 

From Jiaping LI

 

保密:本函仅供收件人使用,如阁下并非抬头标明的收件人,请您即刻删除本函,勿以任何方式使用及传播,并请您能将此误发情形通知发件人,谢谢!

保密:本函仅供收件人使用,如阁下并非抬头标明的收件人,请您即刻删除本函,勿以任何方式使用及传播,并请您能将此误发情形通知发件人,谢谢!

保密:本函仅供收件人使用,如阁下并非抬头标明的收件人,请您即刻删除本函,勿以任何方式使用及传播,并请您能将此误发情形通知发件人,谢谢!

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux