On 03/28/2013 06:04 PM, Yu Mingfei wrote:
+ cmd_options = "--force "
+ if os.system(cmd):
+ logging.error("Create update_iso_xml failed!")
+
+ if options == "--config" or start_vm == "no":
+ cmd_options += " --config"
+
+ #give domain the ISO image file
+ virsh.update_device(domainarg=vm_name, \
+ filearg=update_iso_xml, flagstr=cmd_options)
Aha, I know the reason now...
It seemed that you did not consider older libvirt.
I ran failed on v0.9.10 because 'update-device' do not support
'--config'. :-(
v0.9.10
NAME
update-device - update device from an XML file
SYNOPSIS
update-device <domain> <file> [--persistent] [--force]
DESCRIPTION
Update device from an XML <file>.
OPTIONS
[--domain] <string> domain name, id or uuid
[--file] <string> XML file
--persistent persist device update
--force force device update
v0.9.11
NAME
update-device - update device from an XML file
SYNOPSIS
update-device <domain> <file> [--config] [--force]
DESCRIPTION
Update device from an XML <file>.
OPTIONS
[--domain] <string> domain name, id or uuid
[--file] <string> XML file
--config affect next boot
--force force device update
Thansk~
Yu
_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel