Re: [qubes-users] Assign Sata Device to Qube

2018-09-05 Thread 3mptyy
On Wednesday, August 29, 2018 at 3:15:16 PM UTC+2, unman wrote:
> On Mon, Aug 27, 2018 at 06:56:48AM -0700, Who Cares wrote:
> > 
> > 
> > I got a Question about that 
> > 
> > Somehow I got no templates directory under /etc/qubes?
> 
> You can just create the directory structure as needed.
> > 
> > But I found the xen.xml.
> > 
> > And what does "by-name" mean?
> 
> "by-name" is just a literal directory name.
> You use it to identify configuration files by qube name.
>  
> > Its just about where to put this file so that Qubes pick it up upon boot of 
> > foo. 
> > 
> 
> Yes

Thanks Unman for your explanations ! There are just some small glitches in your 
syntax, here's the right content to put in .xml file (xen.xml and 
not xen/xml and not specifying /dev/xvde but xvde):

{% extends 'libvirt/xen.xml' %} 
{% block devices %} 
{{ super() }} 
 
 
 
 
 
{% endblock %}

-- 
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 qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/40d7c043-ec04-437f-88b3-425cc605dc7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Assign Sata Device to Qube

2018-08-29 Thread unman
On Mon, Aug 27, 2018 at 06:56:48AM -0700, Who Cares wrote:
> 
> 
> I got a Question about that 
> 
> Somehow I got no templates directory under /etc/qubes?

You can just create the directory structure as needed.
> 
> But I found the xen.xml.
> 
> And what does "by-name" mean?

"by-name" is just a literal directory name.
You use it to identify configuration files by qube name.
 
> Its just about where to put this file so that Qubes pick it up upon boot of 
> foo. 
> 

Yes

-- 
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 qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20180829131514.lhtidux3qhwvrv4z%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Assign Sata Device to Qube

2018-08-27 Thread Who Cares


I got a Question about that 

Somehow I got no templates directory under /etc/qubes?

But I found the xen.xml.

And what does "by-name" mean?

Its just about where to put this file so that Qubes pick it up upon boot of 
foo. 

-- 
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 qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/ca703380-7b33-4519-8040-f175ed8ef3ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Assign Sata Device to Qube

2018-08-25 Thread Unman
On Sat, Aug 25, 2018 at 01:15:47PM -0700, Who Cares wrote:
> Am Samstag, 25. August 2018 17:17:45 UTC+2 schrieb Unman:
> > On Sat, Aug 25, 2018 at 06:33:25AM -0700, Who Cares wrote:
> > > Hi there,
> > > 
> > > I want to assign my HDD directly to a specific HVM Qube.
> > > Its connected per Sata.
> > > I already tried with "lspci" or "qvm-pci" but I never find my HDD.
> > > With "qvm-block" I find it at dom0:sdb but how can I assign the complete 
> > > HDD to a specific Qube even after restart like I can assign PCI devices 
> > > in the Qubes Device Manager?
> > > 
> > > The Qube is an HVM which needs to access the HDD because I want to 
> > > install a Linux based System(Kerio control) which cannot handle the 
> > > Qubes-System that offers the Space on the System Drive. So I need to pass 
> > > through a complete HDD that is supported by this System(Kerio-control) I 
> > > want to install in the HVM.
> > > 
> > > Hopefully someone got a Solution :)
> > > 
> > > Thanks so far!
> > > 
> > In 3.2 you could just edit the conf file under /var/lib/qubes...
> > 
> > In 4.0:
> > Have a look at
> > https://dev.qubes-os.org/projects/core-admin/en/latest/libvirt.html
> > 
> > You want to add a new device: use normal Xen configuration.
> > https://libvirt.org/formatdomain.html#elementsDisks will help.
> > Use the phy driver, and specify the source as /dev/sdX, and target dev on 
> > your qube.
> > 
> > unman
> 
> I do not really know how to use this information there.
> What should I work myself into first to understand this?
> 

The libvirt page explains how to create a custom specification for a
qube, and where to put the files.
The basic specification is created from a template file - on my system
it's at /usr/share/qubes/templates/libvirt/xen.xml. (The documentation
is a little out of step here.)
If you look at that file you can see how the configuration for your
qubes is constructed.

What we want to do is to modify the settings for qube foo so that
/dev/sdb on dom0 will appear at /dev/xvde in foo.

Create a new file in dom0 at:
/etc/qubes/templates/libvirt/by-name/foo.xml

The contents are:
{% extends 'libvirt/xen/xml' %}
{% block devices %}
{{ super() }}





{% endblock %}


The "extends" statement tells the system that it will be modifying the
definition in libvirt/xen.xml
The "super()" imports the specification for block devices from that file.
Then we define a new disk device - the syntax here is quite obvious and
follows the reference in libvirt.org

