-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
ruomengh
commented
Jan 26, 2024
- User can specify vCPU number and memory size
- Add usage example in README.md
@@ -11,6 +11,8 @@ GUEST_NAME="tdx-guest" | |||
GUEST_ROOTDIR=/tmp/libvirt-vms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this part of the args
like -v vcpu_num
? othewise if different users run this command, it will conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Iris, as long as the "GUEST_NAME" (can be customized using arg -n) is not the same, the "GUEST_ROOTDIR" doesn't affect TD boot. If you want to boot more than 1 TD using start-virt.sh, try below commands.
$ ./start-virt.sh -i -n
e.g.
$ ./start-virt.sh -i tdx-guest-ubuntu-22.04.qcow2 -n tdx-vm1
$ ./start-virt.sh -i tdx-guest-ubuntu-22.04.qcow2 -n tdx-vm2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ruomengh LGTM
@@ -1,10 +1,10 @@ | |||
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> | |||
<name>td-guest-grub-on-ubuntu-host</name> | |||
<memory unit='KiB'>2097152</memory> | |||
<name>tdx-guest</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a random string or changing the name to a variable for creating multiple TDs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script provides arg "-n" to set domain name.
<name>td-guest-grub-on-ubuntu-host</name> | ||
<memory unit='KiB'>2097152</memory> | ||
<name>tdx-guest</name> | ||
<memory unit='GiB'>mem_size</memory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing the pattern to CAPITAL to prevent the regex matches the libvirt keywords?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with capital keywords "REPLACE_MEM_SIZE" and "REPLACE_VCPU_NUM". Thanks.
1. User can specify vCPU number and memory size 2. Add usage example in README.md Signed-off-by: Hao, Ruomeng <ruomeng.hao@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.