Revision df36e2a4 image_creator/os_type/windows.py
b/image_creator/os_type/windows.py | ||
---|---|---|
124 | 124 |
# because we cannot get the drive letter mapping from a guest. |
125 | 125 |
if check_guestfs_version(self.image.g, 1, 17, 18) < 0: |
126 | 126 |
raise FatalError( |
127 |
'For windows support libguestfs 1.17.17 or above is needed')
|
|
127 |
'For windows support libguestfs 1.17.18 or above is needed')
|
|
128 | 128 |
|
129 | 129 |
device = self.image.g.part_to_dev(self.root) |
130 | 130 |
|
... | ... | |
275 | 275 |
r'IF NOT !ERRORLEVEL! EQU 0 EXIT /B 1 & ' + |
276 | 276 |
r'DEL /Q %SCRIPT%"') |
277 | 277 |
|
278 |
stdout, stderr, rc = self._guest_exec(cmd) |
|
278 |
stdout, stderr, rc = self._guest_exec(cmd, False)
|
|
279 | 279 |
|
280 |
if rc != 0: |
|
281 |
FatalError("Shrinking failed. Please make sure the media is " |
|
282 |
"defraged with a command like this: " |
|
283 |
"`Defrag.exe /U /X /W'") |
|
280 | 284 |
for line in stdout.splitlines(): |
281 | 285 |
if line.find('shrunk') >= 0: |
282 | 286 |
self.out.output(line) |
Also available in: Unified diff