XEN provides virtualization support for trusted computing hardware chips by default. In fact, XEN is based on tpm-emulator, which is embodied in VTPM backend drivers (in dom0) and Front-end drivers (in domU ), A brief description of the configuration compilation process is as follows: After enabling the VTPM configuration for 1VTPM, domU cannot be started, and an error is prompted during dom0 startup. modprobetpmbk needs to be reloaded when starting vtpm_manager, the module needs to be automatically loaded. Solution: use commands to Compile two
XEN provides virtualization support for trusted computing hardware chips by default. In fact, XEN is based on tpm-emulator, which is embodied in VTPM backend drivers (in dom0) and Front-end drivers (in domU ), the compilation process is briefly described as follows:
1. VTPM Configuration
After the VTPM configuration is enabled, domU cannot be started, and an error is prompted when dom0 is started. modprobe tpmbk needs to be reloaded when starting vtpm_manager, and the module must be automatically loaded.
Solution:
Use commands to Compile two kernels respectively
# Make linux-2.6-xen0-config CONFIGMODE = menuconfig (or xconfig)
# Make linux-2.6-xen0-install
# Make linux-2.6-xenU-config CONFIGMODE = menuconfig (or xconfig)
# Make linux-2.6-xenU-install
Generate file:
# Mkinitramfs-o/boot/initrd. img-2.6.18.8-xen0 2.6.18.8-xen0
# Mkinitramfs-o/boot/initrd. img-2.6.18.8-xenU 2.6.18.8-xenU
And modify the Startup File:/boot/grub/menu. lst and the corresponding kernel content in/etc/xen/Ubuntu.
Make menuconfig
Enter "Processor type and features --->"
Enter "High Memory Support (4 GB) --->"
Select 64 GB
Exit
Exit and Save
2 VTPM Installation
1). OS for Ubuntu 8.04, XEN for xen-3.4.2
2). The installation process is similar to the original one, but more packages need to be preinstalled;
3) Brief description of the xen installation process:
Make world (some packages need to be downloaded from the Internet during the first installation)
Make dist
Make install
Make xen tools (sometimes tools may be faulty, but do not affect make install. It is best to compile it separately)
4). Install VTPM Configuration
According to user manual version 3.3, the following configuration changes are required:
#1. Load the template first
Modprobe tpmbk
#2. In the xen-3.4.2 compiled folder, modify the items under the file Config. mk:
VTPM_TOOLS? = Y
#3. If the host does not have a real physical TPM chip, you need to use tpm_emulator. You need to modify the file tools/vtpm/Rules. mk:
BUILD_EMULATOR = y
#4. To manage vtpm, you need to start vtpm_manager and modify the file tool/vtpm manager/Rules. mk:
# TCStalkstofifo'
Sratherthan/dev/tpm. TPMEmulatorassumedonfifos
CFLAGS + =-DDUMMY_TPM
#5. Execute the compilation:
Make linux-2.6-xen-config CONFIGMODE = menuconfig
In option Device Driver/Character Devices/TPM Devices, select (*) instead of (-) for all items (-)
Make
Make install
(After the system is restarted, you do not need to use the following modprobe command)
#6. Use Terminal commands to start tpm_emulator and tpm_manager:
Tpm_emulator clear
Modprobe tpmbk
Vtpm_manager
If the connection succeeds, the two deamon instances are communicating and the vtpm_manager instance is waiting for the connection information of domU.
3. Related configurations in the client domU: -- Modified ubuntu System in semi-Virtualization
1) configuration and kernel Compilation
To use vtpm, you need to start the relevant modules:
Modprobe tpm_xenu
2) In the configuration file, modify the following options:
Vtpm = ['instance = , Backend = '] Example:
Vtpm = ['instance = 1, backend = 0'] Or vtpm = ['backend = 0']
3) Check whether VTPM is successfully started and whether the file exists:
/Sys/devices/xen/vtpm-0
4) use the following device to communicate with vtpm deamon in dom0:
/Dev/tpm0
Currently, I have not successfully configured VTPM in domU, but the vtpmd in dom0 has successfully communicated with vtpm-managerd.