cli: Add --tpm backend.encryption.secret=

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2019-09-04 08:29:58 -04:00
parent 0254558e6e
commit 0eb571f9e1
4 changed files with 5 additions and 1 deletions

View File

@ -193,6 +193,7 @@
<tpm model="tpm-crb"> <tpm model="tpm-crb">
<backend type="passthrough"> <backend type="passthrough">
<device path="/dev/tpm0"/> <device path="/dev/tpm0"/>
<encryption secret="11111111-2222-3333-4444-5555555555"/>
</backend> </backend>
</tpm> </tpm>
<graphics type="vnc" port="-1"/> <graphics type="vnc" port="-1"/>
@ -433,6 +434,7 @@
<tpm model="tpm-crb"> <tpm model="tpm-crb">
<backend type="passthrough"> <backend type="passthrough">
<device path="/dev/tpm0"/> <device path="/dev/tpm0"/>
<encryption secret="11111111-2222-3333-4444-5555555555"/>
</backend> </backend>
</tpm> </tpm>
<graphics type="vnc" port="-1"/> <graphics type="vnc" port="-1"/>

View File

@ -535,7 +535,7 @@ memnode0.cellid=1,memnode0.mode=strict,memnode0.nodeset=2
--filesystem /foo/source,/bar/target --filesystem /foo/source,/bar/target
--memballoon virtio,autodeflate=on,stats.period=10 --memballoon virtio,autodeflate=on,stats.period=10
--watchdog ib700,action=pause --watchdog ib700,action=pause
--tpm passthrough,model=tpm-crb,path=/dev/tpm0 --tpm passthrough,model=tpm-crb,path=/dev/tpm0,backend.encryption.secret=11111111-2222-3333-4444-5555555555
--rng egd,backend_host=127.0.0.1,backend_service=8000,backend_type=udp,backend_mode=bind,backend_connect_host=foo,backend_connect_service=708,rate.bytes=1234,rate.period=1000,model=virtio --rng egd,backend_host=127.0.0.1,backend_service=8000,backend_type=udp,backend_mode=bind,backend_connect_host=foo,backend_connect_service=708,rate.bytes=1234,rate.period=1000,model=virtio
--panic iobase=0x506 --panic iobase=0x506
""", "singleton-config-2") """, "singleton-config-2")

View File

@ -3542,6 +3542,7 @@ class ParserTPM(VirtCLIParser):
cls.add_arg("backend.type", "type") cls.add_arg("backend.type", "type")
cls.add_arg("backend.version", "version") cls.add_arg("backend.version", "version")
cls.add_arg("backend.device.path", "device_path") cls.add_arg("backend.device.path", "device_path")
cls.add_arg("backend.encryption.secret", "encryption_secret")
################# #################

View File

@ -28,6 +28,7 @@ class DeviceTpm(Device):
version = XMLProperty("./backend/@version") version = XMLProperty("./backend/@version")
model = XMLProperty("./@model") model = XMLProperty("./@model")
device_path = XMLProperty("./backend/device/@path") device_path = XMLProperty("./backend/device/@path")
encryption_secret = XMLProperty("./backend/encryption/@secret")
################## ##################