mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-04 12:41:37 +00:00
kvm tools: use custom rootfs_name for guest name
It is better than a anonymous "guest-xxx". Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
e85eb87ed2
commit
587a4d176e
+6
-2
@@ -981,8 +981,12 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
|
||||
term_init();
|
||||
|
||||
if (!guest_name) {
|
||||
sprintf(default_name, "guest-%u", getpid());
|
||||
guest_name = default_name;
|
||||
if (custom_rootfs) {
|
||||
guest_name = custom_rootfs_name;
|
||||
} else {
|
||||
sprintf(default_name, "guest-%u", getpid());
|
||||
guest_name = default_name;
|
||||
}
|
||||
}
|
||||
|
||||
kvm = kvm__init(dev, hugetlbfs_path, ram_size, guest_name);
|
||||
|
||||
Reference in New Issue
Block a user