Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPV Grub #1354
Comments
marmarek
added
enhancement
C: core
P: major
release-notes
labels
Oct 23, 2015
marmarek
added this to the Release 3.1 milestone
Oct 23, 2015
marmarek
referenced this issue
Oct 23, 2015
Closed
Debian Templates: linux-headers-amd64 package installation fails #1353
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Oct 23, 2015
Member
General idea is to provide PVGRUB as one of "VM kernel" in /var/lib/qubes/vm-kernels. It would require placing pvgrub binary as vmlinuz (handle it somehow better?) and some dummy initramfs and modules.img.
|
General idea is to provide PVGRUB as one of "VM kernel" in |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesuser
Oct 23, 2015
Another advantage is that PV VMs can then be booted as an HVM with no changes other than changing the VM type in the libvirt config (as long as normal GRUB is installed).
This is useful for things that Xen only supports on HVM guests like using hardware nested paging for better performance on some workloads, CPUID hiding for anonymity or development purposes and nested virtualization.
decide what to do with kernelopts VM setting (ignore in this case? somehow pass to the VM kernel?)
Could possibly point pvgrub to a config file generated by dom0 and placed in the modules or volatile disk, which would define a GRUB variable with the kernelopts and source the main config file in /boot, which would apply the options as long as the VM has a Qubes package installed that adds a reference to the GRUB variable in the commandline defined in /etc/default/grub. Not sure if it's that useful though.
qubesuser
commented
Oct 23, 2015
|
Another advantage is that PV VMs can then be booted as an HVM with no changes other than changing the VM type in the libvirt config (as long as normal GRUB is installed). This is useful for things that Xen only supports on HVM guests like using hardware nested paging for better performance on some workloads, CPUID hiding for anonymity or development purposes and nested virtualization.
Could possibly point pvgrub to a config file generated by dom0 and placed in the modules or volatile disk, which would define a GRUB variable with the kernelopts and source the main config file in /boot, which would apply the options as long as the VM has a Qubes package installed that adds a reference to the GRUB variable in the commandline defined in /etc/default/grub. Not sure if it's that useful though. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Oct 24, 2015
Member
Another advantage is that PV VMs can then be booted as an HVM with no changes other than changing the VM type in the libvirt config (as long as normal GRUB is installed).
Yes, this is also an important step. Also because we're going to integrate underlying mechanisms for PV/HVM and for example be able to use HVM NetVM.
BTW We're also considering usage of PVH. Do you know if CPUID hiding is available there?
Could possibly point pvgrub to a config file generated by dom0 and placed in the modules or volatile disk, which would define a GRUB variable with the kernelopts, source the main config file, which would apply the options as long as the VM has a Qubes package installed that adds a reference to the GRUB variable in the commandline defined in /etc/default/grub. Not sure if it's that useful though.
If it is possible to do, yes, this may be an option. Haven't got that far in PV Grub configuration yet. All I know is possibility (requirement?) for config file bundled to PV Grub binary, visible as memdisk, which is (I think) responsible for loading the real config from VM disk. If you can provide some examples, that would be great :)
Yes, this is also an important step. Also because we're going to integrate underlying mechanisms for PV/HVM and for example be able to use HVM NetVM. BTW We're also considering usage of PVH. Do you know if CPUID hiding is available there?
If it is possible to do, yes, this may be an option. Haven't got that far in PV Grub configuration yet. All I know is possibility (requirement?) for config file bundled to PV Grub binary, visible as memdisk, which is (I think) responsible for loading the real config from VM disk. If you can provide some examples, that would be great :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesuser
Oct 24, 2015
Unfortunately PVH doesn't currently support CPUID hiding and nested virtualization, and in general it seems like it was more of a "quick hack" than a well-designed mechanism.
It seems that to fix that the Xen team has deprecated it favor of "HVMlite", which seems to be a modification of the HVM code to run without a device model but which is not yet ready.
qubesuser
commented
Oct 24, 2015
|
Unfortunately PVH doesn't currently support CPUID hiding and nested virtualization, and in general it seems like it was more of a "quick hack" than a well-designed mechanism. It seems that to fix that the Xen team has deprecated it favor of "HVMlite", which seems to be a modification of the HVM code to run without a device model but which is not yet ready. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
northox
Nov 6, 2015
Hum, not sure about that last part.
As we are planning to rename HVMlite to PVH, I would avoid the use of HVMlite in committed code.
See http://lists.xenproject.org/archives/html/xen-devel/2015-08/msg01927.html
northox
commented
Nov 6, 2015
|
Hum, not sure about that last part.
See http://lists.xenproject.org/archives/html/xen-devel/2015-08/msg01927.html |
added a commit
to QubesOS/qubes-linux-pvgrub2
that referenced
this issue
Nov 8, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Nov 8, 2015
Member
Having VM-provided kernel means that it also must obtain (compile) u2mfn kernel module. Currently it is done using dkms. This means that dkms with all its dependencies (gcc, kernel headers etc) needs to be installed in the VM.
A question: should it be available in minimal template by default? Or another way: should it be required package? @axon-qubes
|
Having VM-provided kernel means that it also must obtain (compile) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Did you mention me by mistake, @marmarek? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
No mistake, you are using minimal templates a lot ;) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Nov 8, 2015
Member
IIUC, the downsides would be increasing the size of the minimal template (by how much approximately?) and arguably increasing the attack surface(?).
What would the benefit be in the case of the minimal template? Are there many common use-cases where someone would need this in a minimal template?
IMHO, we should err on the side of keeping the minimal template truly "minimal," and let the user install any additional software at her discretion. This seems preferable to requiring users to try to further strip down the minimal template when they need an actually-minimal template.
|
IIUC, the downsides would be increasing the size of the minimal template (by how much approximately?) and arguably increasing the attack surface(?). What would the benefit be in the case of the minimal template? Are there many common use-cases where someone would need this in a minimal template? IMHO, we should err on the side of keeping the minimal template truly "minimal," and let the user install any additional software at her discretion. This seems preferable to requiring users to try to further strip down the minimal template when they need an actually-minimal template. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Nov 8, 2015
Member
Ouch, a lot: 167MB (https://gist.github.com/marmarek/d79382f300331a8f5db2)
Generally it is about ability to use kernel installed in the VM, which makes it easier to update, install additional modules etc.
Anyway I think you're right - minimal should stay minimal, especially given above size.
|
Ouch, a lot: 167MB (https://gist.github.com/marmarek/d79382f300331a8f5db2) |
added a commit
to marmarek/qubes-linux-pvgrub2
that referenced
this issue
Nov 8, 2015
marmarek
referenced this issue
Nov 10, 2015
Closed
qubes-core-agent-linux compiling fails - error: ‘RPC_REQUEST_COMMAND_LEN’ undeclared #1402
added a commit
to QubesOS/qubes-linux-utils
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-linux-utils
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-linux-utils
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-linux-utils
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-linux-utils
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-linux-utils
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-core-agent-linux
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-core-agent-linux
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-core-admin
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-core-admin
that referenced
this issue
Nov 11, 2015
added a commit
to QubesOS/qubes-doc
that referenced
this issue
Nov 12, 2015
added a commit
to marmarek/qubes-builder
that referenced
this issue
Nov 13, 2015
added a commit
to marmarek/qubes-linux-utils
that referenced
this issue
Nov 15, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Done. |
marmarek commentedOct 23, 2015
Implement ability to boot VM from the kernel provided by the VM (template) itself. This would greatly ease kernel package management:
/lib/modulesRequired steps:
/dev/mapper/dmrootassembling code) - theoreticallydracutmodule is already available inqubes-kernel-vm-supportFedora package./lib/moduleswhen the VM kernel is usedkerneloptsVM setting (ignore in this case? somehow pass to the VM kernel?)