File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
samples/vsphere/vcenter/vm/hardware Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 35
35
36
36
Sample Prerequisites:
37
37
The sample needs an existing VM.
38
+
39
+ Note:
40
+ The sample adds new serial ports to the existing VM. If you re-run the sample
41
+ without cleaning up the previous created serial ports, the VM may be stuck at
42
+ power on stage as there will be multiple serial ports using the same output
43
+ file. In such case, you will see a question in vCenter UI asking if the file
44
+ should be Replaced or Appended.
45
+ To avoid this, make sure to pass -c to clean up the serial ports or manually
46
+ delete them after running the sample.
38
47
"""
39
48
40
49
vm = None
@@ -122,6 +131,9 @@ def run():
122
131
print ('vm.hardware.Serial.get({}, {}) -> {}' .
123
132
format (vm , serial , pp (serial_info )))
124
133
134
+ # Make sure output file doesn't exist already
135
+ cleanup_backends ()
136
+
125
137
print ('\n # Example: Create Serial port with FILE backing' )
126
138
serial_port_datastore_path = testbed .config ['SERIAL_PORT_DATASTORE_PATH' ]
127
139
serial_create_spec = Serial .CreateSpec (
You can’t perform that action at this time.
0 commit comments