<div class="gmail_quote"><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><div>A shared folder will<br>
probably just map to this XML snippet:  <br></div></blockquote><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><filesystem type='mount'><br>

  <source dir='/home/guilhermesgb/Desktop/SharedFolder'/> </blockquote><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">  <target dir='myshare1'/> </blockquote>

<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"></filesystem></blockquote><br>I see. I also tried this XML configuration you gave as an example, but it wouldn't work. And now I know why...<br>

<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><shareddir fstype="ext4" 
path="/home/guilhermesgb/Desktop/SharedFolder" mount_tag="SharingName" 
security_model="passthrough" /></blockquote><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">Where did you find this? This is not libvirt XML.<br>

</blockquote><br>I found it searching through Google: <a href="http://www.mail-archive.com/libvir-list@redhat.com/msg27808.html">http://www.mail-archive.com/libvir-list@redhat.com/msg27808.html</a> - altough I just used it as a last resort, as anything else would work.<br>

<br>We have chosen to use libvirt in order to deal, in a generalized way, with the<br>process of starting virtual machines, stopping them, executing remote commands and creating shared folders.<br>As we saw that libvirt cannot handle with executing remote commands without any manual configuration by us (setting up consoles, through ssh, etc.), we will basically use a shared folder to store scripts that are to be executed by the guest, and the guest would have a running daemon that monitors this shared folder and executes everything in it.<br>

<br>Do you know how could I share a folder with a VBox guest through actual Libvirt code?<br>We are also trying to do this through the Java binding, but it won't work either. As you said, it's not supported yet.<br>

We will eventually have to do this for all other hypervisors supported by Libvirt, so I'd like to know: which hypervisors have this shared folder funcionality supported by Libvirt?<br><br>We are very thankful for your answers and willing to see new feature in the next version!<br>

<br>2011/6/7 Matthias Bolte <span dir="ltr"><<a href="mailto:matthias.bolte@googlemail.com">matthias.bolte@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

2011/6/6 Guilherme Santos <<a href="mailto:guisgb13@gmail.com">guisgb13@gmail.com</a>>:<br>
<div>> Well, I am still with that problem, attempting to create shared folders, so<br>
> I will try to be more specific and then maybe somebody can help me.<br> <br></div></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">
</div>Your problem is simple, libvirt currently doesn't support shared<br>
folder for VirtualBox. I'll have a look at it and if it's simple to<br>
implement you might see it in libvirt 0.9.3.<br>
<div><br></div></blockquote><div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div> </div></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">
> When I say "I am trying to set up shared folders", I mean that I set this<br>
> configuration in my XML description:<br>
><br>
>     <filesystem type='template' accessmode='mapped'><br>
>       <source name='/home/guilhermesgb/Desktop/SharedFolder/><br>
>       <target dir='/home/tarciso/Desktop/SharedFolder'/><br>
>     </filesystem><br>
<br>
</div>VirtualBox shared folders don't support setting an access mode. The<br>
target dir will map to the name of the shared folder in the guest.<br>
Also the template type is OpenVZ specific. A shared folder will<br>
probably just map to this XML snippet:<br>
<br>
<filesystem type='mount'><br>
  <source dir='/home/guilhermesgb/Desktop/SharedFolder'/><br>
  <target dir='myshare1'/><br>
</filesystem><br>
<br></blockquote><div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
You might also specify the <readonly/> option.<br>
<div class="im"><br>
> This was my last attempt. I also tried all other combinations, with<br>
> accessmodes "passthrough" and "squash", for filesystem type "mount" too.<br>
><br>
> I can't send you any error messages neither printscreens because my problem<br>
> is that anything happens, the domain is started properly but no shared<br>
> folder is specified so I can mount it, using command "sudo mount -t vboxsf<br>
> SharedFolder /home/tarciso/Desktop/SharedFolder". I always get a protocol<br>
> error.<br>
><br>
> I was expecting libvirt to automatically do this step for me, so I wouldn't<br>
> need to do it manually through vbox GUI or VBoxManage.<br>
<br>
</div>As I said libvirt just doesn't support this yet, but I'll look at it.<br>
<div class="im"><br>
> During my searches through the web, I found this other option, although I<br>
> can't be sure if it is implemented, as the libvirt website says nothing<br>
> about it: defining an XML file with this configuration:<br>
><br>
>     <shareddir fstype="ext4" path="/home/guilhermesgb/Desktop/SharedFolder"<br>
> mount_tag="SharingName" security_model="passthrough" /><br>
<br>
</div>Where did you find this? This is not libvirt XML.<br>
<div class="im"><br>
> And then mounting it with proper command (the same as before, now with the<br>
> mount_tag specified: "sudo mount -t vboxsf SharingName<br>
> /home/tarciso/Desktop/SharedFolder" . Unfortunatelly the same error<br>
> persists.<br>
><br>
> Am I missing something?<br>
<br>
</div>No, it is exactly as expected, but it'll improve.<br>
<font color="#888888"><br>
Matthias<br>
</font><div class="im"><br>
> Sorry if my first message was hard to understand. Thanks.<br>
><br>
> 2011/6/1 Guilherme Santos <<a href="mailto:guisgb13@gmail.com">guisgb13@gmail.com</a>><br>
>><br>
>> Good afternoon.<br>
>><br>
>> I am having trouble trying to set up shared folders in the guest VM using<br>
>> VirtualBox hypervisor. No matter what configuration is defined in my XML, it<br>
>> never works, I mean, no shared folder is added/specifyed, then, inside the<br>
>> guest, when I try to mount the folder, I always get a protocol error.<br>
>><br>
>> If I use VirtualBoxManage, I can add/specify shared folders easily and<br>
>> mount it with no problem.<br>
>><br>
>> I need to use libvirt in order to deal, in a generalized way, with the<br>
>> process of creating shared folders in all hypervisors supported by libvirt,<br>
>> otherwise my problem would be solved already. I must not use specific<br>
>> commands of a certain hypervisor (such as VirtualBoxManage's).<br>
>><br>
>> How does libvirt allow me to set up shared folders? Does it use<br>
>> VirtualBoxManage for VBox hypervisors? If so, how do I use it?<br>
>> I've read the documentation and followed it in defining my XMLs.<br>
>><br>
>> Thanks anyway!<br>
>> --<br>
>> Guilherme Santos G. Baptista<br>
>> Undergraduate in Computer Science at UFCG<br>
>> LSD - Distributed Systems Laboratory<br>
><br>
><br>
><br>
> --<br>
> Guilherme Santos G. Baptista<br>
> Graduando em Ciência da Computação pela UFCG<br>
> LSD - Laboratório de Sistemas Distribuídos<br>
><br>
</div><div><div></div><div class="h5">> _______________________________________________<br>
> libvirt-users mailing list<br>
> <a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/libvirt-users" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Guilherme Santos G. Baptista<br>Graduando em Ciência da Computação pela UFCG<br>LSD - Laboratório de Sistemas Distribuídos<br>