mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
0701abcb3b
Support for virtio disks was added in commit id 'fceeeda', but not for SCSI drives. Add the secret for the server when hotplugging a SCSI drive. No need to make any adjustments for unplug since that's handled during the qemuDomainDetachDiskDevice call to qemuDomainRemoveDiskDevice in the qemuDomainDetachDeviceDiskLive switch. Added a test to/for the command line processing to show the command line options when adding a SCSI drive for the guest.
43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
LC_ALL=C \
|
|
PATH=/bin \
|
|
HOME=/home/test \
|
|
USER=test \
|
|
LOGNAME=test \
|
|
QEMU_AUDIO_DRV=none \
|
|
/usr/bin/qemu \
|
|
-name QEMUGuest1 \
|
|
-S \
|
|
-object secret,id=masterKey0,format=raw,\
|
|
file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
|
-M pc \
|
|
-m 214 \
|
|
-smp 1,sockets=1,cores=1,threads=1 \
|
|
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
|
-nographic \
|
|
-nodefaults \
|
|
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
|
-no-acpi \
|
|
-boot c \
|
|
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \
|
|
-usb \
|
|
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
|
|
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
|
|
-object secret,id=virtio-disk0-secret0,\
|
|
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
|
|
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
|
|
-drive 'file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
|
|
mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:\
|
|
6322,file.password-secret=virtio-disk0-secret0,format=raw,if=none,\
|
|
id=drive-virtio-disk0' \
|
|
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
|
|
id=virtio-disk0 \
|
|
-object secret,id=scsi0-0-0-0-secret0,\
|
|
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
|
|
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
|
|
-drive 'file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
|
|
mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:\
|
|
6322,file.password-secret=scsi0-0-0-0-secret0,format=raw,if=none,\
|
|
id=drive-scsi0-0-0-0,cache=none' \
|
|
-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
|
|
drive=drive-scsi0-0-0-0,id=scsi0-0-0-0
|