学习在kvm上创建vtpm
1、安装kvm环境,并创建虚拟机
Ubuntu14.04中安装配置创建KVM虚拟机_百度经验
https://jingyan.baidu.com/article/b907e627cfffc946e7891cd5.html
创建成功:
2、在kvm上创建vtpm
参考学习教程:vTPM架构分析与环境部署 - CSDN博客
http://blog.csdn.net/lwyeluo/article/details/50726703
注意:如果是Ubuntu系统,应该参考如下教程- vTPM环境部署(ubuntu)
http://blog.csdn.net/lwyeluo/article/details/52028253
创建成功:
3、将vm与vtpm绑定
我的命令:
qemu-system-x86_64 -display sdl -enable-kvm \ -m 1024 -boot c -bios $SEABIOS/bios.bin -boot menu=on -tpmdev \ cuse-tpm,id=tpm0,path=/dev/vtpm0 \ -device tpm-tis,tpmdev=tpm0 /var/lib/libvirt/images/test1211.img
更新:
root@Lenovo:/home/shm# gedit ~/.bashrc
添加如下内容:(根据自己make安装seabios的路径来定)
#bios.bin export SEABIOS=/home/shm/kvm/kvm-vtpm/seabios-tpm-master/out/ export PATH=$PATH:$SEABIOS
root@Lenovo:/home/shm# source ~/.bashrc root@Lenovo:/home/shm# echo $SEABIOS /home/shm/kvm/kvm-vtpm/seabios-tpm-master/out/
root@Lenovo:/home/shm# qemu-system-x86_64 -display sdl -enable-kvm \ > -m 1024 -boot c -bios $SEABIOS/bios.bin -boot menu=on -tpmdev \ > cuse-tpm,id=tpm0,path=/dev/vtpm0 \ > -device tpm-tis,tpmdev=tpm0 /disk/disk.img qemu-system-x86_64: -tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm0: Parameter 'type' expects a TPM backend type Supported TPM types (choose only one): passthrough Passthrough TPM backend driver root@Lenovo:/home/shm#
明天的成功,都是今天的用心付出和努力的收获。