Now when you boot foo, Qubes will pick up this file, and attach /dev/sdb
to the foo qube, where it will appear as /dev/xvde. 
You can put an entry in to /etc/fstab so that the /dev/xvde device will
be automatically mounted where you will. 

hth

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 qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20180826020432.5slvtvyojy2lt4n7%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Assign Sata Device to Qube

2018-08-25 Thread Who Cares
Am Samstag, 25. August 2018 17:17:45 UTC+2 schrieb Unman:
> On Sat, Aug 25, 2018 at 06:33:25AM -0700, Who Cares wrote:
> > Hi there,
> > 
> > I want to assign my HDD directly to a specific HVM Qube.
> > Its connected per Sata.
> > I already tried with "lspci" or "qvm-pci" but I never find my HDD.
> > With "qvm-block" I find it at dom0:sdb but how can I assign the complete 
> > HDD to a specific Qube even after restart like I can assign PCI devices in 
> > the Qubes Device Manager?
> > 
> > The Qube is an HVM which needs to access the HDD because I want to install 
> > a Linux based System(Kerio control) which cannot handle the Qubes-System 
> > that offers the Space on the System Drive. So I need to pass through a 
> > complete HDD that is supported by this System(Kerio-control) I want to 
> > install in the HVM.
> > 
> > Hopefully someone got a Solution :)
> > 
> > Thanks so far!
> > 
> In 3.2 you could just edit the conf file under /var/lib/qubes...
> 
> In 4.0:
> Have a look at
> https://dev.qubes-os.org/projects/core-admin/en/latest/libvirt.html
> 
> You want to add a new device: use normal Xen configuration.
> https://libvirt.org/formatdomain.html#elementsDisks will help.
> Use the phy driver, and specify the source as /dev/sdX, and target dev on 
> your qube.
> 
> unman

I do not really know how to use this information there.
What should I work myself into first to understand this?

-- 
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 qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/7bc036af-dc6c-4b68-be10-e00794b6a407%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Assign Sata Device to Qube

2018-08-25 Thread Unman
On Sat, Aug 25, 2018 at 06:33:25AM -0700, Who Cares wrote:
> Hi there,
> 
> I want to assign my HDD directly to a specific HVM Qube.
> Its connected per Sata.
> I already tried with "lspci" or "qvm-pci" but I never find my HDD.
> With "qvm-block" I find it at dom0:sdb but how can I assign the complete HDD 
> to a specific Qube even after restart like I can assign PCI devices in the 
> Qubes Device Manager?
> 
> The Qube is an HVM which needs to access the HDD because I want to install a 
> Linux based System(Kerio control) which cannot handle the Qubes-System that 
> offers the Space on the System Drive. So I need to pass through a complete 
> HDD that is supported by this System(Kerio-control) I want to install in the 
> HVM.
> 
> Hopefully someone got a Solution :)
> 
> Thanks so far!
> 
In 3.2 you could just edit the conf file under /var/lib/qubes...

In 4.0:
Have a look at
https://dev.qubes-os.org/projects/core-admin/en/latest/libvirt.html

You want to add a new device: use normal Xen configuration.
https://libvirt.org/formatdomain.html#elementsDisks will help.
Use the phy driver, and specify the source as /dev/sdX, and target dev on your 
qube.

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 qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20180825151742.tkfxa3e4eehospdz%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Assign Sata Device to Qube

2018-08-25 Thread 'awokd' via qubes-users
On Sat, August 25, 2018 1:33 pm, Who Cares wrote:
> Hi there,
>
>
> I want to assign my HDD directly to a specific HVM Qube.
> Its connected per Sata.
> I already tried with "lspci" or "qvm-pci" but I never find my HDD.
> With "qvm-block" I find it at dom0:sdb but how can I assign the complete
> HDD to a specific Qube even after restart like I can assign PCI devices
> in the Qubes Device Manager?

No native way to do it I know of, but you could maybe use dom0 scripts.
See https://github.com/QubesOS/qubes-issues/issues/3820 for some ideas.


-- 
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 qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/90020576dca448aa8b098232edf0349c.squirrel%40tt3j2x4k5ycaa5zt.onion.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] Assign Sata Device to Qube

2018-08-25 Thread Who Cares
Hi there,

I want to assign my HDD directly to a specific HVM Qube.
Its connected per Sata.
I already tried with "lspci" or "qvm-pci" but I never find my HDD.
With "qvm-block" I find it at dom0:sdb but how can I assign the complete HDD to 
a specific Qube even after restart like I can assign PCI devices in the Qubes 
Device Manager?

The Qube is an HVM which needs to access the HDD because I want to install a 
Linux based System(Kerio control) which cannot handle the Qubes-System that 
offers the Space on the System Drive. So I need to pass through a complete HDD 
that is supported by this System(Kerio-control) I want to install in the HVM.

Hopefully someone got a Solution :)

Thanks so far!

-- 
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 qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/74735d81-08a2-4df5-9094-dfab61f011ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.