Can change network interface type
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		@@ -35,6 +35,7 @@ export function VMNetworksList(p: {
 | 
			
		||||
  const addNew = () => {
 | 
			
		||||
    p.vm.networks.push({
 | 
			
		||||
      type: "UserspaceSLIRPStack",
 | 
			
		||||
      model: "Virtio",
 | 
			
		||||
      mac: randomMacAddress(ServerApi.Config.net_mac_prefix),
 | 
			
		||||
    });
 | 
			
		||||
    p.onChange?.();
 | 
			
		||||
@@ -146,6 +147,7 @@ function NetworkInfoWidget(p: {
 | 
			
		||||
        />
 | 
			
		||||
      </ListItem>
 | 
			
		||||
      <div style={{ marginLeft: "70px" }}>
 | 
			
		||||
        {/* MAC address input */}
 | 
			
		||||
        <MACInput
 | 
			
		||||
          editable={p.editable}
 | 
			
		||||
          label="MAC Address"
 | 
			
		||||
@@ -156,6 +158,26 @@ function NetworkInfoWidget(p: {
 | 
			
		||||
          }}
 | 
			
		||||
        />
 | 
			
		||||
 | 
			
		||||
        {/* NIC model */}
 | 
			
		||||
        <SelectInput
 | 
			
		||||
          editable={p.editable}
 | 
			
		||||
          label="NIC Model"
 | 
			
		||||
          value={p.network.model}
 | 
			
		||||
          onValueChange={(v) => {
 | 
			
		||||
            p.network.model = v as any;
 | 
			
		||||
            p.onChange?.();
 | 
			
		||||
          }}
 | 
			
		||||
          options={[
 | 
			
		||||
            { label: "e1000", value: "E1000" },
 | 
			
		||||
            {
 | 
			
		||||
              label: "virtio",
 | 
			
		||||
              value: "Virtio",
 | 
			
		||||
              description:
 | 
			
		||||
                "Recommended model, but will require specific drivers on OS that do not support it.",
 | 
			
		||||
            },
 | 
			
		||||
          ]}
 | 
			
		||||
        />
 | 
			
		||||
 | 
			
		||||
        {/* Defined network selection */}
 | 
			
		||||
        {p.network.type === "DefinedNetwork" && (
 | 
			
		||||
          <SelectInput
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user