@@ -47,6 +47,16 @@ pub struct CreateSnapshotParams {
4747 pub mem_file_path : PathBuf ,
4848}
4949
50+ /// Allows for changing the mapping between tap devices and host devices
51+ /// during snapshot restore
52+ #[ derive( Debug , PartialEq , Eq , Deserialize ) ]
53+ pub struct NetworkOverride {
54+ /// The index of the interface to modify
55+ pub iface_id : String ,
56+ /// The new name of the interface to be assigned
57+ pub host_dev_name : String ,
58+ }
59+
5060/// Stores the configuration that will be used for loading a snapshot.
5161#[ derive( Debug , PartialEq , Eq ) ]
5262pub struct LoadSnapshotParams {
@@ -60,6 +70,8 @@ pub struct LoadSnapshotParams {
6070 /// When set to true, the vm is also resumed if the snapshot load
6171 /// is successful.
6272 pub resume_vm : bool ,
73+ /// The network devices to override on load.
74+ pub network_overrides : Vec < NetworkOverride > ,
6375}
6476
6577/// Stores the configuration for loading a snapshot that is provided by the user.
@@ -82,6 +94,9 @@ pub struct LoadSnapshotConfig {
8294 /// Whether or not to resume the vm post snapshot load.
8395 #[ serde( default ) ]
8496 pub resume_vm : bool ,
97+ /// The network devices to override on load.
98+ #[ serde( default ) ]
99+ pub network_overrides : Vec < NetworkOverride > ,
85100}
86101
87102/// Stores the configuration used for managing snapshot memory.
0 commit comments