File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2264,16 +2264,20 @@ def create(
22642264 )
22652265 # some other problem happened, raise normally
22662266 raise
2267- # Wait for the domain to be created
2268- utils_misc .wait_for (
2269- func = self .is_alive ,
2270- timeout = 60 ,
2271- text = ("waiting for domain %s to start" % self .name ),
2272- )
2273- result = virsh .domuuid (self .name , uri = self .connect_uri )
2274- self .uuid = result .stdout_text .strip ()
2275- # Create isa serial ports.
2276- self .create_serial_console ()
2267+ # Don't start VM and create console when user add --noreboot flag
2268+ if params .get ("use_no_reboot" ) == "yes" :
2269+ LOG .info ("VM created with --noreboot, skipping start up" )
2270+ else :
2271+ # Wait for the domain to be created
2272+ utils_misc .wait_for (
2273+ func = self .is_alive ,
2274+ timeout = 60 ,
2275+ text = ("waiting for domain %s to start" % self .name ),
2276+ )
2277+ result = virsh .domuuid (self .name , uri = self .connect_uri )
2278+ self .uuid = result .stdout_text .strip ()
2279+ # Create isa serial ports.
2280+ self .create_serial_console ()
22772281 finally :
22782282 fcntl .lockf (lockfile , fcntl .LOCK_UN )
22792283 lockfile .close ()
You can’t perform that action at this time.
0 commit comments