@@ -361,6 +361,11 @@ impl RunningZone {
361
361
& self . inner . zonepath . pool
362
362
}
363
363
364
+ /// Returns the zone's image path.
365
+ pub fn image_path ( & self ) -> & Utf8Path {
366
+ & self . inner . image_path
367
+ }
368
+
364
369
/// Return the name of a bootstrap VNIC in the zone, if any.
365
370
pub fn bootstrap_vnic_name ( & self ) -> Option < & str > {
366
371
self . inner . get_bootstrap_vnic_name ( )
@@ -900,6 +905,9 @@ pub struct InstalledZone {
900
905
// Filesystem path of the zone
901
906
zonepath : PathInPool ,
902
907
908
+ // The path to the zone's image source.
909
+ image_path : Utf8PathBuf ,
910
+
903
911
// Name of the Zone.
904
912
name : String ,
905
913
@@ -1210,8 +1218,9 @@ impl<'a> ZoneBuilder<'a> {
1210
1218
let fake_cfg = self . fake_cfg . unwrap ( ) ;
1211
1219
let temp_dir = fake_cfg. temp_dir ;
1212
1220
( || {
1221
+ let zone_type = self . zone_type ?;
1213
1222
let full_zone_name = InstalledZone :: get_zone_name (
1214
- self . zone_type ? ,
1223
+ zone_type,
1215
1224
self . unique_name ,
1216
1225
) ;
1217
1226
let mut zonepath = self . zone_root_path ?;
@@ -1223,6 +1232,7 @@ impl<'a> ZoneBuilder<'a> {
1223
1232
let iz = InstalledZone {
1224
1233
log : self . log ?,
1225
1234
zonepath,
1235
+ image_path : Utf8PathBuf :: from ( format ! ( "/fake/image/path/{zone_type}.tar.gz" ) ) ,
1226
1236
name : full_zone_name,
1227
1237
control_vnic,
1228
1238
bootstrap_vnic : self . bootstrap_vnic ,
@@ -1338,6 +1348,7 @@ impl<'a> ZoneBuilder<'a> {
1338
1348
Ok ( InstalledZone {
1339
1349
log : log. new ( o ! ( "zone" => full_zone_name. clone( ) ) ) ,
1340
1350
zonepath : zone_root_path,
1351
+ image_path : zone_image_path,
1341
1352
name : full_zone_name,
1342
1353
control_vnic,
1343
1354
bootstrap_vnic,
0 commit comments